Clear Filters
Clear Filters

Camera-to-coin distance finder and comparing their values

1 view (last 30 days)
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

Accepted Answer

Image Analyst
Image Analyst on 10 Dec 2022
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 Comments
Image Analyst
Image Analyst on 5 Feb 2023
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.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!