Ask Your Question

about findcountour

asked 2019-12-31 09:57:48 -0600

dineshlama gravatar image

what kind of function is findcontour function? For example when this function is used eg: findContours( fgMask, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0) ); This function takes the return type i.e contours, hierarchy as an argument? What is this technique called in c++? i'm asking cas i am also trying to make a function similar to this but have no idea how this is done.

edit retag flag offensive close merge delete


What is this technique called in c++?

"pass by reference"

(unlike python or go, c/c++ functions can only return a single result)

berak gravatar imageberak ( 2019-12-31 10:31:39 -0600 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2019-12-31 10:26:56 -0600

mvuori gravatar image

If you know C++, you should know that if a function should modify something given as a parameter, that something is passed as a pointer or a reference. That's what OpenCV does, but hides it neatly with typedefs.

edit flag offensive delete link more


looks like i forgot about this, or didn't noticed this.

dineshlama gravatar imagedineshlama ( 2019-12-31 22:34:30 -0600 )edit

answered 2020-01-01 01:26:05 -0600

A contour is a closed curve of factors or line segments, representing the boundaries of an object in an image. In different words, contours signify the shapes of objects located in an image.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-12-31 09:57:48 -0600

Seen: 317 times

Last updated: Jan 01 '20