Looking for pixel as unit

14 次查看(过去 30 天)
Charles
Charles 2024-11-26
评论: Charles 2024-11-26
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

回答(1 个)

Image Analyst
Image Analyst 2024-11-26
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.
  1 个评论
Charles
Charles 2024-11-26
What I meant is to use pixels as units in a similar way as the units are used in the tutorial here (MATLAB Symbolic Math Toolbox). The goal is to have a variable with the dimension of mm/pxl.
I hope it helps clarify my initial question

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by