stereo-3d

stereoCalibrate() changes focal lengths even when it was not supposed to

拈花ヽ惹草 提交于 2019-12-21 02:58:29
问题 I noticed that opencv stereoCalibrate() changes the focal lengths in camera matrices even though I've set appropriate flag (ie CV_CALIB_FIX_FOCAL_LENGTH). I'm using two identical cameras with the same focal length set mechanically on lens and furthermore I know the sensor size so I can compute intrinsic camera matrix manually what actually I do. Here you have some output form the stereo calibration program - camera matrices before and after stereoCalibrate(). std::cout << "Before calibration:

Convert between MATLAB stereoParameters and OpenCV stereoRectify stereo calibration

前提是你 提交于 2019-12-20 15:01:54
问题 I wish to convert a MATLAB stereoParameters structure to intrinsics and extrinsics matrices to use in OpenCV's stereoRectify. If I understood http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html and http://mathworks.com/help/vision/ref/stereoparameters-class.html , stereoParameters.CameraParameters1 and stereoParameters.CameraParameters2 store the intrinsic matrices and the other members of stereoParameters the extrinsic ones. I think I got this mapping

Convert between MATLAB stereoParameters and OpenCV stereoRectify stereo calibration

吃可爱长大的小学妹 提交于 2019-12-20 15:00:58
问题 I wish to convert a MATLAB stereoParameters structure to intrinsics and extrinsics matrices to use in OpenCV's stereoRectify. If I understood http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html and http://mathworks.com/help/vision/ref/stereoparameters-class.html , stereoParameters.CameraParameters1 and stereoParameters.CameraParameters2 store the intrinsic matrices and the other members of stereoParameters the extrinsic ones. I think I got this mapping

cvReprojectImageTo3D -3d modelling from 2d images issue-

时光毁灭记忆、已成空白 提交于 2019-12-18 10:57:26
问题 i need your help about this issue badly. i am trying to model a simple scene in 3d out of 2d images. i am using 2 images (left and right-the famous tsukuba scene) http://www.cc.gatech.edu/classes/AY2003/cs7495_fall/ProblemSets/Data/tsukuba-right.bmp i get a disparity map. like this one. http://www.robots.ox.ac.uk/~ojw/2op/tsukuba_score.png after here i have some questions. i think the steps should be: cvStereoRectify ( to get Q) cvReprojectImageTo3D (disparity map, 3dimage , Q ) but i dont

AttributeError: 'module' object has no attribute

℡╲_俬逩灬. 提交于 2019-12-12 08:37:48
问题 I am trying to get the depth map of two stereo images. I have taken the code from http://docs.opencv.org/trunk/doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.html I get the following error: Traceback (most recent call last): File "depth.py", line 9, in <module> stereo = cv2.createStereoBM(numDisparities=16, blockSize=15) AttributeError: 'module' object has no attribute 'createStereoBM' My code is: import numpy as np import cv2 from matplotlib import pyplot as plt imgL = cv2.imread(

StereoBM CPU and StereoBM GPU versions on OpenCV give very different output

醉酒当歌 提交于 2019-12-11 05:29:07
问题 I am working on Jetson TX1 and I find a huge difference between the outputs of the CPU and GPU versions of StereoBM. I have compiled a GPU version of OpenCV 3.2 on my machine. I am mentioning the outputs of both CPU and GPU, along with the GPU code. StereoBM CPU StereoBM GPU #include "opencv2/opencv.hpp" #include "opencv2/core.hpp" #include "opencv2/highgui.hpp" #include "opencv2/cudaarithm.hpp" #include <iostream> #include <stdio.h> #include <limits.h> using namespace cv; int main() { cv:

OpenCV StereoRectifyUncalibrated to 3D Point Cloud

僤鯓⒐⒋嵵緔 提交于 2019-12-11 05:21:45
问题 I have some code that works out all of the parts up to calculating values with cv::stereoRectifyUncalibrated. However, I am not sure where to go from there to get a 3D Point cloud from it. I have code that works with the calibrated version that gives me a Q matrix and I then use that with reprojectImageTo3D and StereoBM to give me a point cloud. I want to compare the results of the two different methods as sometimes I will not be able to calibrate the camera. 回答1: http://blog.martinperis.com

Specifications of Checkerboard (Calibration) for obtaining maximum accuracy in stereo reconstruction

隐身守侯 提交于 2019-12-11 04:49:23
问题 I have to reconstruct an object which will be placed around 1 meter to 1.5 meters away from the baseline of my stereo setup. The image captured by both cameras have high resolution (10 MP) The accuracy with which I have to detect it's position is +/- 0.5mm, in all the three co-ordinate axes. (If you require more details, please let me know) For these, what should the optimal specifications of my checkerboard (for calibration) be? I only know that it should be an asymmetric board. It should be

Unable to run tune_blockmatcher and image_to_pointcloud programs

允我心安 提交于 2019-12-11 04:15:26
问题 I am able to capture images on webcams and calibrate them well using StereoVision library from erget. But, while trying for execution of tune_blockmatcher and images_to_pointcloud, i found below errors as StereoBM and StereoSGBM classes are unable to import. >import cv2 >from stereovision.blockmatchers import StereoBM, StereoSGBM Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python27\lib\site-packages\stereovision\blockmatchers.py", line 111, in <module>

OpenCV 2.4.9 for Python, cannot find chessboard (camera calibration tutorial)

感情迁移 提交于 2019-12-09 17:51:56
问题 I am trying to calibrate camera using OpenCV tools according to the following this guide. The problem is that function findChessboardCorners cannot find any chessboard on images I tried. I used a lot of them - even just plain chessboard pattern. In any case, nothing was detected. Here is the code (almost the same as from link above): import numpy as np import cv2 import glob # termination criteria criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) # prepare object