Trying to find chekerboard points, not returning any points with detectCheckerboardPoints

20 次查看(过去 30 天)
Hi all
I have a fisheye lens system through which I'm taking images. The images are highly distorted, but there are also many of these images, and I wanted to find an automated way of consistently undistorting them. I printed out a checkerboard pattern, and took multiple images of this pattern, a representative image shown.
However, when I try to use the detectCheckerboardPoints, I get no points back. I know that this algo is sensitive to noise, which I definitely have in my images, but I can't do a whole lot better with my current system, so this is what I've got. I've tried playing with HighDistortion toggle, the MinCornerMetric, which I set as low as 0.0002 and as high as 0.5, and the PartialDetections toggle, to no joy. Can anyone suggest further steps, or alternative algorithms, or a better way of doing this? Otherwise, I'll have to parse through hundreds of images and manually label the points, and that is likely to take a while.
Some of the pre-processing steps I've tried:
  1. imbinarize
  2. imerode
  3. medfilt2
  4. Combination of the three above steps in varied order

采纳的回答

Matt J
Matt J 2023-10-20
编辑:Matt J 2023-10-20
You can download pgonCorners,
However, it will only find the corners of one chequerboard square at a time, so you will have to extract separate images of each black square:
load chequerboard
BW=~imfill(BW,[1,1]);
BW=bwareaopen(BW,10);
BW=imclose(BW, ones(5));
BW=imerode(BW,ones(3));
rc=fliplr(vertcat(regionprops(BW,'Centroid').Centroid));
clear V
for i=height(rc):-1:1
onesquare=bwselect(BW,rc(i,1),rc(i,2));
% imdisp(onesquare)
V{i}=fliplr(pgonCorners(onesquare,4));
end
V=vertcat(V{:});
imshow(BW,[]);hold on
scatter(V(:,1),V(:,2),'r','filled','SizeData',15); hold off
  5 个评论
Alexander Dumont
Alexander Dumont 2023-10-20
I think I'm at a point where I can figure out the rest. Thank you for all the help, it saved me days of hassle.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by