if true % code
endSeparate to RGB channelIr = imgcrop(:,:,1);Ig = imgcrop(:,:,2);Ib = imgcrop(:,:,3);% Extract the background (black) region
Igray = rgb2gray(imgcrop);idx = Igray == 0;% Calculate average RGB of the region
Rave = uint8(mean(Ir(~idx)));Gave = uint8(mean(Ig(~idx)));Bave = uint8(mean(Ib(~idx)));
MATLAB: I have tried the coding. But i don’t understand what does mean idx = Igray == 0? Can someone explain it to me.
rgb
Related Question
- Can I apply a graylevel mask on a color image
- How to increase or decrese graythresh value
- How to choose weight (lamda)value for thresholding based intensity contrast and variance
- How to Separate the RGB channels from an image and get the average of each RGB channel separetly
- Standard deviation array double
- I have written a code to hide a grayscale image within a rgb image.but while decrypting.the rgb image is retrieved.but the grayscale image is not.a black image is displayed instead.
Best Answer