Find moment(x,y axis) of interested object [closed]

asked 2014-01-24 07:30:07 -0600

Dhineshram gravatar image

updated 2014-01-24 09:16:02 -0600

Hi to All, I am doing a project where I have to track a red ball using Hue channel,for that I did thresholding to filter red color from image.

Later I have to find the moment(x,y axis) of filtered red ball in binarized image(track the cenroid of the red ball).After search I found findcontour and moments methods are used to accomplish this. I have difficulties to do this in C language. I am using c language for programming.

Thanks in Advance

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-04 16:34:34.442077

Comments

... let me translate your question ... hello, I am a student, I have a project which needs to be ready by the end of the month, I cannot try and solve my own problem and now want your help to solve my complete problem with the least amount of effort.

That being said, please make use of all those great examples out there. Your problem is contained in at least 4 official tutorials. Take a look here and come back when you have a real question.... Also, switch to the C++ interface, it will make your life much more adorable, making use of all those smart pointers!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-01-24 08:15:46 -0600 )edit

Thanks for concluding my question by your own . I already done tracking and can get moments(x,y axis) with C++, I have difficulties doing in C language.I wanted to ask my question in simple way, for last question I got few more suggestion that was my only moto . To move further in my project I have to do this in C language .Thanks for the link .Here all level of people have questions.

Dhineshram gravatar imageDhineshram ( 2014-01-24 09:04:09 -0600 )edit

If you persist/have to do this in C, then take a look at the C-style samples in your source folder. Most of the tutorials (especially the older ones) still got a C-style variant lying around in the samples folder that comes with the openCV package.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-01-27 02:04:47 -0600 )edit