How is result of cornerSubPix() written into pointBuf?
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.
When you look at the documentation of
cornerSubPix()
, you see thatcorners
is anInputOutputArray
which allows to modify the array.