I want to know , what is function for measuring distance between 2 point in a image?? How can change distance (pixel)to mm or cm?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Distance between 2 point
0 Kommentare
Antworten (1)
Image Analyst
am 23 Jul. 2013
Do you know the points? Use ginput() or inline() if not. Then just use the Pythagorean theorem to calculate the Euclidean distance. To convert to mm or cm, you need to image an object of known distance, such as a ruler. Then you know the spatial calibration factor in mm per pixel and you can multiply distances by that factor to convert the distance in pixels into a distance in mm or cm.
3 Kommentare
Image Analyst
am 16 Okt. 2013
See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_measure_a_distance_or_area_in_real_world_units_instead_of_in_pixels.3F and run my demo attached below.
Walter Roberson
am 16 Okt. 2013
To which I would add the note that when you see "72 dpi" or "90 dpi" or "100 dpi", you should ask for proof that the image really is that. Those three values are all commonly used as nominal resolutions: e.g., if you have a matrix of unknown size and save it as JPEG, chances are that the image will be arbitrarily marked as 72 dpi. 72 and 90 and 100 should be considered to be most likely display resolutions rather than actual resolutions that the images were taken at.
If you do not know for sure that the image was taken with something like a scientific microscope that always "knows" the current lens power and very precise positioning information, then you should expect that the dpi information is not much more than a number drawn out of a hat.
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!