Graphical 3D camera management system and working method thereof

文档序号:1888661 发布日期:2021-11-26 浏览:18次 中文

阅读说明:本技术 一种图形化3d相机管理系统及其工作方法 (Graphical 3D camera management system and working method thereof ) 是由 杨浩 黄杰 于 2021-07-20 设计创作,主要内容包括:本发明公开了一种图形化3D相机管理系统,包括软件应用端、图像算法库、图像算法接口层和GUI操作界面;软件应用端基于GigE Vision协议与相机端进行连接通信,根据相机的具体需求对相机进行控制和配置;图像算法库通过图像算法接口层为软件应用端提供包括标定和点云相关的图像处理相关算法定义与支持,使软件应用端通过GUI操作界面定义的组件与控件实现响应消息的交互。本发明能够丰富3D相机的功能,简化其操作过程,并且优化了相机管理软件。(The invention discloses a graphical 3D camera management system, which comprises a software application end, an image algorithm library, an image algorithm interface layer and a GUI operation interface, wherein the image algorithm library is used for storing image algorithm information; the software application end is connected and communicated with the camera end based on a GigE Vision protocol, and the camera is controlled and configured according to the specific requirements of the camera; the image algorithm library provides image processing related algorithm definition and support including calibration and point cloud correlation for the software application end through an image algorithm interface layer, so that the software application end realizes the interaction of response messages with the control through components defined by a GUI operation interface. The invention can enrich the functions of the 3D camera, simplify the operation process of the 3D camera and optimize the camera management software.)

1. A graphical 3D camera management system is characterized by comprising a software application end, an image algorithm library, an image algorithm interface layer and a GUI operation interface;

the software application end is connected and communicated with the camera end based on a GigE Vision protocol, and controls and configures the camera end according to the specific requirements of the camera, including the realization of search equipment, connection equipment, data communication, packet loss retransmission and image processing functions in a local area network;

the image algorithm library provides image processing related algorithm definition and support including calibration and point cloud correlation for the software application end through an image algorithm interface layer, and enables the software application end to realize interaction of response messages with the control through components defined by a GUI operation interface.

2. The graphical 3D camera management system according to claim 1, wherein the image algorithm interface layer is configured to encapsulate camera image processing functions, and based on the image algorithm library, the internal code of the image algorithm interface layer is modified according to camera requirements.

3. The graphical 3D camera management system of claim 1, wherein the image algorithm library comprises a PCL library, a VTK library, and an OpenCV library;

the VTK library is combined with the GUI operation interface to achieve the function of displaying the PCL view by the MFC view frame;

the PCL library is used for realizing software application endpoint cloud function encapsulation;

the OpenCV library is used for realizing calibration function packaging.

4. The graphical 3D camera management system according to claim 1, wherein the software application and GUI operation interface are implemented using Visual Studio 2013 as a development platform, Windows-based MFC framework.

5. An operating method of a graphical 3D camera management system, the operating method comprising the steps of:

s1, creating a single document MFC program, completing the original configuration of the program, and initializing the program;

s2, dividing the program interface into corresponding modules by using an OnCreateClient function according to the camera requirements, and displaying by using a CFormView view;

s3, creating a corresponding window, adding a corresponding control according to the specific requirements of the camera, and binding the control with a corresponding function by adopting a class guide to realize the corresponding function through the control;

s4, binding the corresponding window to the corresponding CFormView view; optimizing the toolbar by self-defining the toolbar and adding a function of the toolbar;

s5, using a PCL library, a VTK library and an OpenCV library as an image algorithm library; combining the VTK library with a GUI operation interface to achieve the function of displaying the PCL view by the MFC view frame; realizing software application endpoint cloud function encapsulation through a PCL library; realizing calibration function packaging through an OpenCV (open circuit vehicle library);

s6, generating an XML file of camera parameters required by the software application terminal according to the GenApi, and configuring the camera terminal according to the data;

and S7, realizing the communication between the camera end and the software application end through a GigE Vision protocol, and judging packet loss retransmission through a field of transmission data.

6. The operating method of the graphic 3D camera management system according to claim 5, wherein the process of displaying with the CFormView view in step S2 comprises the following steps:

and adding a window corresponding to the control on the CFormView view, and switching the function of the corresponding interface module through the display and hiding operation of the window.

7. The operating method of the graphical 3D camera management system according to claim 5, wherein in step S6, the process of generating an XML file of the camera parameters required by the software application according to the GenApi and configuring the camera according to the data thereof includes the following steps:

generating an XML file according to GenApi specifications of a GenICam submodule, wherein the XML file comprises camera register parameters and setting conditions;

and the address of the camera register corresponds to the address of the MFC program control, and the camera register is modified through the control to control the camera.

8. The operating method of the graphical 3D camera management system according to claim 5, wherein in step S7, the process of implementing communication between the software camera end and the application programming end through GigE Vision protocol and determining retransmission of lost packets through fields of transmitted data includes the following steps:

s71, creating a udp socket, initializing the udp socket, and setting the properties of the udp socket including the io buffer;

s72, receiving the data head frame, sending WRITEREG _ CMD _ MSG command to the camera end according to the selected port number, making the camera end reply after receiving the command, wherein the WRITEREG _ CMD _ ACK message is the data head frame and comprises the transmission file type, and the camera end distributes the memory space according to the transmission type and sends the command of transmitting the load frame;

s73, receiving the load frame, wherein the process is that the data packet is received circularly, the disorder, the packet loss or the normal arrival state of the data packet is judged according to the id of the data packet, and the process jumps out of the cycle until the tail packet is received, and whether the packet is lost is judged according to the size of the container for storing the load frame; if packet loss occurs, the process goes to S74, otherwise, the transmission process is ended;

and S74, according to the information of the lost packet stored by the camera end in the list container, requesting retransmission for the camera end by using the MV _ GEV _ PACKETRESEND _ CMD command, and if the retransmission command is not successful for more than three times, judging that the transmission fails.

Technical Field

The invention relates to the technical field of machine vision in the industrial manufacturing industry, in particular to a graphical 3D camera management system and a working method thereof.

Background

With the development of science and technology, 3D cameras have more and more applications in traditional manufacturing industry and many emerging industries, and the development of the industries towards intellectualization and modernization is strongly pushed.

The 3D camera can automatically identify and position the target in the whole view field range, and the calibration of the system is realized under different background environments. By identifying and positioning the target characteristic points and analyzing data, the position three-dimensional coordinates, the posture and the relative distance between the characteristic points of the target object can be further obtained, and the imaging of the attributes of the product, such as height, shape, size, quantity and the like, is realized. The 3D camera is composed of a camera unit and a management unit, wherein the camera unit is composed of three parts of acquisition, processing and communication, and can effectively acquire image information and preprocess and communicate images. The management unit provides interfaces for operating and managing the camera for users, and meets the requirements of the users on various aspects such as image acquisition, image processing and the like.

In recent years, although 3D cameras have been developed obviously, most companies also have management software matched with their own products, but the operation is generally complex, the functions are fixed, and secondary development is not facilitated.

Disclosure of Invention

Aiming at the defects in the prior art, the invention provides a graphical 3D camera management system and a working method thereof, which can complete the configuration of a camera, the transmission of camera data, the processing of images and the realization of a GUI (graphical user interface) based on a graphical interface, enrich the functions of the 3D camera, simplify the operation process of the 3D camera and optimize camera management software.

In order to achieve the purpose, the invention adopts the following technical scheme:

in a first aspect, an embodiment of the present invention provides a graphical 3D camera management system, where the management system includes a software application, an image algorithm library, an image algorithm interface layer, and a GUI operation interface;

the software application end is connected and communicated with the camera end based on a GigE Vision protocol, and controls and configures the camera end according to the specific requirements of the camera, including the realization of functions such as searching equipment, connecting equipment, data communication, packet loss retransmission, image processing and the like in a local area network;

the image algorithm library provides image processing related algorithm definition and support including calibration and point cloud correlation for the software application end through an image algorithm interface layer, so that the software application end realizes the interaction of response messages with the control through components defined by a GUI operation interface.

Optionally, the image algorithm interface layer is configured to implement encapsulation on a camera image processing function, and based on the image algorithm library, an internal code of the image algorithm interface layer is modified according to a camera requirement.

Optionally, the image algorithm library comprises a PCL library, a VTK library and an OpenCV library;

the VTK library is combined with the GUI operation interface to achieve the function of displaying the PCL view by the MFC view frame;

the PCL library is used for realizing software application endpoint cloud function encapsulation;

the OpenCV library is used for realizing calibration function packaging.

Optionally, the software application end and the GUI operation interface adopt Visual Studio 2013 as a development platform, and are implemented by a Windows-based MFC framework.

In a second aspect, an embodiment of the present invention provides a working method of a graphical 3D camera management system, where the working method includes the following steps:

s1, creating a single document MFC program, completing the original configuration of the program, and initializing the program;

s2, dividing the program interface into corresponding modules by using an OnCreateClient function according to the camera requirements, and displaying by using a CFormView view;

s3, creating a corresponding window, adding a corresponding control according to the specific requirements of the camera, and binding the control with a corresponding function by adopting a class guide to realize the corresponding function through the control;

s4, binding the corresponding window to the corresponding CFormView view; optimizing the toolbar by self-defining the toolbar and adding a function of the toolbar;

s5, using a PCL library, a VTK library and an OpenCV library as an image algorithm library; combining the VTK library with a GUI operation interface to achieve the function of displaying the PCL view by the MFC view frame; realizing software application endpoint cloud function encapsulation through a PCL library; realizing calibration function packaging through an OpenCV (open circuit vehicle library);

s6, generating an XML file of camera parameters required by the software application terminal according to the GenApi, and configuring the camera terminal according to the data;

and S7, realizing the communication between the camera end and the software application end through a GigE Vision protocol, and judging packet loss retransmission through a field of transmission data.

Optionally, in step S2, the process of displaying with CFormView view includes the following steps:

and adding a window corresponding to the control on the CFormView view, and switching the function of the corresponding interface module through the display and hiding operation of the window.

Optionally, in step S6, the process of generating an XML file of camera parameters required by the software application end according to the GenApi, and configuring the camera end according to the data thereof includes the following steps:

generating an XML file according to GenApi specifications of a GenICam submodule, wherein the XML file comprises camera register parameters and setting conditions;

and the address of the camera register corresponds to the address of the MFC program control, and the camera register is modified through the control to control the camera.

Optionally, in step S7, the process of implementing communication between the camera end and the software application end through the GigE Vision protocol, and determining packet loss retransmission through a field of the transmission data includes the following steps:

s71, creating a udp socket, initializing the udp socket, and setting the properties of the udp socket including the io buffer;

s72, receiving the data head frame, sending WRITEREG _ CMD _ MSG command to the camera end according to the selected port number, making the camera end reply after receiving the command, wherein the WRITEREG _ CMD _ ACK message is the data head frame and comprises the transmission file type, and the camera end distributes the memory space according to the transmission type and sends the command of transmitting the load frame;

s73, receiving the load frame, wherein the process is that the data packet is received circularly, the disorder, the packet loss or the normal arrival state of the data packet is judged according to the id of the data packet, and the process jumps out of the cycle until the tail packet is received, and whether the packet is lost is judged according to the size of the container for storing the load frame; if packet loss occurs, the process goes to S74, otherwise, the transmission process is ended;

and S74, according to the information of the lost packet stored by the camera end in the list container, requesting retransmission for the camera end by using the MV _ GEV _ PACKETRESEND _ CMD command, and if the retransmission command is not successful for more than three times, judging that the transmission fails.

The invention has the beneficial effects that:

(1) the invention completes the configuration of the camera, the transmission processing of the camera data and the realization of the GUI interface based on the graphical interface, and reduces the development difficulty compared with the general text programming.

(2) The invention can conveniently operate the camera through the GUI operation interface, simply realize and modify the existing functions through the GUI interface and is convenient to debug.

(3) The invention can adopt the optimal image algorithm by self-defining the image algorithm library and realize the image processing function by utilizing the faster processing speed of the computer.

(4) The invention is developed through MFC, and has sufficient interfaces, thereby facilitating secondary development.

Drawings

Fig. 1 is a schematic structural diagram of a graphical 3D camera management system according to an embodiment of the present invention.

Fig. 2 is a schematic view of an operation interface of the graphical 3D camera management system according to the embodiment of the present invention.

Fig. 3 is a schematic diagram of an editing process of the software application according to the embodiment of the present invention.

Fig. 4 is a schematic operation flow diagram of the GUI operation interface according to the embodiment of the present invention.

Detailed Description

The present invention will now be described in further detail with reference to the accompanying drawings.

It should be noted that the terms "upper", "lower", "left", "right", "front", "back", etc. used in the present invention are for clarity of description only, and are not intended to limit the scope of the present invention, and the relative relationship between the terms and the terms is not limited by the technical contents of the essential changes.

Example one

Fig. 1 is a schematic structural diagram of a graphical 3D camera management system according to an embodiment of the present invention. The embodiment is applicable to the case of realizing graphical management of the 3D camera through a device such as a server, and the system can be realized in a software and/or hardware manner and can be integrated in an electronic device, for example, an integrated server device.

Referring to fig. 1, the management system includes a software application terminal, an image algorithm library, an image algorithm interface layer and a GUI operation interface.

The camera end is a collection module of camera image data, which is formed by combining an image sensor and an embedded processing board. The camera end is used for collecting image data and sending the image data to the software application end.

The software application end is connected and communicated with the camera end based on a GigE Vision protocol, the camera end is controlled and configured according to the specific requirements of the camera, and functions including searching equipment, connecting equipment, data communication, packet loss retransmission, image processing and the like in a local area network are realized.

The image algorithm library provides image processing related algorithm definition and support including calibration and point cloud correlation for the software application end through an image algorithm interface layer, so that the software application end realizes the interaction of response messages with the control through components defined by a GUI operation interface. Illustratively, the image algorithm library includes PCL library, VTK library, and OpenCV library; the VTK library is combined with the GUI operation interface to achieve the function of displaying the PCL view by the MFC view frame; the PCL library is used for realizing the cloud function encapsulation of the software application endpoint; the OpenCV library is used for realizing calibration function packaging.

The image algorithm interface layer is used for packaging the camera image processing function, and internal codes of the image algorithm interface layer are modified according to camera requirements based on an image algorithm library. The GUI operation interface operates the camera through a graphical interface to complete corresponding functions.

In this embodiment, the software application end and the GUI operation interface adopt Visual Studio 2013 as a development platform, and are implemented by an MFC framework based on Windows. Fig. 2 is a schematic view of an operation interface of the graphical 3D camera management system according to the embodiment of the present invention.

Example two

The embodiment of the invention provides a working method of a graphical 3D camera management system, which comprises the following steps:

and S1, creating a single document MFC program, completing the original configuration of the program, and initializing the program.

And S2, dividing the program interface into corresponding modules by using an OnCreateClient function according to the camera requirements, and displaying by using a CFormView view. Preferably, in the embodiment, a control is not selected to be directly added to the CFormView view, but a window corresponding to the control is added to the CFormView, and the enrichment of the corresponding module function is realized through the display and hiding operation of the window.

And S3, creating a corresponding window, adding a corresponding control according to the specific requirements of the camera, and binding the control and the corresponding function by adopting a class guide so as to realize the corresponding function through the control.

S4, binding the corresponding window to the corresponding CFormView view; because the default toolbar is poor in practicability, the embodiment provides that the toolbar is optimized by self-defining and adding a function of the toolbar.

S5, using a PCL library, a VTK library and an OpenCV library as an image algorithm library; combining the VTK library with a GUI operation interface to achieve the function of displaying the PCL view by the MFC view frame; realizing software application endpoint cloud function encapsulation through a PCL library; and realizing the encapsulation of a calibration function through an OpenCV (open circuit vehicle library).

And S6, generating an XML file of camera parameters required by the software application terminal according to the GenApi, and configuring the camera terminal according to the data. Specifically, firstly, an XML file is generated according to the GenApi specification of the GenICam submodule, and the contents of the XML file mainly include parameters and setting conditions of a camera register. Second, the camera register address corresponds to the MFC program control address, so that the camera register can be modified through the control to control the camera.

And S7, realizing the communication between the camera end and the software application end through a GigE Vision protocol, and judging packet loss retransmission through a field of transmission data. Specifically, firstly, the server searches for devices in the local area network by broadcasting an MV _ GEV _ discover _ CMD command, and after receiving the broadcast information, the camera returns and stores dev _ name, mac, udp _ port, ip _ addr and other messages of the camera to the server by an MV _ GEV _ discover _ ACK command. Then, the flow channel needs to be opened to transmit data.

Optionally, the process of implementing communication between the camera end and the software application end through the GigE Vision protocol, and determining packet loss retransmission through the field of the transmission data includes the following steps:

s71, creating a udp socket, initializing the udp socket, and setting the properties of the udp socket including io buffering.

And S72, receiving the data head frame, sending a WRITEREG _ CMD _ MSG command to the camera end according to the selected port number, making the camera end respond to the command after receiving the command, wherein a WRITEREG _ CMD _ ACK message is the data head frame and comprises a transmission file type, and the camera end allocates a memory space according to the transmission type and sends a command for transmitting the load frame.

S73, receiving the load frame, wherein the process is that the data packet is received circularly, the disorder, the packet loss or the normal arrival state of the data packet is judged according to the id of the data packet, and the process jumps out of the cycle until the tail packet is received, and whether the packet is lost is judged according to the size of the container for storing the load frame; if packet loss occurs, the process proceeds to S74, otherwise, the transmission flow is ended.

And S74, according to the information of the lost packet stored by the camera end in the list container, requesting retransmission for the camera end by using the MV _ GEV _ PACKETRESEND _ CMD command, and if the retransmission command is not successful for more than three times, judging that the transmission fails.

Fig. 3 is a schematic diagram of an editing process of a software application end according to an embodiment of the present invention. The editing process of the software application end is as follows: in a complete program development process, a user needs to implement encapsulation of function functions such as searching equipment, connecting equipment, data communication, packet loss retransmission, image processing and the like in a local area network according to specific requirements of a camera. The software application side is realized through an object-oriented technology.

Fig. 4 is a schematic operation flow diagram of the GUI operation interface according to the embodiment of the present invention. Operation flow data of the GUI: in the process of one-time complete program development, a user opens a software application end and initializes a project; and the user opens the resource view, adds the corresponding control, adjusts the position and the layout of the control and adds the response function of the control through the class guide.

The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above-mentioned embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may be made by those skilled in the art without departing from the principle of the invention.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:AUTOSAR架构下基于模型的冻结帧数据实现方法及计算机设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!