python - OpenCV find object's position with solvePnPRansac with not-corresponding points -


By tracking a known 2D LED pattern on the object, find the position of the object in relation to the position of the camera in the real world coordinates I am trying to

I calibrated the camera I was able to successfully identify the LED in the pattern and find their exact coordinates in the image frame. These numbers do not correspond exactly 1 to 1 for the coordinates known in patterns, they are in random order. Correspondence like important tasks or, which would be to use my first choice.

How can I get the correspondence between these points or perhaps some other function should be used such as solving PNPRansac such as the way you guessed the relative currency between your object and your camera Do not ask about, as you do not know

To get a unique 1-to-1 correspondence set, the LED pattern you use can not be clear about the rotation. For example, you can use a regular NXN grid, an extra LED with a top-left cell, or an LED on a circle with an additional LED inside a single cycle. Then, depending on the method pattern to find the dialog, you have selected.

In the case of circle patterns, you can do the following:

  1. Estimate the center of gravity of the digit
  2. Find the imbalance point, No one is lying on one cycle, and defines the closest to other points as the first point
  3. Increasing the angle in relation to the center of gravity, the order of the remaining points (i.e. clock-wise order)

In the case of regular grid patterns,

  1. Search the four corners of the grid (
  2. Estimate the symmetry that turns these four corners into the corners of a regular nxn square (orthogonal
  3. Convert other points by using Geography
  4. Find unrelated point, which is the only one for which X-floor (X) And Wi-Floors (Y) are close to 0.5, and the first seen point is as four initial Define the nearest closest to the corners
  5. Increase the angle in relation to the center of the grid and sort the remaining points from the decreasing distance in the center of the grid.

> FindChessboardCorners can also study the algorithm used by (see in Calib3d module in calibinit.cpp ), which uses the same approach, order the detected corners.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -