Ask Your Question

bymulker's profile - activity

2017-09-29 15:04:37 -0600 received badge  Necromancer (source)
2016-06-02 07:27:57 -0600 received badge  Enthusiast
2016-05-24 08:19:44 -0600 commented answer Where is the extrinsics file for the aloe plant for reprojection?

Thanks but the datasets before 2014 dont have any sufficient calib. data. I downloaded the bicycle from here : http://vision.middlebury.edu/stereo/d... which has calib data and wrote a little utility to read in c++. The cameras are co-planar for all samples in the directory so it should be straightforward to build Q matrix. I already reprojected but the result is somewhat noisy and the bicycle seems to be hole! (out of disparity range)

2016-05-23 07:38:16 -0600 answered a question Disparity map on opencv 2.4

You can get good results for the aloe vera plant that is found in the OpenCV examples data directory with sbm and sgbm respectively ;

      cvtColor( viewL, viewL, COLOR_RGB2GRAY );
  cvtColor( viewR, viewR, COLOR_RGB2GRAY );
  sStereo->alg = StereoCameraRig::STEREO_BM;
  sStereo->SADWindowSize = 9;
  sStereo->numberOfDisparities = 112;
  sStereo->preFilterSize = 5;
  sStereo->preFilterCap = 61;
  sStereo->minDisparity = -39;
  sStereo->textureThreshold = 507;
  sStereo->uniquenessRatio = 0;
  sStereo->speckleWindowSize = 0;
  sStereo->speckleRange = 8;
  sStereo->disp12MaxDiff = 1;

or : ..

   sStereo->alg = StereoCameraRig::STEREO_SGBM;
  sStereo->SADWindowSize = 11;
  sStereo->numberOfDisparities = 192;
  sStereo->preFilterCap = 4;
  sStereo->minDisparity = -64;
  sStereo->uniquenessRatio = 1;
  sStereo->speckleWindowSize = 150;
  sStereo->speckleRange = 1;
  sStereo->disp12MaxDiff = 1;
  sStereo->P1 = 600;
  sStereo->P2 = 2400;
  sStereo->textureThreshold = 500;

You have to convert images to grey for sbm while sgbm can work with color images without any problems.

Note: The left and right images of the plant are rectified meaning y-axis aligned. In order to make such a rectification (from scratch) you must stereo calibrate the system to get intrinsic and extrinsic parameters of the system.

2016-05-23 06:52:28 -0600 received badge  Editor (source)
2016-05-23 04:04:13 -0600 answered a question stereo_match.py to cpp

Hi,

I dont know if it is late but i can send the settings for sgbm :

sStereo->alg = StereoCameraRig::STEREO_SGBM;
  sStereo->SADWindowSize = 3;
  sStereo->numberOfDisparities = 192;
  sStereo->preFilterCap = 4;
  sStereo->minDisparity = -64;
  sStereo->uniquenessRatio = 1;
  sStereo->speckleWindowSize = 150;
  sStereo->speckleRange = 1;
  sStereo->disp12MaxDiff = 1;
  sStereo->fullDP = false;
  sStereo->P1 = 600;
  sStereo->P2 = 2400;
  sStereo->textureThreshold = 500;

  stRig.CreateUpdateStereoMatcher();

  stRig.getDisparityMap(viewL, viewR, dispMap, false);

  normalize(dispMap, disp8, 0, 255, CV_MINMAX, CV_8U);

  showImage(disp8, true);

In any case i got my tiny shiny disparity map :) but cannot reproject3d as i cannot see any extrinsics files shipped with OpenCV!! (the instrinscs file is 'intrinsics.yml' file if i'm not wrong) Can someone point out where or a better sample maybe?

2016-05-23 04:04:13 -0600 asked a question Where is the extrinsics file for the aloe plant for reprojection?

Hi community,

I was just tracking the samples shipped with OpenCV created the disparity map for the aloe plant but cannot reproject3d as i cannot find the extrinsics file in the samples directory. I know this is a loser question :) maybe someone can point out a better example data set?

The example file is ; /opencv\sources\samples\cpp\stereo_match.cpp

..but this is a console program and expects the file names as the parameters which i do not know where to get. I'm assuming the right intrinsics file is the 'intrinsics.yml' file found in /opencv\sources\samples\data, but it is impossible without having the extrinsics to reproject3d. The disparity map settings is as follows for those who might be interested:

sStereo->alg = StereoCameraRig::STEREO_SGBM;
  sStereo->SADWindowSize = 11;
  sStereo->numberOfDisparities = 192;
  sStereo->preFilterCap = 4;
  sStereo->minDisparity = -64;
  sStereo->uniquenessRatio = 1;
  sStereo->speckleWindowSize = 150;
  sStereo->speckleRange = 1;
  sStereo->disp12MaxDiff = 1;
  sStereo->P1 = 600;
  sStereo->P2 = 2400;
  sStereo->textureThreshold = 500;

  stRig.CreateUpdateStereoMatcher();

  stRig.getDisparityMap(viewL, viewR, dispMap, false);

  normalize(dispMap, disp8, 0, 255, CV_MINMAX, CV_8U);

  showImage(disp8, true);

Thank you very much!

(This is my first post (hope will not be the last!) and it is my pleasure to be here in such a great library's forum with you.)