I want to calibrate the image according to the experimental setup dimensions.

1 次查看(过去 30 天)
I have an image of 2D quasi dimensional from which i want to calaculate the mean dspersion. The image has white, red and blue particles. When I am processing the image and apply 'axis on'. The image automatically takes some axis values while I want to give the axis value according to the experimental setup dimensions. I have tried calibrating the image and tried processing it but still MATLAB takes the values automatically for the axis. I am attaching the image which i want to process and the axis values i want is xmin =0, xmax=300mm, ymin=0, ymax=35mm. I am also attaching the image of the results obtained after the processing of the image. Please also find the code used for the same.

回答(1 个)

Mann Baidi
Mann Baidi 2023-9-10
Hi Aashna,
I understand you would like to give axis values to the image based on the experimental setup dimensions. There are two possible solutions which you can try implementing:
Assuming that you only like to plot the image with specific axes. For this purpose, you can use “xlim” and “ylim” to plot the image with manual axes.
xlim([0 300])
ylim([0 35])
For more information on “xlim” and “ylim”, you can refer to the following
And if you would like to calculate the mean dispersion from the specific cropped image. For this purpose, you can use “imcrop” function in MATLAB. You can add the following code in your file.
I = imread('fileanme.png');
rect = [0,0,35,300];
Icrop = imcrop(I,rect);
For more information on “imcrop”, you can refer to the following link.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by