Wrong depth while using Depth Estimation Matlab example

Hi,
I am trying to measure depth using the Matlab Depth Estimation example, but I am getting wrong results. I am using 2 google vision kits as my cameras. Following are the images that i have used for camera callibration
My extrinsic camera visualization:
My Rectified Image:
My disparity Map:
and finally the result I am getting is 0.08 meters which should be 1.2 meters, and I have tried this with different images and the error is more or less the same. Can anyone please help me in debugging the problem? I think I have followed all the steps but the results does not seem to change.
One more thing I am doing face detection and using that as the coordinates to get the distance instead of person detection. Rest of the code is same.
% Create the people detector object. Limit the minimum object size for
% speed.
% peopleDetector = vision.PeopleDetector('MinSize', [166 83]);
%
% Detect people.
% bboxes = peopleDetector.step(frameLeftGray);
faceDetector = vision.CascadeObjectDetector();
bboxes = step(faceDetector, frameLeftGray);
Looking forward to your help. Thank you.

Answers (0)

Products

Release

R2018b

Asked:

on 29 May 2019

Community Treasure Hunt

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

Start Hunting!