Converting Image Dimensions from Pixels to Nanometers
Show older comments
Hi all, I am trying to process an image and I am having problems with the dimensions. I know how to get the dimensions of my image, however they are in pixels and I want to convert to nanometers; I don't want to resize the image, just do a conversion. Any tips?
7 Comments
Matt J
on 23 Oct 2023
Is it a 2D image of a 3D scene? If so, object sizes in nanometers will depend on how far the object is from the camera.
Image Analyst
on 24 Oct 2023
@Matt J I'm guessing since the units are nanometers, this is a microscope image so the scene should be fairly flat and all at the same magnification. Or it could be nanoCT but in that case the spatial calibration factor should be constant and stored with the image. It might be stored with the microscope image also (in the header/metadata) or it might have a micron bar burned into the image. Waiting for @Bethany to clarify.
Bethany
on 24 Oct 2023
Image Analyst
on 24 Oct 2023
It matters. If it were, say a regular camera and a snapshot of your backyard for example, then the magnification would depend on how far each thing was from your camera. So I'm assuming you say my helpful demo below (scroll down this page) and you tried it. Did that answer your question? If not, attach your picture so we can figure out what is going on. And, are you sure that the spatial resolution is not stored in the header of the image?
Steven Lord
on 24 Oct 2023
Do you have something of a known size in the image to compare other objects in the image against? If not, how do you know (using as an example a picture of a train car) whether the picture is a picture of a full-size train car or a picture of a model railroad car? If it's a picture of a model railroad car, how do you distinguish the different scales?
I know your image is not one of a railroad car, but the same types of questions probably apply to your microscope image.
Bethany
on 24 Oct 2023
Image Analyst
on 24 Oct 2023
You should take a picture of an object of known length, such as a scale or beads of known diameter. Then use my program.
Accepted Answer
More Answers (0)
Categories
Find more on Biomedical Imaging in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!