在QT下调用halcon显示点云时,遇到以下几个问题:

1、首先是无法将halcon窗口嵌入到自己设计的窗口中,如QLable,QWidget等;
void CHWindow::openNewWindow(QWidget *widget) { int halcon_winId =
widget->winId(); int winWidth = widget->width(); int winHeight =
widget->height(); SetWindowAttr("background_color","dim gray"); OpenWindow(0,0,
winWidth,winHeight, halcon_winId,"visible","",&m_hv_WindowHandle);
HDevWindowStack::Push(m_hv_WindowHandle); if (HDevWindowStack::IsOpen())
SetDraw(m_hv_WindowHandle,"margin"); if (HDevWindowStack::IsOpen())
SetColor(m_hv_WindowHandle,"blue"); if (HDevWindowStack::IsOpen())
SetLineWidth(m_hv_WindowHandle,2); }
2、显示点云图后右下角有一个continue按钮,想办法隐藏显示后,点击右下角位置仍有效执行continue操作等;
dump_image_output(ho_Image, hv_WindowHandleBuffer, hv_Scene3D, hv_AlphaOrig,
hv_ObjectModel3D, hv_GenParamName, hv_GenParamValue, hv_CamParam, hv_Poses,
hv_ColorImage, hv_Title, HTuple(), hv_Label, 0, "false", hv_TrackballCenterRow,
hv_TrackballCenterCol, hv_TBSize, hv_SelectedObject, hv_WindowCenteredRotation,
hv_TBCenter);
3、点云图鼠标拖动旋转界面更新卡顿,影响操作体验等;加入QCoreApplication::processEvents(); 即可解决

4、多组点云数据显示时,中间切换响应较慢等;

经过一系列调试后以上问题均已得到解决,供参考: 

技术
今日推荐
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:[email protected]
QQ群:766591547
关注微信