フィルターのクリア

How to remove the shadow around the hand image

2 ビュー (過去 30 日間)
fred grahambel
fred grahambel 2015 年 12 月 3 日
コメント済み: Rena Berman 2017 年 1 月 24 日
Hello everyone,
I have some hand database and when i want to do the segmentation the shadow around the hand border also combine in the image boundary an it makes the hand boundary bigger. I really want to get rid of the shadow around the hand which i can then use the segmentation method to get the correct boundary.
sample images are attached.
Thanks
  1 件のコメント
Rena Berman
Rena Berman 2017 年 1 月 24 日
(Answers dev) Restored question.

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2015 年 12 月 3 日
You can do it all in one step - no need to remove shadow and then afterwards segment. Just segment properly in the first place and you're done. Just convert to hsv color space, threshold on the s channel and that's your mask. Multiply by your RGB image if you want to blacken outside the hand.
hsvImage = rgb2hsv(rgbImage);
sImage = hsvImage(:,:,2);
mask = sImage > 0.1; % Or whatever value works.
% Mask the image using bsxfun() function
maskedRgbImage = bsxfun(@times, rgbImage, cast(mask, 'like', rgbImage));
  2 件のコメント
Image Analyst
Image Analyst 2015 年 12 月 4 日
I didn't tell you to do any of that.
Why do people think edge detection is the be-all, end-all of image processing methods when most of the time it's not appropriate (like in your case)?
Why don't you try my code instead?
Image Analyst
Image Analyst 2015 年 12 月 4 日
Unfortunately, the the light bouncing off your fingers is coloring the light that falls onto the white background, making color segmentation difficult. To fix it, you can either use a backlight (like a radiologist's type of lightbox), or hold your hand farther away to make the shadows less defined, or use a different color background - something the opposite of red like green or blue, or even black would be better. The ideal background would be black velvet, with lighting coming from the camera side of the hand. Failing that then the next best is a white light box behind the hand to essentially make a silhouette. About the best I could do in a few minutes is this:

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by