필터 지우기
필터 지우기

image height

조회 수: 5 (최근 30일)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2012년 5월 12일
댓글: Image Analyst 2014년 1월 9일
can we able to measure the height of a person by taking his image and processing through MATLAB.

채택된 답변

Image Analyst
Image Analyst 2012년 5월 12일
Yes, if you know how many pixels correspond to an inch or centimeter, which you can know if you've imaged an object of known height first.
  댓글 수: 3
Walter Roberson
Walter Roberson 2012년 5월 12일
The number of pixels per cm must be known by external information, or you must image an item of known height and measure the number of pixels it occupies in the image.
Caution: measuring an item of known height only works if the people are always at exactly the same distance from the camera. If they are variable distances but each distance is known then you can adjust using trigonometry, but if you do not know the height and you do not know the distance from the camera then you cannot calculate the height.
Image Analyst
Image Analyst 2012년 5월 12일
Siva, you can use improfile() or ginput(2) to click two points on the image. Calculate the distance in pixels and call it pixelDistance. Then use inputdlg() to ask the user how many inches or centimeters that distance is, call that number realWorldDistance. Then you can calculate
calibrationFactor = realWorldDistance / pixelDistance;
Then whenever you have a pixel distance, multiply it by calibrationFactor to get the distance in real world units, or multiply by calibrationFactor^2 to get an area in real world units.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2012년 5월 12일
Thanks image analyst and Walter..
I have one more doubts.
1. whats the unit of Euclidean distance.
  댓글 수: 2
Jakob Sørensen
Jakob Sørensen 2012년 5월 12일
Standard SI unit would be meters. But depends on what units you use to calculate it...
Walter Roberson
Walter Roberson 2012년 5월 12일
If A and B are in unit U, then A^2 and B^2 would be in unit U^2, and so A^2+B^2 would be in unit U^2, and sqrt(A^2+B^2) would be in unit sqrt(U^2) which would be unit U.
Thus, as long as the units of the components are the same, the Euclidean distance will be in the same unit as the components are.

댓글을 달려면 로그인하십시오.


sara
sara 2014년 1월 9일
How do I measure a distance in real world with a picture in matlab?
  댓글 수: 1
Image Analyst
Image Analyst 2014년 1월 9일
See my demo, attached.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Feature Detection and Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by