How to convert pixel coordinate system to image coordinate system
Ältere Kommentare anzeigen
x=(y'-ne/2.0)*y_pix_size
y-(nr/2.0-x')*x_pix_size
where
ne= number of columns
nr= number of rows
x_pix_size= pixel size along the row direction
y_pix_size= pixel size along the column direction
HELP ME PLEASE .....

Antworten (2)
KSSV
am 14 Apr. 2020
Let I be your image.
[m,n,p] = size(I) ;
r = 1:n ;
c = 1:m ;
[X,Y] = meshgrid(r,c) ;
1 Kommentar
Keeyong Kim
am 14 Apr. 2020
Image Analyst
am 14 Apr. 2020
Compute the spatial calibration factor by dividing your field of view in microns by the number of pixels across:
[rows, columns, numberOfColorChannels] = size(yourImage);
micronsPerPixel = fieldOfVewInMicrons / columns;
xInMicrons = xInPixels * micronsPerPixel;
yInMicrons = yInPixels * micronsPerPixel;
and for any distances between points that you compute, or areas:
distanceInMicrons = distanceInPixels * micronsPerPixel;
areaInSquareMicrons = areaInPixels * micronsPerPixel ^ 2;
Or you could just compute the distances and areas from the micron version of x and y directly.
Kategorien
Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!