QUANTUM IMAGE SCRAMBLING HAVING XOR USING 2D MEDIAN FILTERING

: With the rapid development of multimedia technology, the image scrambling for information hiding is severe in today’s world. But, in quantum image processing ﬁeld, the study on image scrambling is still few. Several quantum image scrambling schemes are in circle but, lot of it is yet to be performed. This paper presents the implementation of XOR quantum dot gate using bitwise operation to scramble an image metric. While the XOR operation has only half chance of outputting false or true (0, 1). XOR by scrambling an image so that image can be hidden immensely to avoid third party intervention. We use a non –linear method for removing the noise in this paper. . The median ﬁlterwas once the most popular nonlinear ﬁlter for removing impulse noise because of its good de -noising power and computational efﬁciency. Here we use 2D median filter


INTRODUCTION
Quantum image processing is attracting more and more attention in recent years, from quantum image representation [1][2][3], quantum image operation [4][5][6][7] to quantum image encryption [8][9][10].Image scrambling [11,12] is a basic work of image encryption or information hiding [13]. The image after scrambling removes the correlation of image pixels space, which can make the watermark lose the original information, and then, the watermark information is tucked into the carrier. Thus, even if an attacker extracted carriers from the image, he is almost unable to obtain the original image information in any case. Therefore, scrambling processing for the watermark or information hiding is fairly indispensable in a large sense. The scrambling algorithm mainly includes twocategories. Image bit-plane refers to a series of two-value image planes. To begin with, the pixel Values in the image are represented by its corresponding binary values, and then, every single bit of all the pixels will form a two-value image, it is called bitplane. To bespeci fic, if the image gray value range is [0, 255]. Two-input XOR (exclusive OR) also known as exclusive disjunction is a logical function which gives a highOutput only if any one of the two inputs but not both are high. The circuit diagram and the layout of XOR gate is shown in Fig  5(a) and Fig 5(b). The third input line of majority gate 1 is made high and that of majority gate 2 is made low. The output of majority gate 2 is fed into an inverter. Finally, the output from the majority gate 1 and that of the inverter is fed into majority gate 3 whose third input line is made 0. The output of majority gate 3 is the XORfunction. Impulse noise in an image is present due to bit errors in transmission or introduced during the signal acquisition stage. This noise is caused by malfunctioning pixels in camera sensors, faulty memory locations in hardware, transmission in noisy channel and external disturbance such as atmospheric disturbance [17]. Filters are designed as specific blocks and are used as masks for convolution operations. Basically two methods are used to remove the noise named as linear and Non-linear, and we use a non -linear method for removing the noise in this paper. . The median filterwas once the most popular nonlinear filter for removing impulse noise because of its good denoising power and computational efficiency. Here we use 2D median filter Bitwise XOR operation to scramble two character matrices by generating a truth table .I need to perform the operation for four characters where ea ch of them have a bit representation as follow : XOR A = 00 G = 01 C = 10 T = 11 I need to create a table thats two characters together which g ives the values for all combinations of ing pairs of characters in the following way.
To obtain the output, you need to convert each character into its bit representation, the bits, then use the result and convert it back to example, consulting the third row and second column of the table, by XORing C and G : C = 10 C = 10 G = 01 C XOR G = 10 XOR 01 = 11 --> T I would ultimately like to apply this rule to scrambling chara cters in a 5 x 5 matrix. As an example: I would like to generate a matri such that each element of A gets XORed with its corresponding element in B .C A XOR B. For example, considering the first row and first column: A{1,1} XOR B{1,1} = GATT XOR ATAC = GTTG First, let's define the function that takes two 4-character strings and bothstrings correspon ding to that table that you have. , let's set up alookup table where a unique two-bit string corr esponds to a letter. We will also need the lookup table using a class where given a letter, we produce a two-bit string. Wewant to convert each letter into its two b it representation, and we need the inverse lookup todo this. After, we XOR the bits individually, then use the forward lookup table to get back to wherewe started. As such: Let's go through the above code slowly. The inputs letterXOR are expected to be character array of letters that are composed of , , A,T,G,and C and . We first define the forward and reverse lookups. We then split up each character of the input strings A andB into a cell array of individual characters, as looking up multiple keys in your codebook requires it to be this way. We then figure out what the bits are for each character in each string. These bits are actually strings, and so what we need to do is convert each string of bits into an array of numbers. We simply cast the string to double and subtract by 48, which is the ASCII code for 0 . By convertingto, you'll either get 48 or 49, which is why we need to subtract with 48. As such, each pair of bits is converted into an array of bits. We then take each 1x2 of bits between A and Bbitxor use to xor the bits. The outputs at this point are still 1 x 2 after t his, we concatenate all of thecharacters together to make the final string for the output.Make sure you save the above in a function called. Once we have this, we now simply have to use one call that will XOR each four element string in your cell array andwe then output our final matrix. We will use to do that, and the input into will be a matrix that is column major defined. We do this as MATLA B can access elements Ina 2D arrayUsing a single value. Thi s value is the column major index of the element in the matri x.
We define a Vector that goes from 1 to 25, then use to get this into the right 2D form. The reason why we need to do this is because we want to ma ke sure that the output matrix (Which is in your example) is structured in the same way. As such: We use XOR, if we used AND, OR orXOR with the one-tim e and it's extremely important to understand that ANDhas a 75% chance of outputting 0 and a 25%chanc e of outputting a 1. While OR has a 25%chance of outputtin g 0 and 75% chance ofoutputting 1. While the XOR operatio n has a50% chance of outputting 0 or 1.XOR by encrypting an image. Here is adig ital image of Charles Babbage:Let's look at a visual exampl eto see thedifferent scrambling effects of AND vs. OR vsX OR by encrypting an image ... Here is digital image of Charles Babbage:

AND GATE USED
Xor used in this image contains no information about the original image. If we didn't provide the shiftsequence it wou ld be impossible for you toreverse it back to the original ima ge. You couldtry every possible sequence, but that wouldres ult in every possible image! How could you Know it was Babbage? It's equally likely to be picture of yo u or anything else another thing to note about XOR versus A NDor OR is that it is reversible. The truth table for XOR is: 0 0 | 0 0 1 | 1 1 0 | 1 1 1 | 0 So we know whenever we have 0 as the padbit, we can leave the bit as it is when Decrypting. When we have 1 as the pad bit, we flip the bit to get the decrypted bit. The procedural steps we follow above are applied only when we revert the image back after decrypting using bitwise sequence shifting ,so that the image can be knowledgeable to the destination, then the image will be make free from the noise and the result is in the fig.

CONCULUSION
While the XOR operation has only half chance of outputting false or true (0, 1).XOR by scrambling an image so that image can be hidden immensely to avoid third party intervention. We use XOR, if we used AND, OR, XOR with the one-time and it's extremely important to understand that AND has a 75% chance of outputting 0 and a 25% chance of outputting a 1. While OR has a 25% chance of outputting 0 and 75% chance of outputting 1. While the XOR operation has a50% chance of Outputting 0 or 1.XOR by encrypting an image. The median filter was once the most popular nonlinear filter for removing imp ulse noise because of its good denoising power and computational efficiency.