help with calibrating image that is slightly angled

조회 수: 3 (최근 30일)
Ghadir Ghasemi
Ghadir Ghasemi 2021년 6월 25일
답변: Vidip 2024년 2월 15일
Hi, I would like to take the below image and calibrate it so that i can get a correct plan view. As you can see from the current image, it is slightly angled as it is not taken exactly as a 'plan view'
Any help or code would be appreciated!

답변 (1개)

Vidip
Vidip 2024년 2월 15일
To calibrate an angled image and obtain a correct plan view, the process involves selecting at least four corresponding points in both the original (angled) image and the desired plan view (which can be the corners of a rectangle representing the target plane). These points are used to compute a transformation matrix that maps the original image to the new view.
You can use the ‘ginput’ tool to manually select the corner points of the photo, or if you know the coordinates, you can define them directly in your code. Once you have the point correspondences, you can use the ’fitgeotform2d’ function to compute the transformation matrix, specifying the 'projective' transformation type. After obtaining the matrix, you apply the transformation to the image using the ‘imwarp’ function, which will produce the corrected plan view image.
For further information, refer to the documentation links below:

Community Treasure Hunt

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

Start Hunting!

Translated by