For a different take on the idea, including a GUI tool for selecting a desired color region and for visualizing the segmentation results, see Image Analyst's new MATLAB Central File Exchange contribution, "Color segmentation by Delta E color difference."
3 CommentsOldest to Newest
hai steve . Am sorry am commenting here. I do not know hw else to ask you my question. I have this image which is an Ir image capturing veins: http://lastqueen21.blogspot.com/2011/04/image.html. I want to retain just the veins as black and get rid of eveything else. This is what I have done till now .
cform = makecform(‘srgb2lab’);
for ii = 1:3
a(:,:,ii) = medfilt2(a(:,:,ii),[5 5]);
lab = applycform(a,cform);
g = color(:,:,2);
b = color(:,:,3);
color = cat(3,r,g,b);
I want to make the backgroung white. And then somehow eleiminate the other parts except the veins . So how do I go about this ?? Sorry agin to comment here about this :(
Khadeejah—I experimented for a few minutes with your image but did not get a promising result. I don’t think a color-based segmentation technique is going to be promising. Possibly you could use grayscale morphology operations with linear structuring elements oriented at different angles to emphasize and then segment the veins.
hai steve …. thank u so much …! :D I will try what you have suggested :D !