How to detect the inner and outer diameters of one image in high quality simultaneously (0.98M 2168×2072)?

1 view (last 30 days)
I have two problems.
Problem 1. To detect the inner and outer diameters in the same image in high quality simultaneously, and the image is 0.98M(2168×2072pixel). After trying by matlab, I just can use "imfindcircles" to detect the daimeter less than 200 pixels.
Problem 2. The circles in image below is not totally circular. As a matter of fact, the two circles are a little oval. Therefore, just thinking the two circles as ovals, I want to detect Major and minor axes of the inner and outer circles in the image.
I just read the other question (, I cannot solve it.
Can you please advise on:
  • Any advice on code is welcome, I am just starting with my project, so I will go in required direct.
  • Providing some Internet links about taking photos by industrial cameras and image processing by matlab.
  • Some cases or Internet links about using matlab as software to do image processing in manufacturing plant.
Thank you, best regrads!
  1 Comment
Andy Zhao
Andy Zhao on 19 Mar 2020
I shrink the image for calculating its radius(or diameter), but I just get the inner circle's radius.
rgb = imread('RingSeal_20200314.jpg');
d = imdistline;
I = rgb2gray(rgb);
[c,r] = imfindcircles(rgb,[80,150]);
%when proccessing with an image of higher properties those parameters [x, y] are changed, althou i havent had success
After calculating by Matlab, the answer is followed:
ans =
line 1
line 2
line 3
10.791631 seconds.
shrinked image

Sign in to comment.

Accepted Answer

Shubh Sahu
Shubh Sahu on 26 Mar 2020

More Answers (0)

Community Treasure Hunt

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

Start Hunting!