disparity-mapping

What are the ximgproc_DisparityWLSFilter.filter() Arguments?

吃可爱长大的小学妹 提交于 2020-07-07 08:15:12
问题 I get a ximgproc_DisparityWLSFilter from cv2.ximgproc.createDisparityWLSFilter(left_matcher) , but I cannot get ximgproc_DisparityWLSFilter.filter() to work. The error I get is OpenCV Error: Assertion failed (!disparity_map_right.empty() && (disparity_map_right.depth() == CV_16S) && (disparity_map_right.channels() == 1)) in cv::ximgproc::DisparityWLSFilterImpl::filter, file ......\opencv_contrib\modules\ximgproc\src\disparity_filters.cpp, line 262 In general, how do I figure out how to use

What are the ximgproc_DisparityWLSFilter.filter() Arguments?

北城余情 提交于 2020-07-07 08:15:08
问题 I get a ximgproc_DisparityWLSFilter from cv2.ximgproc.createDisparityWLSFilter(left_matcher) , but I cannot get ximgproc_DisparityWLSFilter.filter() to work. The error I get is OpenCV Error: Assertion failed (!disparity_map_right.empty() && (disparity_map_right.depth() == CV_16S) && (disparity_map_right.channels() == 1)) in cv::ximgproc::DisparityWLSFilterImpl::filter, file ......\opencv_contrib\modules\ximgproc\src\disparity_filters.cpp, line 262 In general, how do I figure out how to use

Disparity Map Block Matching

房东的猫 提交于 2019-12-23 05:29:36
问题 I am writing a disparity matching algorithm using block matching, but I am not sure how to find the corresponding pixel values in the secondary image. Given a square window of some size, what techniques exist to find the corresponding pixels? Do I need to use feature matching algorithms or is there a simpler method, such as summing the pixel values and determining whether they are within some threshold, or perhaps converting the pixel values to binary strings where the values are either

does disparity maps give depth in meter if focal length and disparity are in pixel?

*爱你&永不变心* 提交于 2019-12-23 04:36:27
问题 I am trying to find depth using a stereo camera. I created a depth map or disparity matrix which are from 0 to 255 (pixel value). Now after creating a depth map, I want to find real depth using formula, depth = (baseline*focallength)/disparity-value Here, the baseline in (meter) focal length in (pixel) disparity-value in (pixel) So I want to ask if I calculate depth, will that depth in pixel or in a meter. 回答1: If you substitute your units you get: depth = baseline (meter) * focal length

OpenCV Big difference between StereoSGBM and gpu::StereoBM_GPU

Deadly 提交于 2019-12-23 01:13:23
问题 I try to generate disparity of stereo image by using OpenCV and optimize performance by using GPU but the results of them are different. StereoSGBM initialize StereoSGBM sbm; sbm.SADWindowSize = 3; sbm.numberOfDisparities = 144; sbm.preFilterCap = 63; sbm.minDisparity = -39; sbm.uniquenessRatio = 10; sbm.speckleWindowSize = 100; sbm.speckleRange = 32; sbm.disp12MaxDiff = 1; sbm.fullDP = false; sbm.P1 = 216; sbm.P2 = 864; sbm(grayLeftCurrentFrameCPU, grayRightCurrentFrameCPU,

stereo vision 3d point calculation with known intrinsic and extrinsic matrix

房东的猫 提交于 2019-12-21 21:06:05
问题 I have successfully calculated Rotation, Translation with the intrinsic camera matrix of two cameras. I also got rectified images from the left and right cameras. Now, I wonder how I calculate the 3D coordinate of a point, just one point in an image. Here, please see the green points. I have a look at the equation, but it requires baseline which I don't know how to calculate. Could you show me the process of calculating the 3d coordinate of the green point with the given information (R, T,

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

Rectifying images on opencv with intrinsic and extrinsic parameters already found

空扰寡人 提交于 2019-12-13 21:17:21
问题 I ran Bouguet's calibration toolbox (http://www.vision.caltech.edu/bouguetj/calib_doc/htmls/example.html) on Matlab and have the parameters from the calibration (intrinsic [focal lengths and principal point offsets] and extrinsic [rotation and translations of the checkerboard with respect to the camera]). Feature coordinate points of the checkerboard on my images are also known. I want to obtain rectified images so that I can make a disparity map (for which I have the code for) from each pair

OpenCV StereoSGBM gives really bad disparity map

安稳与你 提交于 2019-12-08 10:08:42
问题 these is my calibration code: void calibrate() { int numBoards = 10; int board_w = 6; int board_h = 9; Size board_sz = Size(board_w, board_h); int board_n = board_w*board_h; vector<vector<Point3f> > object_points; vector<vector<Point2f> > imagePoints1, imagePoints2; vector<Point2f> corners1, corners2; vector<Point3f> obj; for (int j=0; j<board_n; j++) { obj.push_back(Point3f(j/board_w, j%board_w, 0.0f)); } Mat img1, img2, gray1, gray2; VideoCapture cap1(0); VideoCapture cap2(1); int success =

Get textured pointcloud with Block-Matching-Algorithm

老子叫甜甜 提交于 2019-12-08 09:25:32
问题 I want to texture a generated pointcloud with the original image color from two images. For this I calculated the disparity-map with Block-Matching and did the reconstruction. Also writing an export function for .ply-files wasn't a big deal. My problem is: How do I get the color from block-matching-algorithm? It does look for similar pixels on rectified images, but there is no variable which saves the position of a found matching, referred to API. Afterward it is not possible to recover the