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 8552059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:20:12+00:00 2026-06-11T14:20:12+00:00

i want to form an irregular shape of the hand using its edges so

  • 0

i want to form an irregular shape of the hand using its edges so that i can find the centroid of this hand using http://opencv.itseez.com/doc/tutorials/imgproc/shapedescriptors/moments/moments.html?highlight=moment#code. the canny function cuts the edges so i can’t get a good contour out of it.
here’s a sample of the output http://imageshack.us/photo/my-images/208/cannywithblur.png/
and code.

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace cv;
using namespace std;

int main(){

    cv::Mat image= cv::imread("open_1a.jpg");
    cv::Mat contours_mat;
    cv::Mat gray_image;

    blur( image, image, Size(3,3) );

    cv::Canny(image,
        contours_mat,
        40,
        120);
    cv::namedWindow("Image");
    cv::imshow("Image",image);
    cv::namedWindow("Canny");
    cv::imshow("Canny",contours_mat);
    cv::waitKey(0);
}

i want to get a contour that is closed shaped and only one contour. how can i do this?

  • 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-11T14:20:13+00:00Added an answer on June 11, 2026 at 2:20 pm

    You can try to apply a morphological closing of your binary image, which should connect the edges that have a gap wich is less than the size of your structuring element.

    Corresponding function in the documentation

    Tutorial on morphological operations

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

Sidebar

Related Questions

I want a form where user can change password. I am able to encrypt
Im using jquery and want each form text input to appear one by one,
I'm trying to create a splash screen using LWUIT. I want a form to
I want that the form will not close by doing Alt + F4 but
i have a form input..i've been made it using jquery... i want my form
I am using Dojo Toolkit and I want form elements to serialize into array,
I want to build a login form that displays in a sidebar across every
So I have a form that I want the user to use to update
I am using the following form builder ( http://dontlink.me/formbuilder/ ) and making lots of
Basically i want a form that retrieves the value 1 or 0 to see

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.