이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
Is this formula correct??
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
To find the real size of an object can I use this formula
Objects original size (in m) = Objects size on sensor (in mm) * distance between camera and object (in m) / focal length (in mm)
knowing these informations
size of object: 400 pixels
working distance: 31 mm
thanks
댓글 수: 4
Walter Roberson
2012년 12월 3일
Is this still to try to find the real size of objects with the dermotoscope ?
Walter Roberson
2012년 12월 3일
We still don't understand why you don't just put an object of known size into the device and measure on the resulting image??
답변 (1개)
Image Analyst
2012년 12월 3일
Yes, that is the thin lens equation. Do you have all those quantities? Note that the size of the object is in mm, not pixels. So you have to know what length 400 pixels corresponds to on your sensor. And 31 mm is awfully close - are you sure the thin lens equation holds in that kind of "macro focus" situation? I have doubts. And if you use a good lens, for things very close (not at infinity) then the thin lens equation is not so clear. The working distance (scene-to-front of lens) is not the same as the scene-to-front principal plane for a thick lens.
This seems like the hard way of doing it though. Why not just measure something of a known length to get a spatial calibration factor?
댓글 수: 24
Carole
2012년 12월 3일
편집: Carole
2013년 1월 3일
thanks
I don't have much knowledge in this field but I'm trying to understand. This formula is used regardless of the device used??
-objet lenght is 105.6 mm with magnification *10: so it is 10.56
-Yes I'm sure about the distance working
-The focal length is 35 mm???
I found also this formula but I don't know what is the correct one
real height of the object (mm) = object height (pixels) * sensor height (mm)* distance to object (mm)/(focal length (mm) * image height (pixels))
I can't get a picture now because I don't have the device used :(
Image Analyst
2012년 12월 3일
The formula is used for thin lenses. Or it can be used for thick lenses if the thickness of the lens if much less than the working distance. So you could use it with fairly good accuracy on a working distance of 10 meters, 100 meters, or infinity. Your accuracy would not be so great with that equation if you had a digital SLR lens that was 5 cm long and you were in macro mode looking at a scene that was only 3 cm away from the lens.
See this article on magnification: http://en.wikipedia.org/wiki/Magnification The magnification is kind of a meaningless concept when you can have your image displayed on different display devices.
I don't like that second equation. How are you going to get the object height in pixels? Let's say you're looking at the sun and it's 1000 pixels high in the image on the CCD sensor. Now, can you tell me that you know how many pixels across the sun is (without knowing the real height of the sun)? You don't know but I'm sure it would be trillions if not more.
Carole
2012년 12월 3일
I can't understand the difference between thin lenses and thick lenses. How I can know if I can use this formula or no?? The distance between camera and object in the first formula should be in m or in mm??
Image Analyst
2012년 12월 3일
It doesn't matter. Just look at the equation. For units you have m = (mm * m) / mm. So look - the mm cancel out! And whatever units you use for the working distance will be the same units that the object height will have. It could be furlongs or parsecs - it doesn't matter. You can use the formula. Personally I wouldn't, but you can. If you just want to know the size of an object in the image, like we've said before, just measure some object of known height. That's how I'd do it.
Carole
2012년 12월 4일
편집: Carole
2012년 12월 20일
thanks
So I can do this:
The resolution of the image is 0.264 mm
D=400 pixels=400*0.264=105.6 mm-->D=105.64/10=10.564 mm
working distance=31 mm
focal length=35 mm
real size=(10.564*31)/35=9.35 mm
Is this correct??? the focal length given by the details of the image http://s17.postimage.org/9zhwkxv67/d_tail2.jpg is correct???
Image Analyst
2012년 12월 4일
I doubt it. What you're calling the "resolution of the image" is actually the physical size of the pixel. This is typically in the 1 - 9 microns size. I've never heard of a pixel for a digital imaging device being 0.264 mm - that would be one enormous sensor. I've never seen a sensor that's 10 centimeters across - maybe they have something like that for astronomy but it would have more than 400 pixels and so the pixel size would be much less than .264 mm (264 microns).
Carole
2012년 12월 4일
according to this image http://s8.postimage.org/eea3ekm5x/d_tails1.jpg, the resolution of my image is 96 ppp so 0.264mm*0.264mm according to this link https://www.mathworks.com/matlabcentral/answers/55386-what-s-the-relation-between-a-resolution-and-the-size-of-pixel. Is this correct???
Image Analyst
2012년 12월 4일
No. You're getting this all confused. In that thread, they're giving the actual resolution at the scene, not on the sensor. And I don't trust what your metadata says unless it's calibrated information inserted directly into the exif by the manufacturer of the instrument.
Walter Roberson
2012년 12월 4일
96 dpi is a very common resolution for displays, and is seldom the resolution of actual sensors.
Carole
2012년 12월 4일
I'm getting this all confused because I don't have much knowledge in this field :( So what are the missing parameters??
size of object: 400 pixels
working distance: 31 mm
Walter Roberson
2012년 12월 4일
You should assume that the 96 ppp is lying about the resolution of the sensor. 96 dpi is a resolution used for screens
Where are you getting the information about 400 pixels and 31 mm ?
Why is the number of pixels in these images so different from the number of pixels in your earlier thread in which 3997 pixels per meter was being discussed?
Carole
2012년 12월 4일
편집: Carole
2012년 12월 20일
400 pixels is an example.
-->D=351.230559960043
31 mm is found in the features of the device used, 35 mm is found in the details of the image http://s17.postimage.org/9zhwkxv67/d_tail2.jpg
I'm working with other images
what's the solution so?? How I can find:
-Object size on sensor (in mm).
-distance between camera and object (in m). It is 31mm????
-focal length (in mm). It is 35mm??????
Image Analyst
2012년 12월 4일
Again, I recommend that you don't do any of that. Don't bother with thin lens equations, and don't bother with exif meta data. It seems that it can't be trusted. Just wait until you get the actual instrument in hand and measure something of known dimensions. Then you'll no the absolute truth with no uncertainty.
Walter Roberson
2012년 12월 4일
I am wondering whether you really need the actual physical size of the objects, or if instead you could just work comparatively? e.g., "This object is 352 units on its major axis." ?
Walter Roberson
2012년 12월 5일
72 ppp is another common screen density, corresponding exactly to one "point" per pixel. There is a good chance that it is not the real resolution of the source image.
Carole
2012년 12월 5일
I couldn't understand the differense between this resolution and the resolution of the the source image. One image have different resolutions??????? What does a source image mean?? How can I find of the real resolution of the source image??
Walter Roberson
2012년 12월 5일
A 640 x 480 image displayed on your screen is going to have a certain physical display size. If the same image were to be displayed on my screen, it would have a different physical display size, because my display is fairly likely a different physical pixel resolution than yours is. It is the same image, but the display might be 72 ppp or 96 ppp or 150 ppp or (e.g., Apple Retina display) 326 ppp. The higher the resolution, the smaller the image displays, if one pixel of display is used for each pixel of the image.
Some display resolution is what your 72 ppp and 96 ppp probably refer to, but these figures do not tell you what the actual resolution of the image is. They do not tell you whether one original pixel is capturing information for 1/10 mm (e.g., mild magnifying glass) or for 10 million parsecs (e.g., telescope). Quoting myself:
Q: In the movie Star Wars, how large is the Imperial Battle Cruiser?
A: About 3 feet long. It just looks huge because of the camera angles and very very careful use of perspective.
Image Analyst
2012년 12월 5일
Carole, I told you how to figure it out, in my answer above and in practically every comment after that. You measure an object of known size. Plain and simple.
Image Analyst
2012년 12월 10일
Carole: Please see full demo here: http://www.mathworks.com/matlabcentral/answers/56087#answer_67994
Carole
2012년 12월 15일
편집: Carole
2012년 12월 20일
thanks for the link but any fault by the user will cause a miscalculation. How to calculate the calibration factor without user intervention. How can I measure the real size of object using the graduation and knowing for example that the diameter of object is 100 pixels
Image Analyst
2012년 12월 15일
There! Oh my gosh! You finally did it! You got a picture with a scale in it! So just run my code - and don't make any faults, whatever that means - and draw a line from the 5 mm line on the scale to the 10 mm line line on the scale, and my code will tell you how many pixels it is, and then you tell it that it is 5 mm, and you will finally get the spatial calibration that you've been after for so long.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)