we have segmented the a color image into three planes , now we want the merge the similar color regions of the three segmented images ? can anyone suggest the matlab code plz?
Show older comments
segmentation of color image
Answers (1)
Image Analyst
on 20 Apr 2013
Please explain so I don't have to guess: So you "segmented" the color image into 3 color planes, like this:
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
I wouldn't really call that segmentation, but whatever.... Now I have to figure out what are "similar color regions". I have no idea what this is. Do you mean pixels that have fairly similar gray value in each of the 3 color channels? If so, you're basically looking for neutral colored regions (black, gray, white) and you can just look for low saturation
hsv = rgb2hsv(rgbImage);
saturationImage = hsv(:,:,2);
neutralColors = saturationImage < 3; % or whatever value you want.
Now you say you want to merge them, and this is where I don't even have a good guess as to what this means? Merge intensities? Merge spatial regions? I have no idea.
Categories
Find more on Blue in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!