single-shot-pro-cam-calib
single-shot-pro-cam-calib copied to clipboard
error use cv.findHomography
Hi Huang, now that I've run into this problem, can you please give some advice? I am using matlab2021a+mexopencv-3.4.1. Detail: 错误使用 cv.findHomography MEX �ļ���������ı��쳣�� What() ��: OpenCV(3.4.1) D:\dev\opencv\modules\calib3d\src\fundam.cpp:372: error: (-5) The input arrays should be 2D or 3D point sets in function cv::findHomography
��.
出错 Calibration.getNodesAndPrjCorners>findMatchAndWarp (第 83 行) [Hcp, inliers] = cv.findHomography(camNodesUndistort, prjNodes, ...
出错 Calibration.getNodesAndPrjCorners (第 47 行) [prjCorners(:,:,i), nodePairs{i}] = findMatchAndWarp(imLightNames{i}, ...
出错 calibrateGUI (第 93 行) [nodesCell, ~] = Calibration.getNodesAndPrjCorners(calibInfo, camParams, camCorners, verbose, useParallel);
出错 calibApp/CalibrateButtonPushed (第 868 行) calibrateGUI(app); % call calibration function
错误使用 matlab.ui.control.internal.controller.ComponentController/executeUserCallback (第 410 行) 计算 Button PrivateButtonPushedFcn 时出错。
These are the photos I took.
Can you check whether any of input to cv.findHomography
is empty?
yes, it is empty, and when I use your data, the program works fine, but the data I collect myself reports an error. Can you tell me if it is because the background of the picture taken has an effect? A pure white background is needed is it?
Because when I reshot with a different background, there had a new problem: 索引中的冒号运算符的非有限端点或增量。
出错 ImgProc.segColorGrid (第 129 行) imBWCb(y-winSize:y+winSize,x-winSize:x+winSize) = 1;
出错 ImgProc.getMatchedNodes (第 28 行) [imBWGrid, imColorGridMasked] = ImgProc.segColorGrid(whiteLight, colorGrid, camCorners, verbose);
出错 Calibration.getNodesAndPrjCorners>findMatchAndWarp (第 72 行) [camNodes, prjNodes] = ImgProc.getMatchedNodes(imLightName, imColorName, camCorners, prjW, prjH, verbose);
出错 Calibration.getNodesAndPrjCorners (第 47 行) [prjCorners(:,:,i), nodePairs{i}] = findMatchAndWarp(imLightNames{i}, ...
出错 calibrateGUI (第 93 行) [nodesCell, ~] = Calibration.getNodesAndPrjCorners(calibInfo, camParams, camCorners, verbose, useParallel);
出错 calibApp/CalibrateButtonPushed (第 868 行) calibrateGUI(app); % call calibration function
错误使用 matlab.ui.control.internal.controller.ComponentController/executeUserCallback (第 410 行) 计算 Button PrivateButtonPushedFcn 时出错。
Maybe the board segmentation did not work well on your setup. You can set break point and debug the code, see whether the intermediate results look reasonable. You can tick Verbose
option in the software to enter debug mode.
Yes, it will report an error on the segmentation part, does this look like it means that the background should be as whiteboard background as possible, as much as possible as in your case?
Here's a photo captured from my second experiment.I don't think the interference should count for much anymore, but it's still a mistake in the segmentation.
Yes, it will report an error on the segmentation part, does this look like it means that the background should be as whiteboard background as possible, as much as possible as in your case?
The checkerboard region should be all black. You can check the segmentation results of my data, and compare it with yours.