mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-24 23:15:46 -05:00
vault backup: 2023-03-30 14:11:07
This commit is contained in:
parent
38d77c3422
commit
abc3930a3e
@ -96,8 +96,67 @@ TRANSFORMING CAMERAS
|
|||||||
> only need to apply inverse matrix to the 3d points of the world
|
> only need to apply inverse matrix to the 3d points of the world
|
||||||
|
|
||||||
TRANSFORM THE WORLD (!)
|
TRANSFORM THE WORLD (!)
|
||||||
- To transform a camera by
|
- To transform a camera by $T$
|
||||||
- Apply inverse, , to points
|
- Apply inverse, $T^{-1}$ , to points
|
||||||
- To move the camera left 3 units, move the world right 3 units
|
- To move the camera left 3 units, move the world right 3 units
|
||||||
- To rotate the camera about , rotate the world about
|
- To rotate the camera $45⁰$ about $Z$, rotate the world $-45⁰$ about Z
|
||||||
- The relative motion of the camera and the world is the same
|
- The relative motion of the camera and the world is the same
|
||||||
|
|
||||||
|
ROTATE AND TRANSLATE A CAMERA
|
||||||
|

|
||||||
|
|
||||||
|
CAMERA CALIBRATION
|
||||||
|
```
|
||||||
|
double cv::calibrateCamera(
|
||||||
|
// Input parameters
|
||||||
|
//std::vector> objectPoints,
|
||||||
|
//std::vector> imagePoints,
|
||||||
|
//cv::Size imageSize,
|
||||||
|
// Output parameters
|
||||||
|
//cv::Mat cameraMatrix,
|
||||||
|
//std::vector distCoeffs,
|
||||||
|
//std::vector rotationVectors,
|
||||||
|
//std::vector translationVectors);
|
||||||
|
```
|
||||||
|
|
||||||
|
CALIBRATION TARGETS
|
||||||
|
- Input is 3D-2D matches
|
||||||
|
- Want easy-to find 2D points
|
||||||
|
- Need known 3D co-ordinates
|
||||||
|
- Planar targets common
|
||||||
|
- Easy to make with a printer
|
||||||
|
- Chess/Checkerboards
|
||||||
|
- Grids of dots or lines
|
||||||
|
- Is a 2D pattern enough?
|
||||||
|

|
||||||
|
|
||||||
|
3D POINT LOCATIONS
|
||||||
|
- Choice of co-ordinates
|
||||||
|
- X-Y plane is the target
|
||||||
|
- Origin at one internal corner
|
||||||
|
- Z runs into the target plane
|
||||||
|
- Need to decide on units
|
||||||
|
- Best to use real-world units
|
||||||
|
- Here 1 square = 1cm
|
||||||
|
- Can use 1 square = 1 unit
|
||||||
|

|
||||||
|
|
||||||
|
FINDING CHECKERBOARD CORNERS
|
||||||
|
- OpenCV method (in brief)
|
||||||
|
- Threshold image to B&W
|
||||||
|
- Look for quads
|
||||||
|
- Link quads -> checkerboard
|
||||||
|
- Sub-pixel refinement
|
||||||
|

|
||||||
|
|
||||||
|
MATCHING 2D TO 3D POINTS
|
||||||
|
- Corners are in rows/cols
|
||||||
|
- View of all corners required
|
||||||
|
- Aligns 2D corners to 3D target point locations
|
||||||
|
- Targets often odd-sized
|
||||||
|
- Example here is 7x6
|
||||||
|
- Why is this better than 8x8?
|
||||||
|
- Is this required?
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user