UPDATE Vision 修正box输出
This commit is contained in:
@ -18,7 +18,6 @@ from Vision.tool.utils import find_position
|
||||
from Vision.tool.utils import class_names
|
||||
from Vision.tool.utils import get_disk_space
|
||||
from Vision.tool.utils import remove_nan
|
||||
from Vision.tool.utils import compute_pca_direction
|
||||
import time
|
||||
import os
|
||||
|
||||
@ -77,7 +76,6 @@ class Detection:
|
||||
uv = []
|
||||
seg_point = []
|
||||
box_list = []
|
||||
pca_list = []
|
||||
if Point_isVision==True:
|
||||
pm2 = pm.copy()
|
||||
pm2 = pm2.reshape(-1, 3)
|
||||
@ -153,9 +151,6 @@ class Detection:
|
||||
continue
|
||||
|
||||
# cv2.imshow('result', piont_result)
|
||||
|
||||
pca_list.append(compute_pca_direction(pm_seg))
|
||||
|
||||
'''
|
||||
拟合平面,计算法向量
|
||||
'''
|
||||
@ -231,20 +226,20 @@ class Detection:
|
||||
if save_img_piont == True:
|
||||
save_img = cv2.resize(img, (720, 540))
|
||||
cv2.imwrite(save_img_name, save_img)
|
||||
return 1, img, xyz[_idx], nx_ny_nz[_idx], box_list[_idx], pca_list[_idx]
|
||||
return 1, img, xyz[_idx], nx_ny_nz[_idx], box_list[_idx]
|
||||
else:
|
||||
if save_img_piont == True:
|
||||
save_img = cv2.resize(img,(720, 540))
|
||||
cv2.imwrite(save_img_name, save_img)
|
||||
return 1, img, None, None, None, None
|
||||
return 1, img, None, None, None
|
||||
|
||||
else:
|
||||
print("RVC X Camera capture failed!")
|
||||
return 0, None, None, None, None, None
|
||||
return 0, None, None, None, None
|
||||
|
||||
else:
|
||||
print("RVC X Camera is not opened!")
|
||||
return 0, None, None, None, None, None
|
||||
return 0, None, None, None, None
|
||||
|
||||
def release(self):
|
||||
self.camera_rvc.release()
|
||||
|
||||
Reference in New Issue
Block a user