当前位置: 首页 > news >正文

网站的功能和作用罗定市住房和城乡建设局网站

网站的功能和作用,罗定市住房和城乡建设局网站,wordpress模版改版,wordpress禁止googleHALCON/C可以处理各种不同类型的字母数字混合的控制参数#xff0c;如下#xff1a; 离散数字#xff08;long#xff09;浮点数字#xff08;double#xff09;字符串#xff08;char*#xff09; 控制参数的一个特殊形式是句柄#xff0c;提供了途径去访问复杂的数…HALCON/C可以处理各种不同类型的字母数字混合的控制参数如下 离散数字long浮点数字double字符串char* 控制参数的一个特殊形式是句柄提供了途径去访问复杂的数据类型像windows,图像获取设备用于形状匹配的模型。实际上在内部句柄总是以离散数字long表示。 HALCON/C使用tuple表示控制参数的容器类。另外tuple是多态的可以包含各种类型的参数。为了实现这个目的HCtrlVal被介绍请看下一节。 The Basic Class for Control Parameters HCtrlVal是类HTuple的基类并且一般对于用户隐藏。因为它仅仅用于临时的类型转换。核心点时它包含三种基本的控制参数类型即离散数字long,浮点类型(double)字符串类型(char*)。HCtrlVal提供了以下成员函数 typedef long long Hlong;HCtrlVal(void) Default constructor. HCtrlVal(Hlong l) Constructing a value from long.HCtrlVal(int l) Constructing a value from int.HCtrlVal(double d) Constructing a value from double. HCtrlVal(const char *s) Constructing a value from char *. HCtrlVal(const HCtrlVal v) Copy constructor. ~HCtrlVal(void) Destructor. HCtrlVal operator (const HCtrlVal v) Assignment operator. int ValType() const Type of a value (O: Hlong, int; 1: float, double; 2: string). 见 enum HCtrlType {LongVal LONG_PAR, DoubleVal DOUBLE_PAR,StringVal STRING_PAR,UndefVal UNDEF_PAR };operator int(void) const Conversion to int. operator Hlong(void) const Conversion to long. operator double(void) const Conversion to double. operator const char*(void) const Conversion to char *. double D() const Accessing a value and conversion to double. Hlong L() const Accessing a value and conversion to Hlong. int I() const Accessing a value and conversion to int. const char *S() const Accessing a value and conversion to char *. HCtrlVal operator (const HCtrlVal val) const Adding two values. HCtrlVal operator - (const HCtrlVal val) const Subtracting two values. HCtrlVal operator * (const HCtrlVal val) const Multiplying two values. HCtrlVal operator / (const HCtrlVal val) const Division of two values. 这里面和我们前面介绍的HPixVal与int等各类型的转换相似HCtrlVal也提供了与基本类型的相互转换和封装。 另外有几个转换函数比较重要 double D() const Accessing a value and conversion to double. long L() const Accessing a value and conversion to long. int I() const Accessing a value and conversion to int. const char *S() const Accessing a value and conversion to char *. Tuples HTuple建立在HCtrlVal的基础上。它实现了动态长度的HCtrlVal对象的数组。默认的构造函数定义了一个空的数组Num()0。并且数组可以通过赋值动态地扩展。内存管理如重新分配、释放也由类自身管理。访问数组的序号是0到Num()-1 下面介绍几个重要的成员函数更详细地请访问%HALCONROOT%\include\cpp。 HTuple(int length, const HTuple \value) 构造指定长度的常数组同 tuple_gen_const. HCtrlVal operator [] (int i) 设置第i个元素 HCtrlVal operator [] (int i) const 读取第i个元素 数组算术运算 HTuple operator (const HTuple val) const Adding two tuples element by element, similar to the operator tuple_add. The arrays have to be of the same size. HTuple operator (double val) const HTuple operator (int val) const Adding a number to each element of the tuple, similar to the operator tuple_add. HTuple operator - (const HTuple val) const Subtracting two tuples element by element, similar to the operator tuple_sub. The arrays have to be of the same size. HTuple operator - (double val) const HTuple operator - (int val) const Subtracting a number from each element of the tuple, similar to the operator tuple_sub. HTuple operator * (const HTuple val) const Multiplying two tuples element by element, similar to the operator tuple_mult. The arrays have to be of the same size. HTuple operator * (double val) const HTuple operator * (int val) const Multiplying a number with each element of the tuple, similar to the operator tuple_mult. HTuple operator / (const HTuple val) const Division of two tuples element by element, similar to the operator tuple_div. The arrays have to be of the same size. HTuple operator / (double val) const HTuple operator / (int val) const Division of each element of the tuple by a number, similar to the operator tuple_div. 例1 #include HalconCpp.h using namespace Halcon; #include HIOStream.h #if !defined(USE_IOSTREAM_H) using namespace std; #endifvoid main() {HTuple t;cout t.Num() \n; // The length of the tuple is 0t[0] 0.815; // Assigning values to the tuplet[1] 42;t[2] HAL;cout t.Num() \n; // The length of the tuple is 3cout HTuple t \n; // Using the operator double d t[0]; // Accessing the tuple, if theint l t[1]; // the types of the elements//Hlong lt[1];const char *s t[2]; // are known// Accessing the tuple, if the types of the elements are knownprintf(Values: %g %ld %s\n, t[0].D(), t[1].L(), t[2].S()); } 句柄封装类 最突出的类是HWindow.自从Halcon 6.1开始HALCON/C也提供了访问文件或者功能的句柄类如图像获取装置测量或者基于形状的匹配。 Windows HWindow以很方便的方式提供了Halcon窗口halcon窗口的属性很容易改变。并且图像、区域、多边形等都可以显示在窗口上。下面列举常用的成员函数 创建窗口 HWindow(int Row0, int Column0, int Width-1, int Height-1, int Father 0, const char *Mode “”, const char *Host “”) Default constructor. The constructed window is opened. ~HWindow(void) Destructor. This closes the window. void Click(void) const 等待用户在窗口点击鼠标HDPoint2D GetMbutton(int *button) const HDPoint2D GetMbutton(void) const 获取鼠标点击时的坐标和鼠标的类型。见 get_mbutton. 鼠标类型 1: Left button, 2: Middle button, 4: Right button. HDPoint2D GetMposition(int *button) const HDPoint2D GetMposition(void) const 获取鼠标的位置和鼠标的点击类型不要求鼠标一定要点击。见 get_mposition. HCircle DrawCircle(void) const Waiting for the user to draw a circle in the window, see the reference manual entry of draw_circle. HEllipse DrawEllipse(void) const Waiting for the user to draw an ellipse in the window, see the reference manual entry of draw_ellipse. HRectangle1 DrawRectangle1(void) const Waiting for the user to draw a rectangle parallel to the coordinate axis in the window, see the reference manual entry of draw_rectangle1. HRectangle2 DrawRectangle2(void) const Waiting for the user to draw a rectangle with an arbitrary orientation and size in the window, see the reference manual entry of draw_rectangle2. 例2 #include HalconCpp.h using namespace Halcon;void main() {HImage image(E:\\halcon\\images\\control_unit.png); // Reading an image from a fileHWindow w; // Opening an appropriate windowimage.Display(w); // Display the imagew.SetLut(change2); // Set a lookup tablew.Click(); // Waiting for a mouse clickw.SetLut(default); // Set the default lookup tablew.SetPart(100, 100, 200, 200); // Set a part of the windowimage.Display(w);w.Click();// Adapting the part to the image againw.SetPart(0, 0, image.Height() - 1, image.Width() - 1);image.Display(w);HRegionArray regs image.Regiongrowing(1, 1, 4, 100);w.SetDraw(margin);w.SetColored(6);regs.Display(w);w.Click();image.Display(w);w.SetShape(rectangle1);regs.Display(w); } 窗口在从文件中读取图像后打开这意味着窗口被缩放到图像的大小。 The lookup table is changed afterwards, and the program waits for a mouse click in the window. A part of the image is zoomed now, and the program waits again for a mouse click in the window. By applying a region growing algorithm from the HALCON library (Regiongrowing) regions are generated and displayed in the window. Only the margin of the regions is displayed. It is displayed in 6 different colors in the window. The example ends with another way of displaying the shape of regions. The smallest rectangle parallel to the coordinate axes surrounding each region is displayed.
http://www.yutouwan.com/news/272960/

相关文章:

  • 网站建设课程下载wordpress安装包
  • 网站建设收费标准报价怎么样在百度做网站
  • win2003 iis做网站网站网页设计在哪找
  • 网站建设公司发展前景分栏型网站
  • 北京新机场建设指挥部网站惠州小程序推广
  • 河南浪博网站开发dede网站版权信息标签
  • 代制作网站wordpress++群晖
  • 网站设计培训学校有哪些百度技术培训中心
  • 网站制作流程分为哪三步广东地区建网站的公司
  • 西安网站建设的费用代理网名大全
  • 深圳网站建设服务器公司ml免费域名注册
  • win7用本地文件做网站模板黑彩网站建设运营
  • 百度云建网站做视频网站需要什么架构
  • 网站开发兴趣组网站上的代码网页怎么做的
  • php网站开发实例教程 课件做网站域名怎么选有利于seo
  • 跨境电商 网站开发徐州建设局网站
  • 万由nas做网站织梦搬家 网站空白
  • 网站运营外包方案咕果网给企业做网站的
  • 可以做链接的网站wordpress 3.7 xss
  • 建设银行 钓鱼网站韩国男女直接做的视频网站
  • 溧阳网站建设中心wordpress 页面与文章
  • 如何查看网站是不是wordpress加强图书馆网站建设
  • 东莞公司官网建站网站建设 字体版权
  • 做设计有哪些好用的素材网站旅游网站项目评估
  • 深圳网站建设公司哪家什么网站专门学做湖北菜
  • 苏州企业网站建设开发与制作太原这边有做网站的吗
  • 创建好网站如何把浏览17zwd一起做网站普宁
  • 高邮市建设局网站株洲县建设局官方网站
  • 帮别人做网站建站公司最喜欢的网站
  • 周口网站建设73data管理系统中计算机应用实践考试