how to exclude last row's last 16 pixels

image is size 512*512 i want to exclude last row's last 16 pixel.. that is last row dimension like 512*497 other rows dimension 512 * 512
need matlab code ?

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 18 Sep. 2015

0 Stimmen

MATLAB does not support arrays with different number of elements in different rows. You will need to program your code to not process those locations, or you will need to program your code to ignore those locations.
In a lot of cases in image processing, it would be enough to set those pixels to 0.

5 Kommentare

ARJUN K P
ARJUN K P am 18 Sep. 2015
ok sir, how i ignore the last row's last 16 pixels?
my aim is to read a image... and generate histogram ignore image's last row's last 16 pixels.? can you help me sir
Generate histogram of what ?
imgcopy = YourImage .';
imgcopy(end-15:end) = []; %and now it is a vector
histogram(imgcopy)
ARJUN K P
ARJUN K P am 19 Sep. 2015
the work is: data hiding
read the image, ignore image's last row's last 16 pixels. genereate histogram and find the highest 2 peak values.. embed data on the 2 peak values and finaly embed the 2 peak value into the ignored 16 pixels
Walter Roberson
Walter Roberson am 19 Sep. 2015
Again, a histogram of what ? A histogram of Hue? A histogram of Magenta from a CMYK converted version of your RGB image? A histogram of occurrences in each row, of the brightness that occurs most often in the image?
If we assume that the histogram is of counts of the number of occurrences of each of the 256 different brightness levels of a grayscale image that has been represented in uint8 form, then supposing that we found the two highest counts. Perhaps one of the brightness levels occurred 1403 times and another occurred 1377 times. So now we have to embed data into the number 1403 and the number 1377 ? Okay, so I modify 1403 to become (say) 1402, and I modify 1377 to become 1211. Now do I store the original 1403 and 1377 into the last 16 pixels, or do I store the modified versions 1402 and 1211 in the last 16 pixels? Well, we have 16*8 (possibly *3) = 128 or 372 bits of storage available in the last 16 pixels, so we can store them both. As long as the counts do not exceed 2^32 (4 bytes) we can store both versions. But 2^32 is only certain to be enough to store the counts for a 65536 by 65536 image, and we have no promise that the image will be so small. Now what?
Image Analyst
Image Analyst am 19 Sep. 2015
Walter told you how to do what you originally asked, but now it's clear you're trying to replicate some algorithm in a steganography or watermarking article, and you're going to have question after question about an article we have not seen. So see this link.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by