UPDATE Vision 新增方法:用于寻找拍照点,获取图像目标及中心点云坐标
This commit is contained in:
@ -19,7 +19,6 @@ import os
|
||||
"""
|
||||
def detectionPosition_test():
|
||||
detection = Detection()
|
||||
|
||||
while True:
|
||||
ret, img, xyz, nx_ny_nz, box = detection.get_position()
|
||||
if ret==1:
|
||||
@ -35,6 +34,18 @@ def detectionPosition_test():
|
||||
cv2.imshow('img', img)
|
||||
cv2.waitKey(1)
|
||||
|
||||
def take_photo_position_test():
|
||||
detection = Detection()
|
||||
while True:
|
||||
ret, img, find_target, xyz = detection.get_take_photo_position()
|
||||
if ret==1:
|
||||
print('是否检测到目标:', find_target)
|
||||
if xyz!=None:
|
||||
print('xyz点云坐标:', xyz)
|
||||
else:
|
||||
print('目标点云无效')
|
||||
cv2.imshow('img', img)
|
||||
cv2.waitKey(1)
|
||||
|
||||
def detectionPerson_test():
|
||||
detectionPerson = DetectionPerson()
|
||||
@ -50,5 +61,6 @@ def detectionPerson_test():
|
||||
else:
|
||||
break
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
detectionPosition_test()
|
||||
Reference in New Issue
Block a user