OpenCV_Position
This algorithm calculates the position of a camera from a video feed. A symbol with known dimensions is extracted from the video and used to create a homography. The homography is then decomposed into a rotational matrix and translation matrix.
DemoVideo: https://drive.google.com/file/d/0BwbCtxfgDW3-UTZieW85QzhoUW8/view?usp=sharing
Algorithm Steps
- Get Frame
- Gaussian Blur Grey Scale Image
- Canny Line Detection
- Contour Detection (OpenCV Detect Contour)
- Contour Selection
- 12 Sides
- Perimeter Threshold
- Internal Angle Threshold
- Homography From Image to Undistorted Symbol
- Remove Camera Matrix
- Decompose Homography (Fast Homography Decomposition Zhang)
Dependencies
- Python 2.7
- Opencv 2
- Numpy
- Scipy
Configuration
- Camera Matrix
- Symbol “H”