Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8241863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:58:24+00:00 2026-06-07T20:58:24+00:00

This is my source image (ignore the points, they were added manually later): My

  • 0

This is my source image (ignore the points, they were added manually later):

enter image description here

My goal is to get a rough polygon approximation of the two hands. Something like this:

enter image description here

I have a general idea on how to do this; I want to use cvCanny to find edges, cvFindContours to find contours, and then cvApproxPoly.

The problem I’m facing is that I have no idea on how to properly use cvCanny, particularly, what should I use for the last 3 parameters (threshold1&2, apertureSize)? I tried doing:

cvCanny(source, cannyProcessedImage, 20, 40, 3);

but the result is not ideal. The left hand looks relatively fine but for the right hand it detected very little:

enter image description here

In general it’s not as reliable as I’d like. Is there a way to guess the “best” parameters for Canny, or at least a detailed explanation (understandable by a beginner) of what they do so I can make educated guesses? Or perhaps there’s a better way to do this altogether?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:58:26+00:00Added an answer on June 7, 2026 at 8:58 pm

    Maybe one of the easiest solution is make Otsu thresholding on grayscale image, find contours on the binary image and than approximate them. Here’s code:

    Mat img = imread("test.png"), gray;
    vector<Vec4i> hierarchy;
    vector<vector<Point2i> > contours;
    
    cvtColor(img, gray, CV_BGR2GRAY);
    threshold(gray, gray, 0, 255, THRESH_OTSU);
    findContours(gray, contours, hierarchy, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE);
    
    for(size_t i=0; i<contours.size(); i++)
    {
        approxPolyDP(contours[i], contours[i], 5, false);
        drawContours(img, contours, i, Scalar(0,0,255));
    }
    
    imshow("result", img);
    waitKey();
    

    And this is result:

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have Image like this (source: de-viz.ru ) I want to get something
So I have Image like this (source: de-viz.ru ) I want to get something
I have this method that changes an larger image source on click. I need
I'm seeing this in the Debugger Console: <Error>: CGImageSourceGetType image source parameter is nil\n
I have something like this in my xaml: <Grid> <Image Name=image Source=../../Images/DefaultImage.png HorizontalAlignment=Stretch VerticalAlignment=Stretch></Image>
I'm looking to make an image that's just noise, maybe something like this: (source:
I have this source data [gallery] Title [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [galleryitem]http://www.google.com/image.jpg[/galleryitem] [/gallery]
i have this source in flex - easy program which switch between two states..in
So I have an image like this (source: bytearray.org ) Is there any algorithm
I have 1 image (source) stored in one server (this server is only an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.