Format of detect corners for detectAndDecode api

Hi Guys,

We could not get a clear answer on the format of the corners returned by detectAndDecode function. We are writing:

std::vector<cv::Point> corners; std::string data = detectAndDecode(sourceImage, corners);

We believe the size of corners would be 4 for valid cases. Now, we would like to know the format of the corners here like 1st index is for top left, 2nd index is for bottom left etc etc.

Thanks in advance for it. Could not get anything related to it online as well.

which function do you mean, exactly ?
(there are a few, but they are all “class members”, so your code is already wrong, missing an “object instance”)

cant find docs, huh ?
(there’s even a search box)

Well, that’s fine. I do not think that you are supposed to paste all code here. This is just a snapshot and I believe serves the purpose of the question.

If you search, this is what you will see: OpenCV: cv::QRCodeDetector Class Reference

And this does not tell you that in which order corners are given.

order seems to be : [bl, tl, tr, br]

1 Like