Removing body hair from an image

Status
Not open for further replies.

Ticky

Senior member
Feb 7, 2008
436
0
0
I need to remove body hair from the image of an arm. I have access to Matlab, and I'm pretty decent with image processing.

I haven't been able to come up with a filter that removes body hair...

Also, let's assume that the body hair is sparse, and there are relatively few intersections.

The hair keeps getting in the way of my edge detection, and looks retarded.

TIA.
 

Paperdoc

Platinum Member
Aug 17, 2006
2,438
344
126
If there are few hairs to edit out, how about trying the photo "scratch remover" tool commonly used on old snapshots?
 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
What exactly are you trying to achieve? Are you just trying to find the outline of the arm itself? If so, play with the parameters of the edge finding filter and you should easily be able to remove this problem. Specifically, the size (often called the standard deviation) of the filter will do this very quickly.
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
Why not use a noise filter? Hair is quite often removed by most spatial noise filters with higher filter levels. Check out Avisynth for them.
 

Ticky

Senior member
Feb 7, 2008
436
0
0
If there are few hairs to edit out, how about trying the photo "scratch remover" tool commonly used on old snapshots?

I need to do this a lot of times, on a lot of image (aka video), so it needs to be automated.
 

Ticky

Senior member
Feb 7, 2008
436
0
0
What exactly are you trying to achieve? Are you just trying to find the outline of the arm itself? If so, play with the parameters of the edge finding filter and you should easily be able to remove this problem. Specifically, the size (often called the standard deviation) of the filter will do this very quickly.

I'm trying to pick out certain features on the arm. I'm trying to remove the hair without removing the other details of the image.
 

Ticky

Senior member
Feb 7, 2008
436
0
0
Why not use a noise filter? Hair is quite often removed by most spatial noise filters with higher filter levels. Check out Avisynth for them.

I was hoping for something more specific than just a low-pass filter... I can do that, but it's really not optimal.
 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
I'm trying to pick out certain features on the arm. I'm trying to remove the hair without removing the other details of the image.
Do you have the image analysis toolbox? If so, it's pretty straightforward I think. If not, it'll be a bit more complicated to implement filters and such on your own. What kind of edge finding filters are you using now?
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
I was hoping for something more specific than just a low-pass filter... I can do that, but it's really not optimal.
Whats the application? A good spatial noise filter will preserve the edges without too except for in the solid colors. As well, you can do the filtering yet output the edges on the original picture. No need to show how the filter is working, you just to output the edges.
 

Ticky

Senior member
Feb 7, 2008
436
0
0
Do you have the image analysis toolbox? If so, it's pretty straightforward I think. If not, it'll be a bit more complicated to implement filters and such on your own. What kind of edge finding filters are you using now?

I've got the toolbox. After some more experimentation, I've been able to get canny edge detection to work, so that's less of an issue, but canny sure takes it's sweet time. At this point, I'm more worried about the hairs being distracting.

Whats the application? A good spatial noise filter will preserve the edges without too except for in the solid colors. As well, you can do the filtering yet output the edges on the original picture. No need to show how the filter is working, you just to output the edges.

The application is preparing images for feature detection. Yeah, if I apply a low-pass filter, and then morphologically close and open, I can find the edges ok. And I figured out to output the edges to the original. Took me a while to get to this point. Mostly at this point, it's just cosmetics, and the possibility of hairs occluding features, as the hairs are raised up off the surface.

Thanks all.

Edit: Also, if this is impossible, I'm willing to live with that, I just wanted to see if anyone had any brilliant suggestions.
 
Last edited:

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
I've got the toolbox. After some more experimentation, I've been able to get canny edge detection to work, so that's less of an issue, but canny sure takes it's sweet time. At this point, I'm more worried about the hairs being distracting.



The application is preparing images for feature detection. Yeah, if I apply a low-pass filter, and then morphologically close and open, I can find the edges ok. And I figured out to output the edges to the original. Took me a while to get to this point. Mostly at this point, it's just cosmetics, and the possibility of hairs occluding features, as the hairs are raised up off the surface.

Thanks all.

Edit: Also, if this is impossible, I'm willing to live with that, I just wanted to see if anyone had any brilliant suggestions.
Yes, I was going to suggest using a morphological opening after finding the edges with a Canny filter. This would eliminate small edges such as hairs without altering the larger edges, which seems to be what you're after. Just set the size of the opening filter to a little larger than half the diameter of a hair and you should be good to go.
 
Status
Not open for further replies.