MATLAB Answers

How to find stereo correspondances of the centroids of Blobs ?

3 views (last 30 days)
Omar Crypps
Omar Crypps on 23 Apr 2018
Answered: Stalin Sabu Thomas on 24 Oct 2018
Hello everyone,
I'm actually trying to detect multiple moving objects using a stereovision system in order to calculate the depth using the triangulate Matlab function.
In order to achieve that, I followed these steps:
  1. Calibrate the sterevision system and export the Stereo Parameters to Matlab Workspace;
  2. Live feed acquisition of the frames with the two cameras;
  3. Using GMM ( Gaussian Mixture of Models) algorithm to extract the foreground objects from the background objects;
  4. Using some morphological operations such as opening to filter the noise;
  5. Detecting Blobs and calculating the centroids and the Bboxes in the two images (left and right);
  6. Using the triangulate function to calculate the depth of the detected objects;
Now, here are the problems that I faced:
  • In order to use the "triangulate" function, we need the same number of centroids in the right and the left images, and even if I set the maximum number of Blobs to 1 in each image, there is almost all the time no correspondance between the two centroids, so the triangulation is not correct;
  • I tried to use the SURF algorithm in order to find the stereo scorrespondances, but it doesn't give the correspondance of a given centroid, it just give the correspondances of features that the SURF algorithlm detect;
  • I also tried to rectify the stereo images in order to get the corresponding centroid of the left image on the same line in the right image, but ... how to find this corresponding centroid in the second image;
  • Then I tried to detect the moving objects only on the left image, and use the right image just to find the depth, but I still don't have good results ;
So my question is,
How should I proceed to get the corresponding cendroid point in the right and left images, in order to determine the depth using Triangulate Matlab Function ?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!