How can I separate hand from forearm after skin segmentation?

조회 수: 3 (최근 30일)
M
M 2015년 7월 27일
댓글: M 2015년 8월 5일
I'm working on a gesture recognition project. I've carried out skin segmentation and I'm now trying to separate the hand from the forearm before the feature extraction phase. I'm wondering how I would go about achieving this? I've attached an image for reference.
Thanks.

답변 (2개)

Cedric
Cedric 2015년 8월 2일
This could be a start. This is not as solid/stable as what ImageAnalyst proposes though. In French we would call that "bricolage" ;-)
I = im2bw( imread( 'hand.jpg' )) ;
% - Crop white frame.
I = I(~all(I,2),~all(I,1)) ;
% - Crop 10px border to eliminate glitches at the border.
I = I(10:end-10,10:end-10) ;
[nRow, nCol] = size( I ) ;
% - Find first horizontal transition 0->1 from left.
D = diff( I, 1, 2 ) == 1 ;
% - Find first column per row where D is 1.
[~, colId] = max( D, [], 2 ) ;
% - Smoothen colId.
kerSize = round( nCol /10 ) ;
colId_smz = conv( colId, ones( 1, kerSize )/kerSize, 'same' ) ;
figure() ;
set( gcf, 'Units', 'normalized', 'Position', [0.1,0.1,0.8,0.8] ) ;
% - Plot cropped image.
subplot( 2, 2, 1 ) ;
imshow( I ) ;
title( 'Cropped image' ) ;
% - Plot left profile.
subplot( 2, 2, 2 ) ;
imshow( D ) ;
title( 'Left profile' ) ;
% - Plot left profile + smoothen.
subplot( 2, 2, 3 ) ;
y_colId = colId ; y_colId(colId==1) = NaN ;
y_smz = colId_smz ; y_smz(colId==1) = NaN ;
plot( 1:nRow, y_colId, 'b', 1:nRow, y_smz, 'r' ) ;
grid on ; title( 'Profile + smoothen' ) ;
% - Plot difference + smoothen.
subplot( 2, 2, 4 ) ;
dif = diff( y_smz ) ;
dif_smz = conv( dif, ones( 1, kerSize )/kerSize, 'same' ) ;
plot( 1:nRow-1, dif, 'b', 1:nRow-1, dif_smz, 'r' ) ;
ylim( prctile( dif_smz, [5, 95] )) ;
grid on ; title( 'Diff + smoothen' ) ;
With that you get:
Then you have to detect the from the right the point where the smoothen derivative changes significantly.
  댓글 수: 3
Cedric
Cedric 2015년 8월 2일
I will really have to dig in this Image Processing Toolbox! I am currently doing a lot of operations using a combination of MATLAB and ArcGIS for GIS operations, and I am pretty sure that a lot of these operations could be done with the Image Proc. Tbx only.
M
M 2015년 8월 5일
Thank you for your help. I have decided to make things simple and avoid forearm skin detection.

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2015년 7월 27일
  댓글 수: 4
M
M 2015년 8월 4일
Thanks for the ideas, but implementing it is probably out of my reach. I have decided to just eliminate the forearm skin detection (by wearing long sleeve shirts).
Image Analyst
Image Analyst 2015년 8월 4일
If you can do that, that is a far simpler solution.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Detection에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by