Author Archives: admin

Decomposing Projection Using OpenCV and C++

 

 

And the output is:


 

Camera Projection Matrix with Eigen

 

Create OpenCV Matrix (cv::Mat, cv::Mat_ ) From Various Data Types

1) cv:: Mat_

You can create a matrix with cv:: Mat_

2) cv::Mat

or like this with cv::Mat

if you forgot the list of data types you use

 

more data types here

Computing Fundamental Matrix and Drawing Epipolar Lines for Stereo Vision Cameras in OpenCV

Following my other post, you can extract the equation for epipolar lines. Basically choosing one point in one image and using fundamental matrix, we will get a line in the other image:

 

Creating a Simulated Stereo Vision Cameras With OpenCV and C++

n this tutorial, I created an ellipsoid in 3D space and create two cameras in right and left and captured the image:​

Point cloud of 3D Ellipsoid

Image from right camera.

Image from left camera.

 


 

How to use image_geometry and camera_info_manager in ROS

camera_info_publisher.cpp:

image_geometry_demo.cpp:

 

CMakeLists.txt

 

 

Simulating A Virtual Camera With OpenCV and Reverse Projection From 2D to 3D

Projection of Points from 3D in the camera plane:

Computed rays from the camera origin in the direction of points:

 

points are stored in CSV file like this:


The content of “reverse_projection.hpp”

The content of “transformation.hpp

 

Publishing video file and images with ROS

If you have video/image file on your disk and you want to publish it without coding, you can use the following nodes:

Publishing Images

Here are some examples to publish an image:

And more Advanced launch file:

 

Publishing Videos

Camera Calibration Based on Zhang’s Algorithm (Chess Board) Explained