Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How to convert Pixel to millimetor in MATLAB GUI

2 Ansichten (letzte 30 Tage)
Muhammad
Muhammad am 16 Sep. 2013
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Hi all.
i am stucking with a problem please help me. i have a JPG image i contoured the image by imfreehand and then find the [X,Y] coordinates of each pixel inside the contour. these [X,Y] cooridnates are in pixel so i want in millimetor. So, how can i get these values in mm. i want when i press excelPushbutton. the coordinates should b be in mm not in pixel. any help is apprteciated in advance.
the code i used is given below
if true
function ExcelPushbutton_Callback(hObject, eventdata, handles)
[Y, X] = find(handles.maskedImage ~= 0);
data=[Y,X];
Z = repmat(0.18,[length(X),1]);
[FileName,PathName] = uiputfile('*.xls','Save data to spreadsheet');
Data=[X,Y,Z];
xlswrite([PathName '/' FileName],Data);
end
here Z is 0.18mm which is thickness of the image.

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by