How to apply color to the image so i m able to binarize it and crop it afterward.

i am newbie to matlab and currently i m doing the finger vein image processing. The question is how do i apply white color to the finger vein n black colour to the background after i used edge detection with prewitt method. And how do i crop the finger vein region after i binarize the image. I do know need to use imfill() and imcrop() functions, but i do not understand the parameters of these functions. Please provide some examples to me if possible. That helps me to understand it better.

3 Comments

If you provide an example image we may be able to assist you better.
As a rough introduction to image processing and segmentation in Matlab, check out Image Analyst's author page on the file exchange for tutorials on segmentation and 'doc imfill' and 'doc imcrop' should provide examples for each function as well.
tis is the sample image i need to do preprocessing.
I can't even see the veins in that picture so it's going to be very difficult or impossible to find them with image processing when you start with an image that bad.

Sign in to comment.

Answers (1)

Basically you do something like this:
BW = edge(I,'prewitt');
BW = imfill(BW, 'holes');
Then see my image segmentation tutorial "BlobsDemo" <http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862>for how you can use regionprops() to get the bounding box of all the blobs and crop them out to separate images. It will also show you how to filter the blobs based on things like blob size, etc.

Asked:

on 3 Jul 2012

Community Treasure Hunt

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

Start Hunting!