QT+Halcon综合示例:clip回形针2D位姿检测

QT+Halcon综合示例(一):clip回形针2D位姿检测

    • 0、halcon源码:
    • 1、Qt代码:
    • 2、运行结果:

下载:clip回形针2D位姿检测

0、halcon源码:

* clip.hdev: Orientation of clips
* 
dev_close_window ()
dev_update_window ('off')
*read_image (Clip, 'clip')
read_image (Clip, 'F:/C++/5. HALCON/qtest_hc/clip_3.png')
get_image_size (Clip, Width, Height)
dev_open_window (0, 0, Width / 2, Height / 2, 'black', WindowID)
dev_display (Clip)
*设置字体
set_display_font (WindowID, 14, 'mono', 'true', 'false')
stop ()
*二进制阈值分割
binary_threshold (Clip, Dark, 'max_separability', 'dark', UsedThreshold)
connection (Dark, Single)
*利用面积特征选择区域
select_shape (Single, Selected, 'area', 'and', 2000, 10000)
dev_set_draw ('fill')
dev_set_colored (12)
dev_display (Selected)
stop ()
*显示
dev_display (Clip)
dev_set_color ('green')
dev_display (Selected)
*区域的方向:计算了距重心与最大距离轮廓上的点连线角度(弧度制)
*- pi <= Phi && Phi < pi
orientation_region (Selected, Phi)
area_center (Selected, Area, Row, Column)
dev_set_line_width (3)
dev_set_draw ('margin')
*箭头长度
Length := 90
dev_set_color ('blue')
*显示 箭头图案
disp_arrow (WindowID, Row, Column, Row - Length * sin(Phi), Column + Length * cos(Phi), 4)
disp_message (WindowID, deg(Phi)$'3.1f' + ' deg', 'image', Row, Column - 100, 'black', 'false')
dev_update_window ('on')

halcon运行:
在这里插入图片描述

1、Qt代码:

界面
在这里插入图片描述
1).pro 添加:

macx {QMAKE_CXXFLAGS += -F/Library/FrameworksQMAKE_LFLAGS   += -F/Library/FrameworksLIBS           += -framework HALCONCpp
}
else {#defineswin32:DEFINES += WIN32#includesINCLUDEPATH   += "$$(HALCONROOT)/include"INCLUDEPATH   += "$$(HALCONROOT)/include/halconcpp"#libsQMAKE_LIBDIR  += "$$(HALCONROOT)/lib/$$(HALCONARCH)"unix:LIBS     += -lhalconcpp -lhalcon -lXext -lX11 -ldl -lpthreadwin32:LIBS    += "$$(HALCONROOT)/lib/$$(HALCONARCH)/halconcpp.lib" \"$$(HALCONROOT)/lib/$$(HALCONARCH)/halcon.lib"
}

2)主函数 main.cpp 添加:

#include "widget.h"
#include <QApplication>int main(int argc, char *argv[])
{QApplication a(argc, argv);Widget w;w.show();return a.exec();
}

3)Widget.h 添加:

#ifdef WIN32
#pragma execution_character_set("utf-8")
#endif
#ifndef WIDGET_H
#define WIDGET_H#include <QWidget>
#include "HalconCpp.h"
#include "HDevThread.h"#include <QFileDialog>
#include <QMessageBox>namespace Ui {
class Widget;
}
using namespace HalconCpp;class Widget : public QWidget
{Q_OBJECTpublic:explicit Widget(QWidget *parent = 0);~Widget();private slots:void on_pushButton_clicked();        // 读取图片void on_pushButton_2_clicked();     // connectionvoid on_pushButton_3_clicked();     // select_shapevoid on_pushButton_4_clicked();     // orientationvoid on_pushButton_6_clicked();     // auto 自动处理void on_pushButton_7_clicked();     // 重置resetprivate:Ui::Widget *ui;
public:HObject  ho_Clip, ho_Dark, ho_Single, ho_Selected,ho_null;// Local control variablesHTuple  hv_Width, hv_Height, hv_WindowID1, hv_WindowID2,hv_WindowID3,hv_WindowID4,hv_UsedThreshold,hv_WindowID0;HTuple  hv_Phi, hv_Area, hv_Row, hv_Column, hv_Length;// Short Description: This procedure writes a text message.void disp_message (HTuple hv_WindowHandle, HTuple hv_String, HTuple hv_CoordSystem, HTuple hv_Row, HTuple hv_Column, HTuple hv_Color, HTuple hv_Box);// Short Description: Set font independent of OSvoid set_display_font (HTuple hv_WindowHandle, HTuple hv_Size, HTuple hv_Font, HTuple hv_Bold,HTuple hv_Slant);private:int width_sc,height_sc;   // 新键窗口的 宽高int row_o,col_o;             // 新建窗口起点HTuple test_tqual_n;
};#endif // WIDGET_H

4)Widget.cpp 添加:

#include "widget.h"
#include "ui_widget.h"Widget::Widget(QWidget *parent) :QWidget(parent),ui(new Ui::Widget)
{ui->setupUi(this);ui->label->setStyleSheet("background-color:lightGray;");ui->label_2->setStyleSheet("background-color:lightGray;");ui->label_3->setStyleSheet("background-color:lightGray;");ui->label_4->setStyleSheet("background-color:lightGray;");this->setWindowTitle("Clip(2D位姿识别)");GenEmptyObj(&ho_null);
}Widget::~Widget()
{delete ui;}// 一、读取图片
void Widget::on_pushButton_clicked()
{HObject ho_Clip0;QString fileName = QFileDialog::getOpenFileName(this, tr("文件对话框"),"F:/C++/5. HALCON/qtest_hc", tr("图片文件(*.png *.jpg *.jpeg *.bmp *.tif *.tiff);;所有文件(*)"));if(!fileName.isEmpty()){// 清空ui->pushButton_7->click();HTuple  ImageName(fileName.toLocal8Bit().data());HTuple cout_channel;ReadImage(&ho_Clip0,ImageName);// 转灰度图(可以不转)CountChannels(ho_Clip0,&cout_channel);if(cout_channel ==3){Rgb1ToGray(ho_Clip0,&ho_Clip);}else{ho_Clip = ho_Clip0;}// 获取图片尺寸GetImageSize(ho_Clip, &hv_Width, &hv_Height);// 显示:新建窗口(根据label 尺寸缩放图片)float ratio_label = (float)ui->label->width()/(float)ui->label->height();float ratio_img = (float)hv_Width/(float)hv_Height;if(ratio_label< ratio_img) // 图像比 label 矮胖{width_sc =ui->label->width();height_sc = hv_Height*ui->label->width()/hv_Width;row_o = (ui->label->height()-height_sc)/2;col_o = 0;}else{width_sc = hv_Width*ui->label->height()/hv_Height;height_sc =ui->label->height();row_o = 0;col_o = (ui->label->width()-width_sc)/2;}// 显示Hlong winID =(Hlong)ui->label->winId();SetWindowAttr("background_color","black");  // 设置窗口背景OpenWindow(row_o,col_o,width_sc,height_sc,winID,"visible","",&hv_WindowID1);HDevWindowStack::Push(hv_WindowID1); //新窗口的Push句柄if (HDevWindowStack::IsOpen()){//  显示图片SetPart(hv_WindowID1, 0, 0, hv_Height-1, hv_Width-1); // 显示部分DispObj(ho_Clip, HDevWindowStack::GetActive());   //  显示图片}}}// 二、处理图片 connection 计算连通分量
void Widget::on_pushButton_2_clicked()
{BinaryThreshold(ho_Clip, &ho_Dark, "max_separability", "dark", &hv_UsedThreshold);Connection(ho_Dark, &ho_Single);SelectShape(ho_Single, &ho_Selected, "area", "and", 4500, 10000);// 显示:// 1.新建窗口Hlong winID =(Hlong)ui->label_2->winId();OpenWindow(row_o,col_o,width_sc,height_sc,winID,"visible","",&hv_WindowID2);HDevWindowStack::Push(hv_WindowID2);if (HDevWindowStack::IsOpen()){//  2.设置显示样式SetPart(hv_WindowID2, 0, 0, hv_Height-1, hv_Width-1);SetDraw(HDevWindowStack::GetActive(),"fill");SetColored(HDevWindowStack::GetActive(),12);// 3.显示图片DispObj(ho_Selected, HDevWindowStack::GetActive());}
}// 三、显示图片select_shape
void Widget::on_pushButton_3_clicked()
{Hlong winID =(Hlong)ui->label_3->winId();OpenWindow(row_o,col_o,width_sc,height_sc,winID,"visible","",&hv_WindowID3);HDevWindowStack::Push(hv_WindowID3);if (HDevWindowStack::IsOpen()){// 显示 ho_ClipSetPart(hv_WindowID3, 0, 0, hv_Height-1, hv_Width-1);DispObj(ho_Clip, HDevWindowStack::GetActive());SetColor(HDevWindowStack::GetActive(),"green"); // 设置显示样式// 显示 ho_SelectedDispObj(ho_Selected, HDevWindowStack::GetActive());}
}// 四、处理图片 orientation
void Widget::on_pushButton_4_clicked()
{OrientationRegion(ho_Selected, &hv_Phi);AreaCenter(ho_Selected, &hv_Area, &hv_Row, &hv_Column); // 找圆形Hlong winID =(Hlong)ui->label_4->winId();OpenWindow(row_o,col_o,width_sc,height_sc,winID,"visible","",&hv_WindowID4);HDevWindowStack::Push(hv_WindowID4);if (HDevWindowStack::IsOpen()){// 再显示一遍(ho_Clip,ho_Selected)SetPart(hv_WindowID4, 0, 0, hv_Height-1, hv_Width-1);DispObj(ho_Clip, HDevWindowStack::GetActive());SetColor(HDevWindowStack::GetActive(),"green");DispObj(ho_Selected, HDevWindowStack::GetActive());//  设置显示样式(箭头)SetLineWidth(HDevWindowStack::GetActive(),3);SetDraw(HDevWindowStack::GetActive(),"margin");SetColor(HDevWindowStack::GetActive(),"blue");// 显示  箭头标记hv_Length = 80; // 箭头长度DispArrow(hv_WindowID4, hv_Row, hv_Column, hv_Row-(hv_Length*(hv_Phi.TupleSin())), hv_Column+(hv_Length*(hv_Phi.TupleCos())), 4);// 设置、显示字体set_display_font(hv_WindowID4, 14, "mono", "true", "false");disp_message(hv_WindowID4 ,((hv_Phi.TupleDeg()).TupleString("3.1f"))+" deg", "image",hv_Row, hv_Column-100, "black", "false");}
}// 自动处理
void Widget::on_pushButton_6_clicked()
{TestEqualObj(ho_Clip,ho_null,&test_tqual_n); // 若相等则区域为空,否则区域不为空if(test_tqual_n==0){ui->pushButton_2->click();ui->pushButton_3->click();ui->pushButton_4->click();}else{QMessageBox::information(this, tr("提示"),tr("未载入图片!"), QMessageBox::Ok);}
//    try
//    {
//        ui->pushButton_2->click();
//        ui->pushButton_3->click();
//        ui->pushButton_4->click();
//    }
//    catch (HalconCpp::HException)
//    {
//        QMessageBox::information(this, tr("提示"),tr("未载入图片!"), QMessageBox::Ok);
//    }}// 重置reset
void Widget::on_pushButton_7_clicked()
{// 四个窗口,清空4次for(int i=0;i<4;i++){if (HDevWindowStack::IsOpen()){CloseWindow(HDevWindowStack::Pop());}}
}void Widget::set_display_font(HTuple hv_WindowHandle, HTuple hv_Size, HTuple hv_Font, HTuple hv_Bold, HTuple hv_Slant)
{// Local iconic variables// Local control variablesHTuple  hv_OS, hv_Fonts, hv_Style, hv_Exception;HTuple  hv_AvailableFonts, hv_Fdx, hv_Indices;//This procedure sets the text font of the current window with//the specified attributes.////Input parameters://WindowHandle: The graphics window for which the font will be set//Size: The font size. If Size=-1, the default of 16 is used.//Bold: If set to 'true', a bold font is used//Slant: If set to 'true', a slanted font is used//GetSystem("operating_system", &hv_OS);// dev_get_preferences(...); only in hdevelop// dev_set_preferences(...); only in hdevelopif (0 != (HTuple(hv_Size==HTuple()).TupleOr(hv_Size==-1))){hv_Size = 16;}if (0 != ((hv_OS.TupleSubstr(0,2))==HTuple("Win"))){//Restore previous behaviourhv_Size = (1.13677*hv_Size).TupleInt();}if (0 != (hv_Font==HTuple("Courier"))){hv_Fonts.Clear();hv_Fonts[0] = "Courier";hv_Fonts[1] = "Courier 10 Pitch";hv_Fonts[2] = "Courier New";hv_Fonts[3] = "CourierNew";}else if (0 != (hv_Font==HTuple("mono"))){hv_Fonts.Clear();hv_Fonts[0] = "Consolas";hv_Fonts[1] = "Menlo";hv_Fonts[2] = "Courier";hv_Fonts[3] = "Courier 10 Pitch";hv_Fonts[4] = "FreeMono";}else if (0 != (hv_Font==HTuple("sans"))){hv_Fonts.Clear();hv_Fonts[0] = "Luxi Sans";hv_Fonts[1] = "DejaVu Sans";hv_Fonts[2] = "FreeSans";hv_Fonts[3] = "Arial";}else if (0 != (hv_Font==HTuple("serif"))){hv_Fonts.Clear();hv_Fonts[0] = "Times New Roman";hv_Fonts[1] = "Luxi Serif";hv_Fonts[2] = "DejaVu Serif";hv_Fonts[3] = "FreeSerif";hv_Fonts[4] = "Utopia";}else{hv_Fonts = hv_Font;}hv_Style = "";if (0 != (hv_Bold==HTuple("true"))){hv_Style += HTuple("Bold");}else if (0 != (hv_Bold!=HTuple("false"))){hv_Exception = "Wrong value of control parameter Bold";throw HalconCpp::HException(hv_Exception);}if (0 != (hv_Slant==HTuple("true"))){hv_Style += HTuple("Italic");}else if (0 != (hv_Slant!=HTuple("false"))){hv_Exception = "Wrong value of control parameter Slant";throw HalconCpp::HException(hv_Exception);}if (0 != (hv_Style==HTuple(""))){hv_Style = "Normal";}QueryFont(hv_WindowHandle, &hv_AvailableFonts);hv_Font = "";{HTuple end_val48 = (hv_Fonts.TupleLength())-1;HTuple step_val48 = 1;for (hv_Fdx=0; hv_Fdx.Continue(end_val48, step_val48); hv_Fdx += step_val48){hv_Indices = hv_AvailableFonts.TupleFind(HTuple(hv_Fonts[hv_Fdx]));if (0 != ((hv_Indices.TupleLength())>0)){if (0 != (HTuple(hv_Indices[0])>=0)){hv_Font = HTuple(hv_Fonts[hv_Fdx]);break;}}}}if (0 != (hv_Font==HTuple(""))){throw HalconCpp::HException("Wrong value of control parameter Font");}hv_Font = (((hv_Font+"-")+hv_Style)+"-")+hv_Size;SetFont(hv_WindowHandle, hv_Font);// dev_set_preferences(...); only in hdevelopreturn;
}void Widget::disp_message (HTuple hv_WindowHandle, HTuple hv_String, HTuple hv_CoordSystem, HTuple hv_Row, HTuple hv_Column, HTuple hv_Color, HTuple hv_Box)
{HTuple  hv_GenParamName, hv_GenParamValue;if (0 != (HTuple(hv_Row==HTuple()).TupleOr(hv_Column==HTuple()))){return;}if (0 != (hv_Row==-1)){hv_Row = 12;}if (0 != (hv_Column==-1)){hv_Column = 12;}//Convert the parameter Box to generic parameters.hv_GenParamName = HTuple();hv_GenParamValue = HTuple();if (0 != ((hv_Box.TupleLength())>0)){if (0 != (HTuple(hv_Box[0])==HTuple("false"))){//Display no boxhv_GenParamName = hv_GenParamName.TupleConcat("box");hv_GenParamValue = hv_GenParamValue.TupleConcat("false");}else if (0 != (HTuple(hv_Box[0])!=HTuple("true"))){//Set a color other than the default.hv_GenParamName = hv_GenParamName.TupleConcat("box_color");hv_GenParamValue = hv_GenParamValue.TupleConcat(HTuple(hv_Box[0]));}}if (0 != ((hv_Box.TupleLength())>1)){if (0 != (HTuple(hv_Box[1])==HTuple("false"))){//Display no shadow.hv_GenParamName = hv_GenParamName.TupleConcat("shadow");hv_GenParamValue = hv_GenParamValue.TupleConcat("false");}else if (0 != (HTuple(hv_Box[1])!=HTuple("true"))){//Set a shadow color other than the default.hv_GenParamName = hv_GenParamName.TupleConcat("shadow_color");hv_GenParamValue = hv_GenParamValue.TupleConcat(HTuple(hv_Box[1]));}}//Restore default CoordSystem behavior.if (0 != (hv_CoordSystem!=HTuple("window"))){hv_CoordSystem = "image";}//if (0 != (hv_Color==HTuple(""))){//disp_text does not accept an empty string for Color.hv_Color = HTuple();}//DispText(hv_WindowHandle, hv_String, hv_CoordSystem, hv_Row, hv_Column, hv_Color,hv_GenParamName, hv_GenParamValue);return;
}

2、运行结果:

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/491061.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

MATLAB GUI如何创建Callback函数

本文以创建按钮的Callback函数为例介绍了在MATLAB如何在GUI中创建Callback函数 首先在MATLAB中输入guide&#xff0c;打开GUI文件&#xff0c;这里我随机打开一个我之前创建的GUI文件&#xff1a; 假设现在要创建start按钮的Callback函数&#xff0c;则双击该按钮&#xff0c;…

互联网50年:从信息高速公路到超级智能的进化

来源&#xff1a;战略前沿技术编者按&#xff1a;2019年&#xff0c;迎来互联网诞生50周年。本文根据中信出版社7月出版的《崛起的超级智能&#xff1a;互联网大脑如何影响科技未来》一书的内容和观点&#xff0c;重点阐述了互联网是如何在50年中发生重大变化&#xff0c;如何促…

MATLAB摄像头可以运行但是打不开视频

今天在学习一个MATLAB关于摄像头操作的代码&#xff0c;运行之后摄像头会一闪一闪&#xff0c;但是就是打不开视频的画面&#xff0c;查看了半天代码发现代码也没有错&#xff0c;最后尝试着将代码中的下面这句中的320x240改为640x480就可以打开视频了 vid videoinput(winvid…

大脑简史(2)-研究大脑的手段

来源&#xff1a;人机与认知实验室上篇文章笔者和大家分享了认知神经科学历史上的大事件&#xff0c;这些大事件有的极大程度的改变了人们的思维&#xff0c;有的直接推动了神经科学的发展&#xff0c;可以这么说&#xff0c;没有这些前人的努力&#xff0c;就没有我们现在取得…

stm32_DMA采集一个AD数据_并通过DMA向串口发送

这是以前学32的时候写的&#xff0c;那时候学了32之后感觉32真是太强大了&#xff0c;比51强的没影。关于dma网上有许多的资料&#xff0c;关于dma采集ad网上也有很多。亲们搜搜&#xff0c;这里只贴代码了&#xff0c;其实我也想详详细细地叙述一番&#xff0c;但是自己本身打…

QT综合示例:QT串口通信

QT综合示例&#xff1a;QT串口通信0、界面&#xff1a;1、代码&#xff1a;如果用qt写程序作为上位机&#xff0c;然后通过和usb和下位机通信的时候&#xff0c;就需要用到qt中的串口通信了。 0、界面&#xff1a; 1、代码&#xff1a; 1&#xff09;.pro 添加&#xff1a; …

MATLAB GUI如何制作下拉列表

MATLAB在GUI中可以实现下图所示的下拉列表&#xff1a; 方法&#xff1a; 在MATLAB中输入guide打开一个现有的GUI或者新建一个GUI放置一个弹出式菜单&#xff0c;如图所示双击新建的弹出式菜单&#xff0c;打开检查器&#xff0c;点击检查器的“string”菜单栏右侧的按钮&…

如果每个人都是一个粒子…… | 从物理学中寻找社会规律

来源&#xff1a;环球科学人类的许多社会行为似乎是难以捉摸的&#xff0c;包括经济、交通、个人选择。不少科学家尝试从物理的角度解释人类社会&#xff0c;他们将人比作粒子&#xff0c;每个个体之间的行为、选择都会互相影响。就像物理粒子会受到不同类型的力的控制&#xf…

猎豹MFC--文件对话框CFileDialog

如下叫做打开文件对话框&#xff1a;CFileDialog类在对话框上添加文本框&#xff0c;接收回车键设置&#xff0c;多行&#xff0c;编辑修改ID&#xff0c;垂直滚动条 水平滚动条 属性设置。添加菜单资源&#xff1a;这个菜单是给主窗口使用的&#xff0c;所以在主窗口对话框属…

MATLAB的GUI界面不显示XY坐标轴

在GUI中创建一个坐标轴&#xff0c;默认会显示XY坐标&#xff0c;如下图&#xff1a; 如何关闭XY坐标轴呢&#xff1f; 首先在打开GUI界面&#xff0c;双击该坐标轴&#xff0c;在Xcolor和Ycolor中选择白色&#xff0c;将坐标轴设置为白色&#xff1a; 然后在xticklabel和ytic…

机器人工作原理的超详细解析,生动、形象!

来源&#xff1a;笑看国际风云很多人一听到“机器人”这三个字脑中就会浮现“外形酷炫”、“功能强大”、“高端”等这些词&#xff0c;认为机器人就和科幻电影里的“终结者”一样高端炫酷。其实不然&#xff0c;在本文中&#xff0c;我们将探讨机器人学的基本概念&#xff0c;…

数字图像处理:图像变换的基本模型

数字图像处理&#xff1a;图像变换的基本模型 一、常用图象的变换模型 变换模型是指根据待匹配图像与背景图像之间几何畸变的情况&#xff0c;所选择的能最佳拟合两幅图像之间变化的几何变换模型。可采用的变换模型有如下几种:刚性变换、仿射变换、透视变换和非线形变换等&am…

Nginx 的线程池与性能剖析【转载】

正如我们所知&#xff0c;NGINX采用了异步、事件驱动的方法来处理连接。这种处理方式无需&#xff08;像使用传统架构的服务器一样&#xff09;为每个请求创建额外的专用进程或者线程&#xff0c;而是在一个工作进程中处理多个连接和请求。为此&#xff0c;NGINX工作在非阻塞的…

Halcon算子学习:XLD几种边缘连接函数

Halcon算子学习&#xff1a;XLD几种边缘连接函数 1.union_cotangential_contours_xld (Contours : UnionContours : FitClippingLength, FitLength, MaxTangAngle, MaxDist, MaxDistPerp, MaxOverlap, Mode : ) 根据输入的轮廓的端点处的局部曲率&#xff0c;连接曲率满足一定…

交换机与路由器大战已结束,超大规模计算公司胜出

来源&#xff1a;云头条作者&#xff1a;Timothy Prickett Morgan是The Next Platform的联合创始人兼合作编辑。很难说会先发生什么&#xff1a;交换和路由将合并&#xff0c;还是说会出现两种功能兼具的独立网络操作系统。Arrcus去年7月推出了一种可在商用芯片上同时提供交换功…

MATLAB的GUI中给坐标轴四周加上边框

在MATLAB的GUI中如何为坐标轴四边加上方框&#xff0c;效果如下图&#xff1a; 首先打开一个GUI文件&#xff0c;建立一个坐标轴&#xff0c;如下图所示&#xff1a; 双击该坐标轴&#xff0c;在弹出的检查器中&#xff0c;在Box那一栏后面勾上&#xff0c;如下图所示&#xff…

Halcon学习笔记:Halcon标定步骤-3d_coordinates.hdev示例

Halcon标定步骤 1.设置相机内部参数的初始值 StartCamPar : [0.016,0,0.0000074,0.0000074,326,247,652,494] set_calib_data_cam_param (CalibDataID, 0, ‘area_scan_division’, StartCamPar) 1.1 相机型号 &#xff08;1&#xff09;面阵&#xff08;2&#xff09;线阵…

马斯克的脑机接口能如愿以偿吗?

来源&#xff1a;都世民科学网博客摘要&#xff1a;本文主要讨论马斯克的脑机接口设备更新的要点&#xff0c;他发布的计划真能如愿以偿吗&#xff1f;可能会出现什么问题&#xff0c;将如何应对&#xff1f;是能治病&#xff0c;还是导致新的疾病&#xff1f;关键词&#xff1…

MATLAB的GUI如何清空坐标轴的图像

下面这两句即可实现清空GUI中的坐标轴 axes(handles.axes1); %指定需要清空的坐标轴 cla reset; 但假如你之前的坐标轴四周是有边框的&#xff0c;而且是没有坐标刻度和坐标值的&#xff0c;如下图所示&#xff0c;你会发现通过上面这两句代码虽然清空了坐标轴的内容&#xf…

Halcon学习笔记:1D Measuring一维测量_fuse.hdev灯丝测量示例

Halcon学习笔记&#xff1a;1D Measuring一维测量_fuse.hdev灯丝测量示例 一.基本概念 基本流程为&#xff1a; 获取图像对图像进行灰度值标定 &#xff08;针对相机获取的图像灰度和输入能量之间的非线性关系&#xff0c;获得相机对输入能量的线性函数&#xff09;排列感兴趣…