Commit ccb604cc authored by yangxue's avatar yangxue

update

parent 1cddf8fe
......@@ -5,7 +5,7 @@
* @Date: 2023-09-03 03:13:41
* @email: xin.wang@waytous.com
* @LastEditors: yangxue xue.yang@waytous.com
* @LastEditTime: 2025-03-28 10:58:33
* @LastEditTime: 2025-04-02 08:12:15
*/
......@@ -552,7 +552,7 @@ int Visione_3D::Process_Instance_Objects(object_Seg_info& obj, const cv::Mat& di
// std::cout<<" instance find table vision "<<double(clock()-start_)/CLOCKS_PER_SEC<<"s"<<std::endl; //输出时间(单位:s)
// start_ = clock();
//目标bev矩形区域
// 目标bev矩形区域
cv::Rect objRc = cv::Rect(objX1, objY1, MIN(objBin.cols, objX2 + 1) - objX1, MIN(objBin.rows, objY2 + 1) - objY1);
if(nValidNum > 5 && objRc.width > 0 && objRc.height > 0)
{
......@@ -776,6 +776,7 @@ int Visione_3D::Process_objects(const cv::Mat& image, Cloud::Ptr& pcl_cloud, std
Eigen::Matrix4d c2l = m_lidar2camera.inverse();
pcl::transformPointCloud(*pcl_cloud, *camera_cloud, c2l);
// 投影到图像中, 保存全部投影index和 高度小于1.5m的index,用做落石处理
// pixel coord [y,x] -> 3d point index; 0 channel for all points, 1 channel for near-ground point
cv::Mat point_index_in_camera = cv::Mat::zeros(image.size(), CV_32SC2);// cv::Vec2i ushort
float tx = m_matrixQ.at<float>(0, 2);
float ty = m_matrixQ.at<float>(1, 2);
......@@ -932,7 +933,7 @@ int Visione_3D::Process_Instance_Objects(object_Seg_info& obj, const cv::Mat& in
n = rc.y + j;
auto indexs = indices.at<cv::Vec2i>(n,m);
index = indexs[obj.name == "stone" ? 1 : 0];
//not in mask or dont have pcl-point
//not in mask or dont have pcl-point (only use in-mask points for obj points)
if( 0 == obj.mask.at<uchar>(j,i)){
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment