Looking for pixel as unit

조회 수: 7 (최근 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