代码如下:
- read_image(Images, ['D:/pycharm/3D_positioning_function_experiment/dataset/rotate_image_dataset/101[205, 5.0, 1.0].jpg','D:/pycharm/3D_positioning_function_experiment/dataset/rotate_image_dataset/101[184.1, -5.0, 1.0].jpg','D:/pycharm/3D_positioning_function_experiment/dataset/rotate_image_dataset/101[184.1, 15.4, 1.0].jpg','D:/pycharm/3D_positioning_function_experiment/dataset/rotate_image_dataset/101[221.3, 13.7, 1.0].jpg'])
- From := [1,1,1,2,2,3]
- To := [2,3,4,3,4,4]
- HomMatrices2D := []
- Rows1 := []
- Cols1 := []
- Rows2 := []
- Cols2 := []
- NumMatches := []
- for J := 0 to |From|-1 by 1
- select_obj (Images, ImageF, From[J])
- select_obj (Images, ImageT, To[J])
- points_foerstner (ImageF, 1, 2, 3, 100, 0.1, 'gauss', 'true', \
- RowsF, ColsF, _, _, _, _, _, _, _, _)
- points_foerstner (ImageT, 1, 2, 3, 100, 0.1, 'gauss', 'true', \
- RowsT, ColsT, _, _, _, _, _, _, _, _)
- proj_match_points_ransac (ImageF, ImageT, RowsF, ColsF, RowsT, ColsT, \
- 'ncc', 10, 0, 0, 2560, 1440, 0, 0.5, \
- 'gold_standard', 2, 42, HomMat2D, \
- Points1, Points2)
- HomMatrices2D := [HomMatrices2D,HomMat2D]
- Rows1 := [Rows1,subset(RowsF,Points1)]
- Cols1 := [Cols1,subset(ColsF,Points1)]
- Rows2 := [Rows2,subset(RowsT,Points2)]
- Cols2 := [Cols2,subset(ColsT,Points2)]
- NumMatches := [NumMatches,|Points1|]
- endfor
- stationary_camera_self_calibration (4, 2560, 1440, 1, From, To, \
- HomMatrices2D, Rows1, Cols1, \
- Rows2, Cols2, NumMatches, \
- 'gold_standard', \
- ['focus','principal_point'], \
- 'true', CameraMatrix, Kappa, \
- RotationMatrices, X, Y, Z, Error)
复制代码
求助1:stationary_camera_self_calibration报错:未处理的程序异常:
HALCON 算子错误
当在函数 'main' 中调用 'stationary_camera_self_calibration'时。line: 28。
Wrong number of values of control parameter 7 (HALCON 错误代码: 1407)
求助2:我想把待匹配的点变为棋盘格内角点 这个代码应该怎么写?
|