how to make figure perfectly squared?
3 views (last 30 days)
I would like to make a perfect squared figure. When I use axis equal I still find that y-axis is stretched more than x-axis and does not make a perfect square. It appears like a rectangle elongated in y-direction. I do not want to change x and y limits.
I understand that my PC screen does not have 1:1 ratio, but how to get figure in 1:1 ratio??
Can anyone please help me making figure perfectly squared?
Here is the tentative code:
clear; close all; clc;
I want a figure like this . Square.
Any help will be greatly appriciated.
Thank you very much in advance!
Walter Roberson on 24 Aug 2022
Edited: Walter Roberson on 24 Aug 2022
You will need to create a calibration pattern and record it with some external camera, and create an undistortion matrix. You would draw into an array instead of on to the display, and then you would apply the undistortion matrix to it to arrive at the final image to display. The image would then pass through the distortion of your pc display and the distortion and undistortion would cancel out.
The computer vision toolbox contains tools for analyzing camera distortion that could be applied in reverse.
If this sounds as if I am blaming your pc display or your graphics hardware for not displaying correctly, then you have understood correctly.