Can I create images with accurate size in mm ?
Show older comments
I need to create phantom data- for example white sqare on black background with known size and position in milimiters. Is it possible to create something like that in matlab? Or does matlab perform with pixels size only ?
1 Comment
Raster image data is in pixels only. Any information about physical size is either implied by the relative scale of reference features within the physical image, or by metadata stored in the file header, though the vast majority of default-generated resolution metadata in non-technical images is either contextually meaningless or wrong. If all you have is a white square on a black background, then there is no implied scale. If you want to include that information, it depends how you want to do it and what file format you're using.
Accepted Answer
More Answers (1)
Muskan
on 23 Jan 2024
0 votes
Hi Mary,
As per my understanding, in MATLAB, image representation is inherently based on pixel units. As such, to facilitate the use of different units such as millimeters (mm), one would need to implement a custom conversion routine. Currently, MathWorks does not provide a built-in function specifically for this purpose.
Categories
Find more on Image Processing and Computer Vision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!