我有一个点列表,内部棋盘角实际上是以大约45-50度的角度拍摄的。
我还有另一个积分列表,这次是从鸟瞰未占用的电路板。
第二个列表中有49个点,第一个列表中的点数可变,范围从20到49,具体取决于遮挡,光照和各种其他因素。
我的问题是......我是否应该使用任何方法将这些点匹配在一起以找到 最合适
模型点:
[(119, 118), (359, 118), (599, 118), (839, 118), (239, 238), (479, 238), (719, 238), (119, 358), (359, 358), (599, 358), (839, 358), (239, 478), (479, 478), (719, 478), (119, 598), (359, 598), (599, 598), (839, 598), (239, 718), (479, 718), (719, 718), (119, 838), (359, 838), (599, 838), (839, 838), (239, 118), (479, 118), (719, 118), (119, 238), (359, 238), (599, 238), (839, 238), (239, 358), (479, 358), (719, 358), (119, 478), (359, 478), (599, 478), (839, 478), (239, 598), (479, 598), (719, 598), (119, 718), (359, 718), (599, 718), (839, 718), (239, 838), (479, 838), (719, 838)]
检测点:
[(580, 188), (918, 188), (750, 191), (847, 239), (402, 240), (493, 241), (670, 241), (581, 242), (487, 298), (581, 298), (674, 298), (874, 360), (679, 362), (786, 433), (683, 435), (476, 436), (581, 437), (371, 439), (908, 511), (689, 513), (580, 516), (470, 517), (357, 518), (1046, 598), (811, 601), (695, 603), (579, 604), (461, 606), (344, 609)]
我想通过将它们除以模型的大小来归一化0-1之间的点,但是我只能从模型中获得尺寸数据,而不是检测点,因为它们可以在图像帧内的任何位置。
我也尝试迭代这些点,并在遍历各点时从当前点找到预设区域内有多少点然后这会给我一些“特征”,例如邻域点。
我尝试过这样的事情......
pointFeatures = []
ptNum = 0
for pt in model_points:
inRangePoints = 0
for i in range(len(model_points)):
if euclidean1(pt, model_points[i]) < 150:
if pt != model_points[i]:
inRangePoints += 1
pointFeatures .append((ptNum, inRangePoints, pt))
我获得了模型点的以下信息......
[(0, 2, (119, 118)), (1, 3, (359, 118)), (2, 3, (599, 118)), (3, 2, (839, 118)), (4, 4, (239, 238)), (5, 4, (479, 238)), (6, 4, (719, 238)), (7, 3, (119, 358)), (8, 4, (359, 358)), (9, 4, (599, 358)), (10, 3, (839, 358)), (11, 4, (239, 478)), (12, 4, (479, 478)), (13, 4, (719, 478)), (14, 3, (119, 598)), (15, 4, (359, 598)), (16, 4, (599, 598)), (17, 3, (839, 598)), (18, 4, (239, 718)), (19, 4, (479, 718)), (20, 4, (719, 718)), (21, 2, (119, 838)), (22, 3, (359, 838)), (23, 3, (599, 838)), (24, 2, (839, 838)), (25, 3, (239, 118)), (26, 3, (479, 118)), (27, 3, (719, 118)), (28, 3, (119, 238)), (29, 4, (359, 238)), (30, 4, (599, 238)), (31, 3, (839, 238)), (32, 4, (239, 358)), (33, 4, (479, 358)), (34, 4, (719, 358)), (35, 3, (119, 478)), (36, 4, (359, 478)), (37, 4, (599, 478)), (38, 3, (839, 478)), (39, 4, (239, 598)), (40, 4, (479, 598)), (41, 4, (719, 598)), (42, 3, (119, 718)), (43, 4, (359, 718)), (44, 4, (599, 718)), (45, 3, (839, 718)), (46, 3, (239, 838)), (47, 3, (479, 838)), (48, 3, (719, 838))]
我可以使用“邻居数”点来为数据拟合 最适合 吗?我错过了数据点和点数不均可以使我的问题有所不同吗?
我尝试使用,SIFT,ORB,FLANN等......无济于事。
我愿意接受建议。