opencv

Decomposing Projection Using OpenCV and C++

 

  And the output is:

 

Decomposing Projection Using OpenCV and C++ Read More »

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

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

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:

 

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

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:​  

 

Creating a Simulated Stereo Vision Cameras With OpenCV and C++ Read More »

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“

 

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

Stereo Camera Calibration with ROS and OpenCV

In this tutorial, I’m gonna show you stereo camera calibration with ROS and OpenCV. So you need a pair of cameras, I bought a pair of this USB webcam which is okay for this task. 1)Save the following text under “stereo_usb_cam_stream_publisher.launch”

2)Then run the following node to publish both cameras.

3)Now call the calibration node:

Stereo Camera Calibration with ROS and OpenCV Read More »

How to use OpenCV 3 Contribution Modules

OpenCV Contribution Modules are developed code from the community of OpenCV and are not very stable but after they got stable they will be part f OpenCV. Anyhow, there are a lot of cool modules there (fuzzy logic, sfm, cnn, …) that made me have look at them and try them. gflags

2) glog

How to use OpenCV 3 Contribution Modules Read More »

Finding Homography Matrix using Singular-value Decomposition and RANSAC in OpenCV and Matlab

Solving a Homography problem leads to solving a set of homogeneous linear equations such below: \begin{equation} \left( \begin{array}{ccccccccc} -x1 & -y1 & -1 & 0 & 0 & 0 & x1*xp1 & y1*xp1 & xp1\\ 0 & 0 & 0 & -x1 & -y1 & -1 & x1*yp1 & y1*yp1 &  yp1\\ -x2 & -y2 &

Finding Homography Matrix using Singular-value Decomposition and RANSAC in OpenCV and Matlab Read More »

Peak Signal-to-Noise Ratio (PSNR) in Image using OpenCV and Matlab

Peak signal-to-noise ratio (PSNR) shows the ratio between the maximum possible power of a signal and the power of the same image with noise. PSNR is usually expressed in logarithmic decibel scale. \( MSE =1/m*n \sum_{i=0}^{m-1} \sum_{j=0}^{n-1}  [   Image( i,j)  -NoisyImage( i,j)  ]  ^2   \) \( PSNR =10* \log_{10} \Bigg(MAXI^2/MSE\Bigg)  \) MSE is Mean Square Error and MAXI is

Peak Signal-to-Noise Ratio (PSNR) in Image using OpenCV and Matlab Read More »