Camera-to-coin distance finder and comparing their values

3 次查看(过去 30 天)
Hey,
I'm just wondering that is there any chance to do that analysis which to my problem it is Image Segmentation Tutorial analysis of finding its circular are I mean diameter of any circle of the same object in different pictures?, like same coin but its getting away from the camera and in order to detect that distance I just want it to detect the radius change and make a scale for it. Is there any chance that I can do this with a similar code like yours?, Please look at my two examples; I want to calculate their area or radius and compare them with each other so that I can detect the change and find the distance irl with a scale. It would mean a lot if you just answer me back.
Best Regards,
Batuhan

采纳的回答

Image Analyst
Image Analyst 2022-12-10
Just measure the width of a known thing, like the square or circle, in each image. You can then make up a look up table of working distance (scene-to-lens distance) vs. size in pixels. From that you can fit a function to get you the mm per pixel for any distance. Then when you plug in the known distance, you can measure the size in pixels and report the size in mm.
What was the working distance for each of the two images?
  22 个评论
Image Analyst
Image Analyst 2023-2-5
This should do it:
mask = bwareafilt(mask, 1);
subplot(2, 2, 4);
imshow(mask);
If all you see is black, then there is nothing in the original mask image -- no blobs at all.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by