can anyone say the simple definiton of pixel intensity? i am cse student so doesnt know exactly what it is?i want the simple definition with example? and also in the following code is used for encryption i also want the brief description of each line

cover_bi=de2bi(a_co1);
cover_bi1=cover_bi;
so_bi1=xor(cover_bi(:,1),mask1);
cover_bi(:,1)=so_bi1;
so_bi2=bi2de(cover_bi);
em_en=reshape([so_bi2; a_co(length(mask1)+1:end)],[size(CA)]);
figure,imshow(em_en,[]),title('Encrypted');

8 Comments

Can you format your code properly? Did you try searching for some of the functions that are included in your code?
the above code is used for encrypting an image..i got that code while browsing and code has been executed the thing is that i exactly don't know the meaning of above code ..so can you please explain each line of the code? and also to the question asked about what is pixel intensity?
We have no idea what your level of computer experience is. Explaining the lines might require writing two or three textbooks.
Thank you Walter Sir. I know the basics of matlab.i don't know in depth. so asked for the short explanation. Thank you
i got that code while browsing
Using random code of unknown quality off the internet is not a good idea. The first 5 lines are just a complicated and sloooow way of doing:
so_bi2 = bitxor(a_co1, mask1); %assuming that mask1 is a decimal number.
encrypting an image
xor encryption is trivial to defeat and can be cracked in no time at all. There's only 255 keys to try.

Sign in to comment.

 Accepted Answer

These are some of the functions that you code uses. As a general rule, this is not a homework site, so you need to tell us what you have already tried, and what is it you don't understand.
Pixel intensity is just a representation of what the brightness of the pixel is. For an 8-bit image this value ranges from 0-255. For a grayscale image it is the grayscale value itself, and for an RGB image intensity can be imagined as an average of red, green, and blue in the HSI space. HSI is hue, saturation, and intensity. There are plenty of good resources on the net for beginners, like HSI

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!