Effacer les filtres
Effacer les filtres

How to know the pixel size(width, length, height)

16 vues (au cours des 30 derniers jours)
mohd akmal masud
mohd akmal masud le 10 Sep 2023
Commenté : Walter Roberson le 11 Sep 2023
Dear All,
I have the data as attached (data.mat), anyone know how to see the pixel size (length, width, height) my data?
whos -file data.mat
Name Size Bytes Class Attributes data 128x128x128 8388608 single

Réponse acceptée

DGM
DGM le 11 Sep 2023
If this data came with an associated header file, then things like scaling info should be there.
Considering the stack from one of the prior questions, the header file point1_air_w1.h00 contains the following lines:
scaling factor (mm/pixel) [1] := 4.480
scaling factor (mm/pixel) [2] := 4.480
;# scaling factor (mm/pixel) [3] := 4.480
  2 commentaires
mohd akmal masud
mohd akmal masud le 11 Sep 2023
Dear @DGM, the header file as attached.
Walter Roberson
Walter Roberson le 11 Sep 2023
That .hdr file contains
scaling factor (mm/pixel) [1] := 4
scaling factor (mm/pixel) [2] := 4
scaling factor (mm/pixel) [3] := 4
For a "one-off" you can just assume those values, but in general you should have your code parse them out from the file.
You should possibly be using niftiread and niftiinfo

Connectez-vous pour commenter.

Plus de réponses (1)

Walter Roberson
Walter Roberson le 11 Sep 2023
You do not know those based on that data array. The only possible way to figure it out would be if somewhere inside the data array, there was an object whose physical size you knew.
I like to ask, "How big is an Imperial Star Destroyer" (Star Wars) ? It the original films, it is shown to be huge -- supposedly 1.6 kilometers long, with over 35000 people as staff / crew. You can get some idea by looking at how large other objects are as they go past it. But the real answer is something on the order of 1.5 meters for the model used in filming: the rest is due to perspective.
So unless you have external information or something of known size to compare to, you cannot tell whether what you are looking at is 1.5 millimeters or 1.5 meters or 1.5 kilometers...

Catégories

En savoir plus sur MATLAB Support Package for IP Cameras dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by