What is wrong with the attached contour dectection code?

The attached code opens webcame with bounding box. The bounding box is for the hand. The code should capture the image of the hand in the bounding box, detects
Code is supposed to do following things.
  1. Opens webcam with bounding box for hand
  2. The image of hand is captured by pressing spacebar key
  3. The hand image is cropped
  4. Skin is detected from the cropped image of hand
  5. draw contour of hand in white color on black image
But it is not doing so. Please help me.

댓글 수: 5

Explorer - what is happening when you run your code? Please describe.
Explorer
Explorer 2019년 11월 29일
편집: Image Analyst 2019년 11월 29일
Getting only black image in the end. No any countour on it. I suspect that there is something wrong with contour function. What do you say?
Image Analyst
Image Analyst 2019년 11월 29일
편집: Image Analyst 2019년 11월 29일
If nothing is wrong with the image capture part, can you attach the image file so we can concentrate on just the contour detection part of the code?
I looked over the code. If you have done color segmentation and have a binary image of the hand/skin, then why do you need to go on and use activecontour() on it? What does that buy you???
My goal is to find contour of hand. Hand image is as follows.
test_image.jpg
Other hand images will be like
test_image2.jpg
test_image3.jpg
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 30일
편집: KALYAN ACHARJYA 2019년 11월 30일
More: you can easily segment those hands based on image preprocessing and thresholding.

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

답변 (0개)

질문:

2019년 11월 29일

편집:

2019년 11월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by