I have an image in Matlab which I want to crop based on the intensity profile. Below is my image.
I want to crop out the blue portion of the image based on the intensity profile. For example, based on the intensity profile, I want to crop the part of the image where the intensity of blue is higher than the other colors. Below is my sample code and example.
hFig = figure ; subplot(1, 2, 1 ); rgbImage = imread('Intensity1.jpg '); imshow(rgbImage ) subplot(1, 2, 2 ); croppedImage = rgbImage(200 : 400 , :, :); imshow(croppedImage);
In the image above, it can be seen that the blue portions still remain in the image which I don't want. Any help would be very much appreciated. Thank you.
Best Answer