資源簡介
雙目標(biāo)定程序,用于雙目標(biāo)定。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
代碼片段和文件信息
#include?
#include?
using?namespace?std;
using?namespace?cv;
#define?LEFT?0
#define?RIGHT?1
#define?SHOW?1
int?i?=?0;
Mat?frame(1080?1920?*?2?CV_8UC3);
Size?grids(9?6);
float?Square?=?260;
Mat?Left?Right;
vector>?images(2);
vector>?detected_img(2);
vector?>?objectPoints;
vector?>?>?imagePoints(2);
void?onMouse(int?event?int?x?int?y?int?flags?void*?userdata)
{
Mat?temp0?temp1;
if?(event?==?1)
{
Left.copyTo(temp0);
Right.copyTo(temp1);
images[0].push_back(temp0);
images[1].push_back(temp1);
imwrite(“whole“+to_string(i++)?+?“.jpg“?frame);
imwrite(“l(fā)eft“?+?to_string(i)?+?“.jpg“?temp0);
imwrite(“right“?+?to_string(i)?+?“.jpg“?temp1);
}
}
vector?>?calcBoardCornerPositions(int?gridW?int?gridH?float?squareSize?int?imagesCount)
{
vector?>?objectPoints(imagesCount);
for?(int?k?=?0;?k?
評(píng)論
共有 條評(píng)論