UPDATE Vision 更新图像漾SDK,补充彩色图与深度图对齐方式
This commit is contained in:
@ -11,8 +11,11 @@
|
||||
import numpy as np
|
||||
import cv2
|
||||
import open3d as o3d
|
||||
import time
|
||||
import os
|
||||
|
||||
from Vision.tool.CameraRVC import camera_rvc
|
||||
from Vision.tool.CameraPe import camera_pe
|
||||
from Vision.tool.CameraPe_color2depth import camera_pe
|
||||
from Vision.yolo.yolov8_pt_seg import yolov8_segment
|
||||
from Vision.yolo.yolov8_openvino import yolov8_segment_openvino
|
||||
from Vision.tool.utils import find_position
|
||||
@ -21,8 +24,7 @@ from Vision.tool.utils import get_disk_space
|
||||
from Vision.tool.utils import remove_nan_mean_value
|
||||
from Vision.tool.utils import out_bounds_dete
|
||||
from Vision.tool.utils import uv_to_XY
|
||||
import time
|
||||
import os
|
||||
|
||||
|
||||
class Detection:
|
||||
|
||||
@ -43,7 +45,7 @@ class Detection:
|
||||
self.seg_distance_threshold = 10 # 1厘米
|
||||
elif self.cameraType == 'Pe':
|
||||
self.camera_rvc = camera_pe()
|
||||
self.seg_distance_threshold = 10 # 2厘米
|
||||
self.seg_distance_threshold = 15 # 2厘米
|
||||
else:
|
||||
print('相机参数错误')
|
||||
return
|
||||
@ -64,7 +66,7 @@ class Detection:
|
||||
self.model = yolov8_segment_openvino(model_path, device, conf_thres=0.3, iou_thres=0.3)
|
||||
|
||||
|
||||
def get_position(self, Point_isVision=False, Box_isPoint=True, First_Depth =True, Iter_Max_Pixel = 30, save_img_point=0, Height_reduce = 50, width_reduce = 50):
|
||||
def get_position(self, Point_isVision=False, Box_isPoint=True, First_Depth =True, Iter_Max_Pixel = 30, save_img_point=0, Height_reduce = 60, width_reduce = 100):
|
||||
"""
|
||||
检测料袋相关信息
|
||||
:param Point_isVision: 点云可视化
|
||||
@ -81,7 +83,7 @@ class Detection:
|
||||
:return box_list: list 内缩检测框四顶点,形如[[x1,y1],[],[],[]]
|
||||
|
||||
"""
|
||||
ret, img, pm = self.camera_rvc.get_img_and_point_map() # 拍照,获取图像及
|
||||
ret, img, pm, _depth_align = self.camera_rvc.get_img_and_point_map() # 拍照,获取图像及
|
||||
if self.camera_rvc.caminit_isok == True:
|
||||
if ret == 1:
|
||||
if save_img_point != 0:
|
||||
|
||||
Reference in New Issue
Block a user