1
$\begingroup$

I am working on some code for estimating the position and orientation of a camera. From an image taken by the camera I require that the user select lower left interior corner: green, the lower right interior corner: blue and the upper left interior corner: red: enter image description here

Knowing the number of columns and rows I then calculate the approximate position of each interior corner from these points. Using a window around the approximate corners I find the corners more exactly. This works fine.

However I cannot change to another target with a different number of columns and rows without changing my code.

Is there some simple and robust way I can find the number of columns and rows?

The image may be rotated but the skew should be small and the x and y scale known.

We can assume that the number of rows and number of columns are within the range: [2,50].

$\endgroup$

1 Answer 1

1
$\begingroup$

If you already have the corners indicated in the image this is relatively easy: Get the intensity profile of a line a little to the left of the red-green connecting line and count the number of minimums (=number of black square) to get the number of rows. Do the same for the green-blue line to get the number of columns.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.