UPDATE Vision 修正box输出
This commit is contained in:
@ -14,20 +14,15 @@ import cv2
|
||||
detection = Detection()
|
||||
|
||||
while True:
|
||||
ret, img, xyz, nx_ny_nz = detection.get_position()
|
||||
ret, img, xyz, nx_ny_nz, box = detection.get_position()
|
||||
if ret==1:
|
||||
print('xyz点云坐标:', xyz)
|
||||
print('nx_ny_nz法向量:', nx_ny_nz)
|
||||
print('矩形框四顶点:', box)
|
||||
img = cv2.resize(img,(720, 540))
|
||||
transformation_matrix = R_matrix(521.534, 0.705, 850.03, 0.0, 90.0, 0.0) # (x, y, z, u, v, w)
|
||||
target_position, noraml_base = getPosition(xyz[0], xyz[1], xyz[2], nx_ny_nz[0], nx_ny_nz[1], nx_ny_nz[2], transformation_matrix)
|
||||
target_position, noraml_base = getPosition(xyz[0], xyz[1], xyz[2], nx_ny_nz[0], nx_ny_nz[1], nx_ny_nz[2], transformation_matrix, box)
|
||||
print("target_position:", target_position)
|
||||
print("noraml_base", noraml_base)
|
||||
cv2.imshow('img', img)
|
||||
cv2.waitKey(0)
|
||||
# sysstr = platform.system()
|
||||
# if sysstr == "Windows":
|
||||
# space_free = get_disk_space(path=os.getcwd())
|
||||
# else:
|
||||
# space_free = get_disk_space(path = "D:")
|
||||
# print('剩余空间: ', space_free)
|
||||
cv2.waitKey(0)
|
||||
Reference in New Issue
Block a user