Has anyone had any luck using the function detectCircleGridPoints? I can't get it to work and I have the Computer Vision Toolbox installed.
조회 수: 12 (최근 30일)
이전 댓글 표시
I have a simple calibration pattern that I would like to implement in my code, but I keep getting the following error: Unrecognized function or variable 'detectCircleGridPoints'. I am simply calling this function within my script:
fileName = 'calibration.jpeg';
img = imread(fileName);
I = rgb2gray(img);
patternDims = [9,9]
detectCircleGridPoints(I,patternDims)
What am I doing wrong?
Here is the image by the way:
댓글 수: 6
채택된 답변
yanqi liu
2022년 1월 17일
clc; clear all; close all;
fileName = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/864390/image.jpeg';
img = imread(fileName);
I = rgb2gray(img);
I2 = imresize(I, 800/size(I,1), 'bilinear');
im = I2;
I2 = imcomplement(I2);
bw = ~im2bw(I2, 0.6);
bw = bwareaopen(bw, 10);
bw = imfill(bw, 'holes');
bw2 = ~imopen(bw, strel('disk', 3));
patternDims = [9 9];
imagePoints = detectCircleGridPoints(im2uint8(bw2),patternDims,PatternType="symmetric")
J = insertText(im,imagePoints,1:size(imagePoints,1));
J = insertMarker(J,imagePoints,'x',Color="green",Size=5);
imshow(J)
title("Detected a Circle Grid of Dimensions " + mat2str(patternDims))
댓글 수: 5
yanqi liu
2022년 1월 18일
yes,sir,may be use the code we discuss,or upload your now code which find errors
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!