Hair removal algorithm development
As a prepossessing requirement of my project I have to remove skin hairs from the image. For this I found an already existing program. The implementation is done in Matlab.
The above link quotes the following
As for the above part which mentions generalized grayscale morphological closing operation
I could not find out what it meant and not being able to implement it in Matlab either
Currently what I need to do is simply
I was wondering if you could suggest any methods that could be used for the implementation of this algorithm (edge detection and such) as currently so far all attempts havent worked out properly. Any matlab functions that could be used would be very helpful as well. Also was wondering on what method that I could use to verify the pixels as thin and long structures
Updated : As I am new to image processing I do not have any prior knowledge of what methods to use on how to identify the hair pixels, verify them and replace them with neighboring pixels, thus the requesting of guidance
I will assume that you understand what a grayscale image is and operations upon it are. If not, edit your question to clarify.
The Matlab Image Processing Toolbox includes the imclose function. Morphological closing is explained on Wikipedia. The Internet is awash with information about mathematical morphology for image processing.
EDIT after comment
This page gives a general introduction for mathematical morphology for image processing. One view of what you are trying to do is remove noise from your image, where that noise is expressed as long(-ish) thin(-ish) dark elements against a light background -- if, that is, the hairs are dark and the skin is light. This isn't an application I've looked at so I can't provide any more help. Have fun.
The sequence of operations are 1.Identify hair pixels 2. Verify hair pixels 3. Replace hair pixels with neighboring skin pixels. This is mainly because morphological open filters are grayscale or scalar filters. Thus the problem in color images can be solved by either finding a good color space (usually tough as your background varies), or perform closing(like the answer above states: if hair is dark and background is light) filter on each channel and interpolate over the others, which is the current solution.
Thus we can have a look at what matlab gives with what is mentioned in the paper to detect the elongated hair structures:
se1 = strel('line',10,90);
se2 = strel('line',10,180);
figure, imshow(imclose(imclose(I,se1),se2),[]) % this closing is done channel wise independently.
For complex backgrounds a good color space features is necessary. Here is works more or less since the color image is ordered(red>green>blue , or some such order - you can verify this)
The problem now is to interpolate over the missing values since the closing leaves some artifacts. one can use interpolation median filtering as suggested in Lee T, Ng V, Gallagher R, Coldman A, McLean D. DullRazor: A software approach to hair removal from images. Computers in Biology and Medicine 1997;27:533-543.
Another simple idea would be perform rgb2gray(I) -> Morhological closing using linear structures -> map back grayscale to RGB tones. The mapping back is simple if the background color space does not change too much and is robust!
链接地址: http://www.djcxy.com/p/10502.html下一篇: 脱毛算法的发展