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

조회 수: 1 (최근 30일)
Hi,everyone.
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 (https://www.mathworks.com/matlabcentral/answers/455501-detect-and-measure-radius-of-round-object-quality-photos?s_tid=srchtitle), 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!
19.03.2020
  댓글 수: 1
Andy Zhao
Andy Zhao 2020년 3월 19일
I shrink the image for calculating its radius(or diameter), but I just get the inner circle's radius.
tic
rgb = imread('RingSeal_20200314.jpg');
subplot(2,2,1),imshow(rgb);
d = imdistline;
I = rgb2gray(rgb);
subplot(2,2,2),imshow(I)
[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
subplot(2,2,3),imshow(rgb);
viscircles(c,r);
subplot(2,2,4),imshow(I);
viscircles(c,r);
[c,r]
toc
After calculating by Matlab, the answer is followed:
ans =
line 1
183.669253750496
line 2
172.680044458067
line 3
92.6226833779506
10.791631 seconds.
shrinked image

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

채택된 답변

Shubh Sahu
Shubh Sahu 2020년 3월 26일
  댓글 수: 2
Andy Zhao
Andy Zhao 2020년 7월 15일
Group-attributes:
Children: [2×1 Line]
Visible:'on'
HitTest:'on'
Show all properties
ans =
487.3544 652.1783
It took 9.470028 seconds.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by