Ask Your Question
0

Remove Fingers In a Image

asked 2013-11-20 23:06:39 -0600

pats gravatar image

updated 2020-10-23 04:34:14 -0600

image description

Please see the Image below. As you can see it has a part of finger (bottom-right). How do I to some extent Identify it and color it black. That is retain the rest of image but remove in different part in the image.

I have the image with the card without finger as well. Which can be placed in a same size image in the same location.

What would be the approach and what functions can I use.

Thank you Regards Pati

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-11-21 05:48:08 -0600

Guanta gravatar image

Before applying too sophisticated methods, I'd try to detect the finger according to its skin color. So just use some threshold(s) to detect the skin color, set a mask according to it and fill the mask with the part of your saved card. Maybe converting to a different color space like HSV will work better than in RGB.

edit flag offensive delete link more

Comments

1

HSV is indeed much handier to detect skin color. There are tons of examples of skin color based hand and arm segmentations. Just google for it :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-11-21 06:17:12 -0600 )edit

Thank you for your response. I used (http://www.academia.edu/4609424/Skin_Detection_using_HSV_color_space) and tried what you said. It identified part of the skin. But didn't identify the Nails. In my case, I always have the fingers, with nail part. Because the objective is to identify the card part of the image and replace it a different card preserving the fingers on top.

Can we use image difference techniques , since I have a card Image without fingers.

Thanks

pats gravatar imagepats ( 2013-11-21 22:15:30 -0600 )edit

if it is in the exact same position, indeed image differencing will give you the locations that are not identical, like the fingers. However, a slight change in illumination between both images will crush this approach.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-11-22 01:50:59 -0600 )edit

Any other way I can do this. Given that the colors of the card and color of the finger is always different. And color of the card known before hand. However, the birgthness and contrast can vary

pats gravatar imagepats ( 2013-11-24 15:31:58 -0600 )edit

If contrast and brightness vary, you might want to train a finger model and detect the finger region. Then replace the detected region. Look at the cascade classifier in documentation.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-11-25 02:45:40 -0600 )edit
1

Hmm, maybe that's now too difficult. Since pats has the ideal back of the card and now wants to recover the hidden part, I'd now do it the following way: Compute the homography between your reference card and the card in the images, then you can determine exactly which part you need to replace. The feature matching and finding of the homography is described here: http://docs.opencv.org/doc/tutorials/features2d/feature_homography/feature_homography.html#feature-homography

Guanta gravatar imageGuanta ( 2013-11-25 04:47:09 -0600 )edit

Yeah that could yield a solution, but homography is not contrast and brightness independent?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-11-25 04:53:37 -0600 )edit
1

Well, he should use features which are invariant to these effects (e.g. SIFT should be pretty invariant). However, in one sense you are right, the replacement by the reference card will probably be visible due to the different illuminations. This indeed would be much more difficult to incorporate (estimating the illumination etc.), but for a simple replacement of the visible card with the reference card with the correct affine/projective transformation, the approach should work fine (if enough of the card is visible, enough features are generated and the feature matching works).

Guanta gravatar imageGuanta ( 2013-11-25 05:00:09 -0600 )edit

You are right there, let him try out :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-11-25 05:58:49 -0600 )edit

Thanks for the response. The image you see above is after using SIFT and homography on a bigger image comparing the bigger Image with ref image (i.e. the method shown in that URL). However, it did not exclude the fingers. homography matrix included the fingers. To provide more info. The finger could be any edge of the image. And it could be any finger (Most likely Thumb and index finger). However, more than 90% of the back side of the card will be visible.

pats gravatar imagepats ( 2013-11-25 15:46:33 -0600 )edit

Question Tools

Stats

Asked: 2013-11-20 23:06:39 -0600

Seen: 1,360 times

Last updated: Nov 21 '13