MATLAB Answers


rectifyStereoImages is cutting off too much of my image

Asked by Matt McDermott on 11 May 2016
Latest activity Commented on by Dima Lisin
on 12 May 2016
Hi all,
I am working on a project where we are using Stereo Thermal Cameras with a narrow horizontal field of view to detect objects in a particular region of interest. After calculating and implementing the proper baselines and angles for our camera positions we then take images while holding a 6x5 chessboard for calibration. We are then using the Stereo Calibrator App to compute the stereo parameters that we desire.
For the most part we are able to achieve exact measurements with a high accuracy, however when we rectify the images in the application a large part of the image is being cut from both the left and right of each image.
Unfortunately, due to the nature of the project I am unable to share the images, however I was seeking some advice on how to approach this problem.
So far we have tried inputting intrinsic matrices, inputting radial distortion values, computing skew, and computing tangential distortion. Our Images are of various areas of the shared portion of the scene including multiple orientations of the board, however they are fairly close to the cameras compared to the area we are trying to monitor. For example, we are looking to monitor an area about 700Ft away from the cameras, however our calibration images are being taken at about 300Ft away due to physical and logistical limitations.
My thoughts are that we might need more images, however I don't think we can have many more variations in orientation/position. Could the distance from the cameras affect our rectification, even if the board is fully in both shared scenes? Also, when the cameraParameters are output to a Struct it provides us with a field for "RectificationParams" which includes bounds on X and Y. Does it make sense to edit those bounds in order to get more of the scene? (I doubt that is the correct approach).


Sign in to comment.

1 Answer

Answer by Dima Lisin
on 12 May 2016

Set 'OutputView' to 'full', when you call rectifyStereoImages.


Thank you for your answer!
That does not help us actually obtain the results we are looking for. I guess I should have stated that we need to use the "valid" output view beforehand.
This is because we are using the Stereo Calibration App which does not allow you to change the information, and when we later to our analysis we utilize only the valid portions of the rectification.
The app does not prevent you from using 'full' for 'OutputView'. Once you export the stereoParameters object from the app, you can call rectifyStereoImages any way you like.

Sign in to comment.