Converting image to suitable form?

1 回表示 (過去 30 日間)
Jason
Jason 2011 年 6 月 23 日
Hi there, I need some help here.
So, this image has to pass through a filter (Gabor Filter), and I figured out that the size of the image does affect the time taken for the process to complete. Thus, I tweaked a little with the dimension of the image prior to the filtering process and came up with 2 sets of output.
  1. Size of image (before passing it through the filter) unchanged. http://www.flickr.com/photos/jokerzy89/5862929339/sizes/l/in/photostream/
  2. Image resized to 256 by 256 (before filtering). http://www.flickr.com/photos/jokerzy89/5863480928/sizes/m/in/photostream/
Next, I intend to calculate the moments of these 2 images, however, I have no idea how to proceed. My guess is that these images have to be converted to that of type logical before I can calculate the respective moments.
Refer to this question that was asked yesterday: http://www.mathworks.com/matlabcentral/answers/10022-creating-2d-geometric-shapes I might need to thin the contour lines of the hand gesture.
To summarize things, I need help with manipulating the output images in such a way that the white edges are preserved. So, the new output would be something like white hand contour lines on a black background. Also, it is best that the contour lines be thinned.
Can anyone please help me? Thanks!
  2 件のコメント
Sean de Wolski
Sean de Wolski 2011 年 6 月 23 日
Moment of whole hand or of fingers?
Jason
Jason 2011 年 6 月 23 日
Hi Sean, it would be the whole hand.

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

採用された回答

Sean de Wolski
Sean de Wolski 2011 年 6 月 23 日
I personally always try to work a logical map of the target. This segments the hand and gives you a logical map and a map edge if you want that too.
%%Your image
I = imread('ans623.jpg');
%Image Map
[M Medge] = shrinkWrap(255-I(:,:,3),'objthresh',4500);
%check?
subplot(121),
imshow(I);
title('Original Image');
subplot(122)
imshow(bsxfun(@times,uint8(M),I));
title('Map applied');
%Do stuff with M.
  11 件のコメント
Sean de Wolski
Sean de Wolski 2011 年 6 月 23 日
Depends on what you mean by clean up. My first goal in any image processing project is to make a map. That way further computations need only be applied to the parts I care about.
Jason
Jason 2011 年 6 月 23 日
I don't know but I feel that it's too late to start with this map thingy. Maybe some other time, when my project is over. I am going to learn this. Thanks a ton!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by