TWI453694B - A pixel expansion free encoding method for images - Google Patents

A pixel expansion free encoding method for images Download PDF

Info

Publication number
TWI453694B
TWI453694B TW099141836A TW99141836A TWI453694B TW I453694 B TWI453694 B TW I453694B TW 099141836 A TW099141836 A TW 099141836A TW 99141836 A TW99141836 A TW 99141836A TW I453694 B TWI453694 B TW I453694B
Authority
TW
Taiwan
Prior art keywords
layer
image
images
pixels
black
Prior art date
Application number
TW099141836A
Other languages
Chinese (zh)
Other versions
TW201224990A (en
Inventor
Shi Jinn Horng
Tsung Lieh Lin
Kai Hui Lee
Pei Ling Chiu
Original Assignee
Univ Nat Taiwan Science Tech
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Univ Nat Taiwan Science Tech filed Critical Univ Nat Taiwan Science Tech
Priority to TW099141836A priority Critical patent/TWI453694B/en
Publication of TW201224990A publication Critical patent/TW201224990A/en
Application granted granted Critical
Publication of TWI453694B publication Critical patent/TWI453694B/en

Links

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09CCIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
    • G09C5/00Ciphering apparatus or methods not provided for in the preceding groups, e.g. involving the concealment or deformation of graphic data such as designs, written or printed messages

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Facsimile Transmission Control (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Description

一種避免像素擴張之影像加密方法Image encryption method for avoiding pixel expansion

本發明係與一種避免像素擴張之影像加密方法有關,特別係與一種不須另設密碼本以及維持圖像高對比度之避免像素擴張之影像加密方法有關。The present invention relates to an image encryption method for avoiding pixel expansion, and particularly relates to an image encryption method that avoids pixel expansion without requiring a separate codebook and maintaining high contrast of an image.

資訊傳遞的安全自古以來就是一項重要的議題,簡單的有例如在傳遞信件上封印,以防止信件被中途打開;進一步係有將信文用譯電本轉譯,若中途擷取者沒有譯電本,就無法得知信文的內容;後來亦有習知技術將信文分成幾份,以避免傳遞者偷取信文內容。而以上這些技術不但用在軍事機密的傳遞上,也用在諸如藏寶圖等等之私人有價值的資訊中。有鑑於此,視覺密碼技術就是基於保護機密影像的條件下所誕生的技術。The security of information transmission has been an important issue since ancient times. It is simple, for example, to seal letters on letters to prevent letters from being opened midway; further, to translate letters into translated textbooks, if the readers do not translate In this case, the content of the message cannot be known; later, there are also known techniques to divide the message into several parts to prevent the sender from stealing the content of the message. These technologies are used not only in the transmission of military secrets, but also in private and valuable information such as treasure maps. In view of this, visual cryptography is a technology based on the protection of confidential images.

在資訊科技發明之後,資訊安全更進一步使用密碼學理論來加密與解密。而習知密碼學係應用到許多複雜的計算,藉其進行加密之後,可以達到信文內容的保護,而使一般人不太容易解密。但因其使用到複雜的計算,不但在加密時要用到資訊設備,接收者收到信件之後,也非得用資訊設備能完成解密之內文,在具備良好的資訊設備環境條件之下,以密碼學保護資訊的安全是可行的,所以現今的網路傳輸,有關資訊的安全保護,往往是以密碼理論來達成。After the invention of information technology, information security further uses cryptography theory to encrypt and decrypt. The traditional cryptography department applies to many complicated calculations, and after encrypting it, it can achieve the protection of the content of the message, so that the average person is not easy to decrypt. However, because it uses complex calculations, not only the information device is used for encryption, but after receiving the letter, the recipient must use the information device to complete the decryption. Under the condition of good information equipment environment, The security of cryptographic protection information is feasible, so today's network transmission, the security of information is often achieved by cryptography.

然而在有些場合並沒有資訊設備可用來解密密文,因而傳統的密碼學就無法使用來保護資訊的安全。視覺密碼技術的解密方法不同於傳統的密碼學,該技術係運用人眼來將密文之內容進行解密,在前述沒有資訊設備的場合,以視覺密碼技術加密的密文,可以直接疊合並以人眼即可辨識信文內容。然而目前視覺密碼的技術在加密過程必須使用密碼本,而且會有像素擴張的問題,如欲進一步增加密文影像的數量時,密碼本會更加複雜,同時使像素擴張更加嚴重。所以如何增加密文影像,又可避免像素擴張已是目前視覺密碼領域的一大挑戰。However, in some cases there is no information device to decrypt the ciphertext, so traditional cryptography can not be used to protect the security of information. The decryption method of visual cryptography is different from the traditional cryptography. The technology uses the human eye to decrypt the content of ciphertext. In the case where there is no information device, the ciphertext encrypted by visual cryptography can be directly stacked and combined. The human eye can recognize the content of the message. However, the current technology of visual ciphers must use a codebook in the encryption process, and there is a problem of pixel expansion. If you want to further increase the number of ciphertext images, the codebook will be more complicated and the pixel expansion will be more serious. So how to increase the ciphertext image and avoid pixel expansion is a major challenge in the field of visual cryptography.

一般而言,習知視覺密碼的相關先前技術,如擴張或視覺密碼機制(Extended Visual Cryptography)、一般化存取結構視覺密碼機制(General Access Structure Visual Cryptography)、彩色視覺密碼以及半色調視覺密碼等機制,都與發展新的機制有關。然而上述該等機制均只用於分享單一機密影像且存在像素擴張(Pixel Expansion)、低對比(Low Contrast)以及需要重新設計密碼本等等問題。再者,當分享的機密影像數目增多時,原有像素擴張及低對比的問題不但存在且將會更為嚴重。因此,如何設計出一種可降低像素擴張、提升對比及不需要重新設計密碼本等之視覺密碼機制,乃為目前業界所欲發展之重點。In general, prior art techniques related to visual cryptography, such as Extended Visual Cryptography, General Access Structure Visual Cryptography, color visual cryptography, and halftone visual cryptography, etc. Mechanisms are all related to the development of new mechanisms. However, these mechanisms are only used to share a single confidential image and there are problems such as Pixel Expansion, Low Contrast, and the need to redesign the codebook. Moreover, when the number of shared confidential images increases, the problem of original pixel expansion and low contrast is not only present but will be more serious. Therefore, how to design a visual cryptosystem that can reduce pixel expansion, enhance contrast, and eliminate the need to redesign the codebook is the focus of the industry.

有鑑於此,本發明之一範疇係在於提供一種避免像素擴張之影像加密方法。In view of the above, one aspect of the present invention is to provide an image encryption method that avoids pixel expansion.

根據本發明之一具體實施例,本發明提供可以避免像素擴張之影像加密方法,本發明方法包含有下列步驟:(S1)輸入一第一影像及一第二影像,該第一影像及該第二影像均為一二維影像;(S2)將該第一影像以一第一分配方式分離成一第一圖層及一第二圖層,該第一圖層及該第二圖層係分別由複數個像素組成;(S3)將該第二影像以一第二分配方式分離成一第三圖層及一第四圖層,該第三圖層及該第四圖層係分別由複數個像素組成;(S4)依據該第一圖層、該第二圖層、該第三圖層以及該第四圖層,而以一指定方式來輸出至少二分享影像。其中,該第一分配方式係為將該第一影像之黑點像素等比分配予該第一圖層及第二圖層,而該第二分配方式則為將該第二影像之黑點像素等比分配予該第三圖層及第四圖層。According to an embodiment of the present invention, the present invention provides an image encryption method capable of avoiding pixel expansion. The method of the present invention includes the following steps: (S1) inputting a first image and a second image, the first image and the first The second image is a two-dimensional image; (S2) separating the first image into a first layer and a second layer in a first distribution manner, wherein the first layer and the second layer are respectively composed of a plurality of pixels (S3) separating the second image into a third layer and a fourth layer in a second distribution manner, wherein the third layer and the fourth layer are respectively composed of a plurality of pixels; (S4) according to the first The layer, the second layer, the third layer, and the fourth layer output at least two shared images in a specified manner. The first allocation method is to allocate the black dot pixels of the first image to the first layer and the second layer, and the second distribution mode is to compare the black dot pixels of the second image. Assigned to the third layer and the fourth layer.

於實際應用中,步驟(S4)之指定方式包含子步驟(S41)對該第三圖層進行一第一偽裝處理以形成一第五圖層;子步驟(S42)將該第一圖層與該第三四圖層結合進而形成一第三影像;子步驟(S43)將該第二圖層與該第五圖層結合進而形成一第四影像;以及子步驟(S44)對該第三影像及該第四影像進行一第二偽裝處理以形成二分享影像。In a practical application, the specified manner of the step (S4) includes a sub-step (S41) performing a first masquerading process on the third layer to form a fifth layer; and sub-step (S42) the first layer and the third layer. The four layers are combined to form a third image; the sub-step (S43) combines the second layer with the fifth layer to form a fourth image; and the sub-step (S44) performs the third image and the fourth image. A second camouflage process to form two shared images.

另外,於實際應用中,該第一偽裝處理包含將該第三圖層旋轉至一指定角度,而該指定角度為180度。而該第二偽裝處理則包含子步驟(S441),以計算該第三影像及該第四影像上各個區塊部份像素之黑色之密度,並擷取得一最大區域密度;以及子步驟(S442)以該最大區域密度於該第三影像及該第四影像各個區塊上,隨機選取白色像素並更變為黑色,以使該第三影像及該第四影像分別成為一具有均勻雜訊之分享影像。In addition, in practical applications, the first camouflage process includes rotating the third layer to a specified angle, and the specified angle is 180 degrees. The second masquerading process includes a sub-step (S441) for calculating the density of the black of the pixels of the respective blocks on the third image and the fourth image, and obtaining a maximum area density; and sub-steps (S442) The white pixels are randomly selected and become black in the third image and the fourth image, so that the third image and the fourth image become uniform noise respectively. Share images.

據此,相較於習知技術,本發明透過分離與偽裝程序,以將複數張機密影像分解並藏入於複數張分享圖。當需要解密時,便可透過疊合複數張分享圖的方式靠著人眼辦到解密的效果,除了能解決傳統視覺密碼像素擴張的問題外,其亦不須另設密碼本。再者,相對於習知視覺密碼技術,本發明方法亦可以於影像疊合解密時得到更高的對比。Accordingly, the present invention decomposes and concatenates a plurality of confidential images into a plurality of shared images through separation and camouflage procedures as compared to conventional techniques. When decryption is required, the effect of decryption can be achieved by superimposing a plurality of pictures by sharing the image. In addition to solving the problem of pixel expansion of the conventional visual password, it is not necessary to set a password book. Moreover, the method of the present invention can also achieve higher contrast in image overlay decryption than conventional visual cryptography.

為使本發明能更清楚的被說明,請參照以下本發明詳細說明及其中所包括之實例可更容易地理解本發明。The invention may be more readily understood by the following detailed description of the invention and the examples thereof.

本說明書僅對本發明之必要元件作出陳述,且僅係用於說明本發明其中之可能之實施例,然而說明書之記述應不侷限本發明所主張之技術本質的權利範圍。除非於說明書有明確地排除其可能,否則本發明並不侷限於特定方法、流程、功能或手段。亦應瞭解的是,目前所述僅係本發明可能之實施例,在本發明之實施或測試中,可使用與本說明書所述材料相類似或等效之任何方法、流程、功能或手段。This description is only for the purpose of illustrating the essential elements of the invention, and is only intended to illustrate the possible embodiments of the invention, but the description of the specification should not limit the scope of the technical nature of the claimed invention. The present invention is not limited to the specific methods, procedures, functions, or means unless the scope of the invention is specifically excluded. It is also to be understood that the presently described embodiments are merely possible embodiments of the present invention, and any methods, procedures, functions or means similar or equivalent to those described herein may be employed in the practice or testing of the invention.

除非有另外定義,否則本說明書所用之所有技術及科學術語,皆具有與熟習本發明所屬技術者通常所瞭解的意義相同之意義。儘管在本發明之實施或測試中,可使用與本說明書所述方法及材料相類似或等效之任何方法及手段,但本說明書目前所述者僅係實例方法及材料。Unless otherwise defined, all technical and scientific terms used in the specification have the same meaning meaning Although any methods and means similar or equivalent to those described herein can be used in the practice or testing of the present invention, the present description is merely illustrative of the methods and materials.

再者,本說明書中所提及之一數目以上或以下,係包含數目本身。且應瞭解的是,本說明書揭示執行所揭示功能之某些方法、流程,均存在多種可執行相同功能之與所揭示結構有關之結構,且上述之結構通常均可達成相同結果。Furthermore, one or more of the numbers mentioned in the specification include the number itself. It should be understood that the present disclosure discloses certain methods and processes for performing the disclosed functions. There are a variety of structures related to the disclosed structures that perform the same functions, and the above structures generally achieve the same result.

請一併參閱圖一及圖二,圖一繪示根據本發明之一具體實施例的一種影像加密方法之流程圖,圖二則繪示根據本發明之一具體實施例的一種影像加密方法之示意圖。如圖一及圖二所示,本發明之方法包含步驟(S1)輸入一第一影像2及一第二影像3,該第一影像2及該第二影像3均為一二維黑白影像;步驟(S2)將該第一影像2以一第一分配方式,分離成一第一圖層22及一第二圖層24,該第一圖層22及該第二圖層24係分別由複數個像素組成;步驟(S3)將該第二影像3以一第二分配方式,分離成一第三圖層32及一第四圖層34,該第三圖層32及該第四圖層34係分別由複數個像素組成;以及步驟(S4)依據該第一圖層22、該第二圖層24、該第三圖層32以及該第四圖層34,而以一指定方式輸出二分享影像6。1 and FIG. 2, FIG. 1 is a flowchart of an image encryption method according to an embodiment of the present invention, and FIG. 2 illustrates an image encryption method according to an embodiment of the present invention. schematic diagram. As shown in FIG. 1 and FIG. 2, the method of the present invention includes a step (S1) of inputting a first image 2 and a second image 3. The first image 2 and the second image 3 are both a two-dimensional black and white image; Step (S2) separating the first image 2 into a first layer 22 and a second layer 24 in a first distribution manner, the first layer 22 and the second layer 24 are respectively composed of a plurality of pixels; (S3) separating the second image 3 into a third layer 32 and a fourth layer 34 in a second distribution manner, wherein the third layer 32 and the fourth layer 34 are respectively composed of a plurality of pixels; and the steps (S4) According to the first layer 22, the second layer 24, the third layer 32, and the fourth layer 34, the two shared images 6 are output in a specified manner.

於本具體實施例中,步驟(S1)係為輸入一第一影像2及一第二影像3,該第一影像2及該第二影像3均為一二維黑白影像,上述之第一影像2及第二影像3係分別包含欲保護之圖像。為防止欲保護之圖像內容被他人所得知,需將其加密。In the embodiment, the step (S1) is to input a first image 2 and a second image 3. The first image 2 and the second image 3 are both a two-dimensional black and white image, and the first image is 2 and the second image 3 contain images to be protected, respectively. In order to prevent the image content to be protected from being known by others, it needs to be encrypted.

於本具體實施例中,上述之第一影像2以及第二影像3分別為一長方型二維黑白影像。於本具體實施例中,圖檔之基本構成單位為像素(pixel),像素之顏色可包含黑或白。In the specific embodiment, the first image 2 and the second image 3 are respectively a rectangular two-dimensional black and white image. In this embodiment, the basic constituent unit of the image file is a pixel, and the color of the pixel may include black or white.

步驟(S2)係為將該第一影像2以一第一分配方式,分離成一第一圖層22及一第二圖層24,該第一圖層22及該第二圖層24係分別由複數個像素組成。於本具體實施例中,當第一影像2或第二影像3被輸入後,會將該第一影像2劃分成複數個相等大小之方型像素區塊,像素區塊可由最少一個像素所組成,然其並不以一個像素為限,在有需要時像素區塊亦可由複數個像素組合而成。於第一影像2被劃分成複數個像素區塊後,以第一分配方式將上述之每一像素區塊分離,並形成第一圖層22及第二圖層24,上述的第一分配方式係將各個像素區塊之黑色像素,等比分配予第一圖層22及第二圖層24。於本具體實施例中,上述之等比分配係指第一圖層22及第二圖層24各佔一半黑色之像素區塊,然其不侷限於一半。若將第一圖層22及第二圖層24重疊,則可重新組合出完整之第一影像2。Step (S2) is to separate the first image 2 into a first layer 22 and a second layer 24 in a first distribution manner. The first layer 22 and the second layer 24 are respectively composed of a plurality of pixels. . In this embodiment, when the first image 2 or the second image 3 is input, the first image 2 is divided into a plurality of square pixel blocks of equal size, and the pixel block may be composed of at least one pixel. However, it is not limited to one pixel, and the pixel block may be composed of a plurality of pixels when necessary. After the first image 2 is divided into a plurality of pixel blocks, each of the pixel blocks is separated by a first allocation manner, and the first layer 22 and the second layer 24 are formed, and the first distribution mode is The black pixels of each pixel block are equally distributed to the first layer 22 and the second layer 24. In the present embodiment, the above-mentioned equal distribution means that the first layer 22 and the second layer 24 each occupy half of the black pixel block, but it is not limited to half. If the first layer 22 and the second layer 24 are overlapped, the complete first image 2 can be recombined.

步驟(S3)係為將該第二影像3以一第二分配方式,分離成一第三圖層32及一第四圖層34,該第三圖層32及該第四圖層34係分別由複數個像素組成。相同於上述之第一影像2,於第二影像3被劃分成複數個像素區塊後,以第二分配方式將上述之像素區塊分離,並形成第三圖層32及第四圖層34,上述的第二分配方式係將各個像素區塊之黑色像素,等比分配予第三圖層32及第四圖層34。於本具體實施例中,上述之等比分配係指第三圖層32及第四圖層34各佔一半黑色之像素區塊。若將第三圖層32及第四圖層34重疊,則可重新組合出完整之第二影像3。然而,各圖層並不侷限於各佔一半,黑色像素區塊之分配量得按其設計之需要及圖層之數量作調配。Step (S3) is to separate the second image 3 into a third layer 32 and a fourth layer 34 in a second distribution manner. The third layer 32 and the fourth layer 34 are respectively composed of a plurality of pixels. . The first image 2 is the same as the first image 2, and after the second image 3 is divided into a plurality of pixel blocks, the pixel blocks are separated by a second distribution method, and the third layer 32 and the fourth layer 34 are formed. The second allocation method distributes the black pixels of each pixel block to the third layer 32 and the fourth layer 34 in equal proportion. In the specific embodiment, the above-mentioned equal distribution means that the third layer 32 and the fourth layer 34 each occupy half of the black pixel block. If the third layer 32 and the fourth layer 34 are overlapped, the complete second image 3 can be recombined. However, each layer is not limited to half each, and the allocation of black pixel blocks is allocated according to the needs of the design and the number of layers.

步驟(S4)為依據該第一圖層22、該第二圖層24、該第三圖層32以及該第四圖層34,而以一指定方式輸出二分享影像6。上述的指定方式又包含了子步驟(S41),以對該第三圖層32進行一第一偽裝處理並形成一第五圖層36;子步驟(S42)將該第一圖層22與該第四圖層32結合,進而形成一第三影像4;子步驟(S43)將該第二圖層24與該第五圖層36結合,進而形成一第四影像5;以及子步驟(44)對該第三影像4及該第四影像5進行一第二偽裝處理,以形成二分享影像6。Step (S4) is to output the two shared images 6 in a specified manner according to the first layer 22, the second layer 24, the third layer 32, and the fourth layer 34. The above specified method further includes a sub-step (S41) to perform a first masquerading process on the third layer 32 and form a fifth layer 36; and sub-step (S42) to the first layer 22 and the fourth layer Combining 32 to form a third image 4; sub-step (S43) combining the second layer 24 with the fifth layer 36 to form a fourth image 5; and sub-step (44) for the third image 4 And the fourth image 5 performs a second camouflage process to form two shared images 6.

請再參閱圖二,於本具體實施例中,將對由第二影像3所分離之第三圖層32進行第一偽裝處理。上述之第一偽裝處理是指將該第三圖層32,旋轉至指定角度並據以形成第五圖層36。於本具體實施例中,上述之指定角度約為180度,而其旋轉係指水平的旋轉,然其指定角度亦不侷限於180度,透過對運算法進行調整,上述之指定角度可以為任何其他角度。Referring to FIG. 2 again, in the specific embodiment, the third layer 32 separated by the second image 3 is subjected to a first masquerading process. The first camouflage process described above refers to rotating the third layer 32 to a specified angle and forming a fifth layer 36 accordingly. In the specific embodiment, the specified angle is about 180 degrees, and the rotation refers to the horizontal rotation, but the specified angle is not limited to 180 degrees. By adjusting the algorithm, the specified angle can be any Other angles.

至此,本發明方法己得出第一圖層22、第二圖層24、第三圖層32、第四圖層34以及第五圖層36。籍由將第一影像2所分離之第一圖層22,與由第二影像3所分離之第四圖層34之黑色像素相互重疊以產生第三影像4,並且將第一影像2所分離之第二圖層24,與由第二影像3所分離且經第一偽裝處理的第五圖層36的結果以產生第四影像5。So far, the first layer 22, the second layer 24, the third layer 32, the fourth layer 34, and the fifth layer 36 have been obtained by the method of the present invention. The first image 22 separated by the first image 2 and the black pixels of the fourth layer 34 separated by the second image 3 are overlapped with each other to generate a third image 4, and the first image 2 is separated. The second layer 24, the result of the fifth layer 36 separated from the second image 3 and processed by the first masquerading, produces a fourth image 5.

接著,分別對第三影像4及第四影像5進行第二偽裝處理,以形成二分享影像6。上述的第二偽裝包含子步驟(S441)以計算該第三影像4及該第四影像5上各個區塊部份之黑色像素之密度,以擷取得一最大區域密度;以及子步驟(S442)以該最大區域密度於該第三影像4及該第四影像5上之各個區塊,隨機選取白色像素並將該白色像素更變為黑色,以使該第三影像4及該第四影像5分別成為分享影像6。再者,該分享影像6為一黑色像素均勻分佈的亂數影像。Then, the third image 4 and the fourth image 5 are respectively subjected to a second camouflage process to form two shared images 6 . The second masquerading includes the sub-step (S441) to calculate the density of the black pixels of the respective block portions on the third image 4 and the fourth image 5 to obtain a maximum area density; and sub-step (S442) The white pixels are randomly selected and the white pixels are further changed to black in the respective regions of the third image 4 and the fourth image 5 to make the third image 4 and the fourth image 5 Become a shared image6 respectively. Furthermore, the shared image 6 is a random number image in which black pixels are evenly distributed.

請參閱圖三,圖三繪示根據本發明之另一具體實施例的一種影像加密方法之流程圖。如圖三所示,本發明另外提供一種影像加密方法,其包含步驟(S5)以輸入一第一影像及一第二影像,該第一影像及該第二影像均為二維黑白影像;步驟(S6)對該第一影像以一第一分配方式,分離成一第一圖層及一第二圖層,該第一圖層及該第二圖層係分別由複數個像素組成;步驟(S7)將該第二影像以一第二分配方式,分離成一第三圖層及一第四圖層,該第三圖層及該第四圖層係分別由複數個像素組成;步驟(S8)水平旋轉該第三圖層以產生一第五圖層;步驟(S9)將該第一圖層與該第四圖層結合,進而形成一第三影像;步驟(S10)將該第二圖層與該第五圖層結合,進而形成一第四影像。(S11)計算該第三影像及該第四影像上各個區塊部份像素之黑色之密度以擷取得一最大區域密度;(S12)以該最大區域密度於該第三影像及該第四影像上之各個區塊,隨機選取白色像素並更變為黑色,以使得該第三影像及該第四影像分別成為該分享影像。Referring to FIG. 3, FIG. 3 is a flowchart of an image encryption method according to another embodiment of the present invention. As shown in FIG. 3, the present invention further provides an image encryption method, comprising the steps (S5) for inputting a first image and a second image, wherein the first image and the second image are two-dimensional black and white images; (S6) separating the first image into a first layer and a second layer in a first distribution manner, wherein the first layer and the second layer are respectively composed of a plurality of pixels; and (S7) The second image is separated into a third layer and a fourth layer by a second distribution manner, wherein the third layer and the fourth layer are respectively composed of a plurality of pixels; and the step (S8) horizontally rotates the third layer to generate a a fifth layer; the step (S9) combining the first layer with the fourth layer to form a third image; and (S10) combining the second layer with the fifth layer to form a fourth image. (S11) calculating a density of black of the pixels of each block on the third image and the fourth image to obtain a maximum area density; (S12) using the maximum area density in the third image and the fourth image In each of the upper blocks, white pixels are randomly selected and turned black, so that the third image and the fourth image respectively become the shared image.

再者,該分享影像係為一黑色像素均勻份佈的亂數影像。本具體實施例之其他細節係與上述該較佳實施例相類似,故於此不多加贅述。Moreover, the shared image is a random number image of a black pixel evenly distributed. Other details of the specific embodiment are similar to the above-described preferred embodiment, and thus will not be further described herein.

據此,相較於習知技術,本發明透過分離與偽裝程序以將複數張機密影像分解並藏入於複數張分享圖。而當需要解密時,本發明將可透過疊合複數張分享圖的方式,而靠著人眼辦識達到解密的效果,是以本發明除了能解決傳統視覺密碼像素擴張的問題外,其亦不須另設密碼本。再者,相對於習知視覺密碼加密技術,本發明亦可以於影像疊合解密時得到更高的對比。Accordingly, the present invention decomposes and concatenates a plurality of confidential images into a plurality of shared images through separation and camouflage procedures as compared to conventional techniques. When the decryption is required, the present invention can achieve the effect of decryption by superimposing a plurality of pictures, and the invention can solve the problem of pixel expansion of the conventional visual password. There is no need to set a separate password book. Moreover, the present invention can also achieve higher contrast in image overlay decryption than conventional visual cryptography.

藉由以上較佳具體實施例之詳述,本發明希望能更加清楚描述本發明之特徵與精神,而並非是要以上述所揭露的較佳具體實施例,來對本發明之範疇加以限制。相反地,其目的是希望能於本發明所欲申請之專利範圍的範疇內,涵蓋各種改變及等效性結構與步驟。因此,本發明所申請之專利範圍的範疇應根據上述的說明作最寬廣的解釋,以致使其得以涵蓋所有可能的改變以及等效性結構與步驟。The present invention is intended to be illustrative of the nature and spirit of the invention, and is not intended to limit the scope of the invention. On the contrary, the intention is to cover various modifications and equivalent structures and steps within the scope of the invention as claimed. Therefore, the scope of the invention is to be construed broadly construed the

S1~S4、S41~S44、S441~S442、S5~S12...流程步驟S1~S4, S41~S44, S441~S442, S5~S12. . . Process step

2...第一影像2. . . First image

3...第二影像3. . . Second image

22...第一圖層twenty two. . . First layer

24...第二圖層twenty four. . . Second layer

32...第三圖層32. . . Third layer

34...第四圖層34. . . Fourth layer

36...第五圖層36. . . Fifth layer

4...第三影像4. . . Third image

5...第四影像5. . . Fourth image

6...分享影像6. . . Share image

圖一繪示根據本發明之一具體實施例的一種影像加密方法之流程圖。FIG. 1 is a flow chart of an image encryption method according to an embodiment of the present invention.

圖二則繪示根據本發明之一具體實施例的一種影像加密方法之示意圖。FIG. 2 is a schematic diagram of an image encryption method according to an embodiment of the present invention.

圖三繪示根據本發明之另一具體實施例的一種影像加密方法之流程圖。FIG. 3 is a flow chart of an image encryption method according to another embodiment of the present invention.

2...第一影像2. . . First image

3...第二影像3. . . Second image

22...第一圖層twenty two. . . First layer

24...第二圖層twenty four. . . Second layer

32...第三圖層32. . . Third layer

34...第四圖層34. . . Fourth layer

36...第五圖層36. . . Fifth layer

4...第三影像4. . . Third image

5...第四影像5. . . Fourth image

6...分享影像6. . . Share image

Claims (6)

一種避免像素擴張之影像加密方法,該方法包含以下步驟:(S1)輸入一第一影像及一第二影像,該第一影像及該第二影像均為二維影像;(S2)將該第一影像以一第一分配方式,分離成一第一圖層及一第二圖層,該第一圖層及該第二圖層係分別由複數個像素組成;(S3)將該第二影像以一第二分配方式,分離成一第三圖層及一第四圖層,該第三圖層及該第四圖層係分別由複數個像素組成;(S41)對該第三圖層進行一第一偽裝處理,以形成一第五圖層;(S42)將該第一圖層與該第四圖層結合,進而形成一第三影像;(S43)將該第二圖層與該第五圖層結合,進而形成一第四影像;(S441)計算該第三及該第四影像上各個區塊部分之黑色像素密度,以擷取一最大區域密度;以及(S442)於該第三及該第四影像上該最大區域密度之各個區塊中,隨機選取白色像素並更變為黑色,以使該第三及該第四影像形成至少二分享影像。 An image encryption method for avoiding pixel expansion, the method comprising the steps of: (S1) inputting a first image and a second image, wherein the first image and the second image are two-dimensional images; (S2) An image is separated into a first layer and a second layer by a first distribution manner, wherein the first layer and the second layer are respectively composed of a plurality of pixels; (S3) the second image is distributed by a second The method is separated into a third layer and a fourth layer, wherein the third layer and the fourth layer are respectively composed of a plurality of pixels; (S41) performing a first camouflage process on the third layer to form a fifth a layer; (S42) combining the first layer with the fourth layer to form a third image; (S43) combining the second layer with the fifth layer to form a fourth image; (S441) calculating Black pixel densities of the respective block portions on the third and fourth images to capture a maximum area density; and (S442) in the respective blocks of the maximum area density on the third and fourth images, Randomly select white pixels and turn black again so that The third and fourth image forming images share at least two. 如申請專利範圍第1項所述之方法,其中該第一偽裝處理包含將該第三圖層旋轉至一指定角度。 The method of claim 1, wherein the first masquerading process comprises rotating the third layer to a specified angle. 如申請專利範圍第2項所述之方法,其中該指定角度為180度。 The method of claim 2, wherein the specified angle is 180 degrees. 如申請專利範圍第1項所述之方法,其中該第一分配方式係為將該第一影像之黑色像素,等比分配予該第一圖層及該第二圖層。 The method of claim 1, wherein the first allocation method is to assign a black pixel of the first image to the first layer and the second layer. 如申請專利範圍第1項所述之方法,其中該第二分配方式係為將該第二影像之黑色像素,等比分配予該第三圖層及該第四圖層。 The method of claim 1, wherein the second distribution mode is to assign a black pixel of the second image to the third layer and the fourth layer. 一種避免像素擴張之影像加密方法,該方法包含以下步驟:(S5)輸入一第一影像及一第二影像,該第一影像及該第二影像均為二維影像;(S6)對該第一影像以一第一分配方式,分離成一第一圖層及一第二圖層,該第一圖層及該第二圖層係分別由複數個像素組成;(S7)將該第二影像以一第二分配方式,分離成一第三圖層及一第四圖層,該第三圖層及該第四圖層係分別由複數個像素組成;(S8)水平旋轉該第三圖層以產生一第五圖層;(S9)將該第一圖層與該第四圖層結合進而形成一第三影像;(S10)將該第二圖層與該第五圖層結合,進而形成一第四影像;(S11)計算該第三及該第四影像上各個區塊部份之黑色部分的密度,以擷取得一最大區域密度;以及(S12)於該第三及該第四影像上該最大區域密度之各個區塊中,隨機選取白色像素並更變為黑色,以使該第三及該第四影像形成至少二分享影像。An image encryption method for avoiding pixel expansion, the method comprising the steps of: (S5) inputting a first image and a second image, wherein the first image and the second image are two-dimensional images; (S6) An image is separated into a first layer and a second layer by a first distribution manner, wherein the first layer and the second layer are respectively composed of a plurality of pixels; (S7) the second image is distributed by a second The method is separated into a third layer and a fourth layer, wherein the third layer and the fourth layer are respectively composed of a plurality of pixels; (S8) horizontally rotating the third layer to generate a fifth layer; (S9) The first layer is combined with the fourth layer to form a third image; (S10) combining the second layer with the fifth layer to form a fourth image; (S11) calculating the third and fourth a density of a black portion of each block portion of the image to obtain a maximum area density; and (S12) randomly selecting white pixels in each of the blocks of the maximum area density of the third and fourth images Turn black again to make the third and fourth Like the formation of at least two to share images.
TW099141836A 2010-12-02 2010-12-02 A pixel expansion free encoding method for images TWI453694B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW099141836A TWI453694B (en) 2010-12-02 2010-12-02 A pixel expansion free encoding method for images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099141836A TWI453694B (en) 2010-12-02 2010-12-02 A pixel expansion free encoding method for images

Publications (2)

Publication Number Publication Date
TW201224990A TW201224990A (en) 2012-06-16
TWI453694B true TWI453694B (en) 2014-09-21

Family

ID=46726039

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099141836A TWI453694B (en) 2010-12-02 2010-12-02 A pixel expansion free encoding method for images

Country Status (1)

Country Link
TW (1) TWI453694B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1199711A1 (en) * 2000-10-20 2002-04-24 Telefonaktiebolaget Lm Ericsson Encoding of audio signal using bandwidth expansion
CN101527138A (en) * 2008-03-05 2009-09-09 华为技术有限公司 Coding method and decoding method for ultra wide band expansion, coder and decoder as well as system for ultra wide band expansion

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1199711A1 (en) * 2000-10-20 2002-04-24 Telefonaktiebolaget Lm Ericsson Encoding of audio signal using bandwidth expansion
CN101527138A (en) * 2008-03-05 2009-09-09 华为技术有限公司 Coding method and decoding method for ultra wide band expansion, coder and decoder as well as system for ultra wide band expansion

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Jen-Bang Feng, Hsien-Chu Wu, Chwei-Shyong Tsai, Ya-Fen Chang, Yen-Ping Chu, "Visual secret sharing for multiple secrets Pattern Recognition,"volume 41, issue 12, december 2008, pages 3572–3581. 陳琨, "以旋轉為基礎之視覺多重機密分享機制, "七月, 2007 *
黃竫淳,"無需像素擴張的視覺機密分享機制,"6月, 2004 *

Also Published As

Publication number Publication date
TW201224990A (en) 2012-06-16

Similar Documents

Publication Publication Date Title
Soni et al. A novel image encryption technique using Arnold transform and asymmetric RSA algorithm
Wu et al. Sharing visual multi-secrets using circle shares
Liu et al. A turtle shell-based visual secret sharing scheme with reversibility and authentication
Kester Image Encryption based on the RGB PIXEL Transposition and Shuffling
Pillai et al. Image steganography method using k-means clustering and encryption techniques
Siahaan RC4 Technique in Visual Cryptography RGB Image Encryption
Somaraj et al. A novel image encryption technique using RGB pixel displacement for color images
Lee et al. Selective scalable secret image sharing with verification
Kester A visual cryptographic encryption technique for securing medical images
El Abbadi et al. Image encryption based on singular value decomposition
Ahmad et al. Enhanced halftone-based secure and improved visual cryptography scheme for colour/binary Images
Amirtharajan et al. Seeing and believing is a threat: A visual cryptography schemes
Hassan et al. New S-box transformation based on chaotic system for image encryption
TWI453694B (en) A pixel expansion free encoding method for images
Rachmawati et al. A combination of vigenere algorithm and one time pad algorithm in the three-pass protocol
CN115001666A (en) Image local encryption algorithm based on bit plane template XOR
Wang et al. A novel (n, n) secret image sharing scheme based on Sudoku
Hsu et al. Special type of circular visual cryptography for multiple secret hiding
TWI437506B (en) A multiple regions visual cryptography method
Padiya et al. Visual secret sharing scheme using encrypting multiple images
CN108629724B (en) Novel three-dimensional mapping image encryption method
Babatunde et al. Performance analysis of gray code number system in image security
Poongothai et al. Retinal Encryption Using Snnipet Pixel XOR with Huffman Sequential Encoding for Privacy Augmentation
Chang et al. Secret sharing using visual cryptography
Wu et al. Secret digital images over cloud computing using meaningful secret sharing technique

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees