How is result of cornerSubPix() written into pointBuf?

asked 2017-03-31 04:22:26 -0600

el_cid gravatar image

updated 2017-03-31 04:23:01 -0600

In the camera calibration example (link , part 3. Find the pattern in the current input ), the presence of chessboard corners is checked detected with the function findChessboardCorners() (link to function doc) and latter detected with higher precision with cornerSubPix() (link to function doc).

What I don't understand is how the corner positions are written into pointBuf, as neither when passed to findChessboardCorners() nor when passed to the latter used function cornerSubPix() this vector of type vector < Point2f> is passed by reference.

Thank you in advance for your answer.

edit retag flag offensive close merge delete

Comments

When you look at the documentation of cornerSubPix(), you see that corners is an InputOutputArray which allows to modify the array.

Eduardo gravatar imageEduardo ( 2017-03-31 06:00:18 -0600 )edit