Skip to content

Commit

Permalink
parallax error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Brzyk committed Aug 11, 2022
1 parent 4ac8fe6 commit 441b35a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ The final effect of this project can be seen in the video below.
* The color of detected objects depends on the HSV ranges set in the code
* System counts collected objects

### Dealing with parallax error

The camera image is a flat representation of the three-dimensional world. The position of an object in space (the posion of its base on the ground) is obtained from the position of its upper surface seen on the image. However, the further away the object is from the center of the image, the more visible it will be from the side. Due to the different height of the objects, its top will no longer reflect the position of its base.
In science, this effect has been called "parallax error" and his presense is often marked when reading measurements from analog pointer meters. To compensate it, it is enough to look at the meter directly from above.
In the case of this project, the camera is stationary, so a math workaround should be used. Knowing the height (h) of the objects and its distance from the center of the image in XY space (R), you can easily calculate (δ-δ) its real position, getting rid of the parallax error:

![parallax](parallax_error.png)

### ROS Description
OpenMANIPULATOR launch file offers [a lot of services](https://emanual.robotis.com/docs/en/platform/openmanipulator_x/ros_controller_msg/#service). This project (specifically `/grabber_from_image_cords` node) uses some of these to control the manipulator: `/goal_task_space_path`, `/goal_joint_space_path`, `/goal_tool_control`.

Expand Down
Binary file added parallax_error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 441b35a

Please sign in to comment.