Looking for pixel as unit
20 views (last 30 days)
Show older comments
Hi everyone,
I've been looking for a MATLAB equivalent to the Python library Astropy.units (I only recently started using MATLAB). I found the Units of Measurement in the Symbolic Math Toolbox, which satisfy most of my needs, but can't find anything to have pixels as a unit (it is something that exists in the astropy library).
Is there something like pixels in the toolbox that I have missed? If not any idea on how to emulate it? Like creating a new unit?
Thanks in advance
0 Comments
Answers (1)
Image Analyst
on 26 Nov 2024 at 15:11
Not sure what you mean. A digital image is a matrix. A pixel is just a value at a particular location in the matrix. I don't know what you mean by "Units of Measurement". Is it some kind of list of units like pixels, mm, cm, km, inches, etc.? If you do image analysis the results are generally in pixels. If you want to convert from pixels to calibrated units such as meters, you need to multiply by a calbration factor. See my attached demo.
See Also
Categories
Find more on Symbolic Math Toolbox 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!