how convert pixel to mm for a mat file using Matlab?

9 visualizzazioni (ultimi 30 giorni)
I was wondering how can I convert pixel to the mm while my image is a mat file (uint 8). For example, I have a kernel size of 11 * 11 and another one a kernel size of 21 * 21, and I need to know what is equivalent of these sizes in mm?

Risposta accettata

Walter Roberson
Walter Roberson il 20 Mag 2019
Pixels have no inherent size. 11x11 matrix of pixels could be representing picometers or gigaparsecs. You need some kind of reference information.
  7 Commenti
Walter Roberson
Walter Roberson il 21 Mag 2019
The information there is not enough to convert pixels to mm.
It looks to me as if you have a reconstructed ultrasound image with minor variations in coordinates, perhaps due to round-off in the reconstruction. There does appear to be a small scale difference between x and y.
Unfortunately, ultrasound is a technology used on a variety of scales, including for small scale welding, and large scale welding, and fetal monitoring. Just knowing the technology involved does not give us any scale information.
You could guess that the coordinates are in mm and see whether it gives you reasonable conclusions. Is it plausible that you are looking at something that is about 6.6 inches by 5.6 inches?
Walter Roberson
Walter Roberson il 21 Mag 2019
You could multiply number of pixels by mean(diff(info.x)) or mean(diff(info.y)) to get "units" for which there is still a missing scaling factor to convert to millimeters, with it being plausible that the coordinates reflect millimeters directly.
However if the small differences in coordinates is important, you could get a more accurate area, except for the pixels on the right or bottom edge: you can deduce pixel widths by looking at differences in adjacent coordinates, but you do not have the coordinates for what is beyond the right or bottom edge in order to deduce the widths of those pixels.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by