Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • L laser_plane_scanner
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Cmíral Jakub
  • laser_plane_scanner
  • Wiki
  • estimate_laser_plane

estimate_laser_plane · Changes

Page history
cmirajak created page: estimate_laser_plane authored Aug 17, 2016 by Cmíral Jakub's avatar Cmíral Jakub
Show whitespace changes
Inline Side-by-side
estimate_laser_plane.md
View page @ 6389484f
......@@ -4,7 +4,7 @@ We will use pinhole camera model for finding 3D points in camera coordinate syst
<img src="http://mathurl.com/hbtk24o.png" /> ,
where **K** is the camera matrix from [there](find_camera_mtx), [**R**|t] is transformation matrix and s is integer number parameter.
where **K** is the camera matrix from [there](find_camera_mtx), [**R**|t] is transformation matrix and s is a real number parameter.
![pinhole_camera_model](http://gitlab.ciirc.cvut.cz/cmirajak/laser_plane_scanner/uploads/17854790f79da224f708e89ded8d3453/pinhole_camera_model.png)
......@@ -12,12 +12,12 @@ Picture is borrowed from [there](http://docs.opencv.org/2.4/modules/calib3d/doc/
### Inverse transformation of pinhole camera equation
The equation for pinhole camera is under-determined so we have to find one more condition to estimate the position ![alt text](http://mathurl.com/hj835tq.png) using only projection coordinates ![alt text](http://mathurl.com/hw2kh9a.png). We can use chessboard plane, because OpenCV can find the transformation between those coordinates and camera coordinates. Furthermore, we can say that in chessboard coordinates all points are laying on plane described as z = 0. We are able to transform this plane to camera coordinates like:
The equation for pinhole camera is under-determined so we have to add one more condition to estimate the position ![alt text](http://mathurl.com/hj835tq.png) using only projection coordinates ![alt text](http://mathurl.com/hw2kh9a.png). OpenCV is able to find the transformation between the chessboard coordinate and the camera coordinate. Hence, we use chessboard plane. Furthermore, we can say that in chessboard coordinates all points are laying on plane described as z = 0. We are able to transform this plane to the camera coordinate like:
<img src="http://mathurl.com/gw8dwdp.png" /> ,
<img src="http://mathurl.com/zwt5qhc.png" />.
Now we have to obtain normal of this plane and its translation:
Now we have to obtain a normal of plane and its translation:
<img src="http://mathurl.com/h23dwzm.png" /> ,
<img src="http://mathurl.com/hxa6ykl.png" /> ,
......@@ -25,7 +25,7 @@ Now we have to obtain normal of this plane and its translation:
so the <img src="http://mathurl.com/j865cst.png" />.
Now we can add this condition to pinhole camera model equation, where [**R**|t] matrix is identity matrix and <img src="http://mathurl.com/j7ltgkr.png" />, we end up with:
Now we can add this condition to the pinhole camera model equation, where [**R**|t] matrix is an identity matrix and <img src="http://mathurl.com/j7ltgkr.png" />, we end up with:
<img src="http://mathurl.com/jzqcmgq.png" />
......@@ -33,10 +33,16 @@ Thereafter, we can make inverse transformation from ![alt text](http://mathurl.c
<img src="http://mathurl.com/zv29thy.png" />
### Tracking laser points on image
### Tracking laser points in image
In first, when we want to track a laser path, we convert an image with the laser path to the gray scale image with custom channel weights. The biggest weight is given to red channel, green one takes one quarter and blue is almost ignored. The following picture is using R:G:B ratio 70:25:5.
![result_cal_up_gray](http://gitlab.ciirc.cvut.cz/cmirajak/laser_plane_scanner/uploads/6a5bd62aa4bb7f974336439accd5415e/result_cal_up_gray.png)
As you can see on the picture above the laser path has slightly higher intensity then anything around. Therefore, we determine the laser position with pixel precision as the pixel with maximal intensity in some direction (i.e. row/column).
To refine it, we know that the laser light should have normal distribution around the maximum. Hence, we choose the specific neighborhood around maximum and calculate logarithm of intensities inside of it. These point are describing some kind of parabola now. Due to that we use LSQ and fit one there. Finally, we call its local maximum as a place with maximal intensity in specific direction.
![cal_down](http://gitlab.ciirc.cvut.cz/cmirajak/laser_plane_scanner/uploads/7841763e62cef8cf4847b530d4ad1ca9/cal_down.png)
![cal_up](http://gitlab.ciirc.cvut.cz/cmirajak/laser_plane_scanner/uploads/f8e41d456454a719cda6aed062b392cb/cal_up.png)
Clone repository
  • estimate_laser_plane
  • find_camera_mtx
  • Home
  • laser_trace
  • new_base_coords
  • rotation_table
  • simple setup