GigE interface camera driving method based on universal SDK (Software Development Kit)

Through the GigE interface camera driving method based on the general SDK, the problem of incompatibility of industrial cameras of different brands is solved, unified control of cameras of different brands is achieved, development efficiency and system scalability are improved, and multiple imaging needs are met.

CN119110155APending Publication Date: 2024-12-10NINGBO YIK TONG INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411128244.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The SDKs of different brands of industrial cameras are incompatible, resulting in increased development and maintenance costs and complexity in machine vision systems, making it difficult to meet a variety of imaging needs.

Method used

Provide a GigE interface camera driving method based on a general SDK, and controls the controlled camera with a GigE interface through the API interface in the general SDK, including GVCP module, GVSP module, UDP communication module, register and command word information configuration module and the camera function module, obtain and parse the camera's registers and command word information, construct control command data packets, and realize unified control of cameras of different brands.

Benefits of technology

It realizes a cross-brand compatible GigE interface camera control solution, which improves the versatility and convenience of camera drivers, reduces development costs, and significantly improves development efficiency and system scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119110155A_ABST
    Figure CN119110155A_ABST
Patent Text Reader

Abstract

The invention discloses a GigE interface camera driving method based on a general SDK, and relates to the field of GigE interface camera driving. According to the method and the device, the problem that SDKs of cameras of various brands aiming at the GigE interface are incompatible in the prior art is solved. According to the invention, the universal SDK provides a set of complete camera function API interface for the third-party client based on the GigE Vision communication protocol, so that the user can easily realize efficient driving and control of the camera. According to the method, the register and the command word information corresponding to the corresponding functions of the camera are acquired, so that the universal SDK has the capability of configuring the control commands of the cameras of different brands, and the control of the cross-brand compatible GigE interface camera is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of GigE interface camera driving. Background Art

[0002] With the rapid development of machine vision technology, images are increasingly used in the industrial field. Machine vision systems can replace human eyes to identify surface defects of products, thereby liberating human resources and improving production efficiency. In a complete machine vision system, the optical system and image processing system are crucial components. The quality of the optical system directly affects the imaging quality of the image, and the image processing system needs to process, analyze and identify the acquired images, which directly determines the entire system's ability to acquire and analyze external information. As an important part of the optical system, the camera is responsible for image acquisition, and its performance directly affects the quality of subsequent image processing results. However, in actual machine vision application systems, in order to meet different imaging requirements, cameras of multiple brands are usually required. Since the SDKs of different camera brands are often incompatible, this brings many inconveniences to the application development and maintenance of industrial cameras. For example, if a camera needs to be replaced with a camera of another brand, but the original SDK cannot drive the new camera, it is necessary to replace the SDK for the new camera, which increases the development cost and complexity. Therefore, researching and developing a universal SDK that can drive cameras of different brands has important practical application value.

[0003] The GigE Vision protocol is a universal industrial camera interface protocol based on Gigabit Ethernet, which was released by the Automatic Imaging Association (AIA) in 2006. It has the advantages of plug-and-play, anti-interference, and long-distance transmission. With the development of intelligent manufacturing, the demand for anti-interference and stable transmission is increasing, so the GigE Vision protocol has become one of the mainstream interfaces in the field of industrial cameras. However, there are relatively few detailed implementation documents for this protocol, and most industrial cameras rely on imported equipment. Therefore, studying and implementing the GigE image transmission protocol can promote the development of this field.

[0004] Camera manufacturers usually provide rich SDK resources for developers to develop. SDK (Software Development Kit) is a collection of tools, libraries, documents and sample codes for developing software applications. With SDK, developers can build, test and deploy applications more easily, speeding up the development process. However, due to the incompatibility of SDKs of cameras of different brands, developers often need to use different SDKs for each camera, which greatly increases the cost and complexity of early development and later maintenance.

[0005] In order to meet the requirements of machine vision application systems for multiple imaging needs, it is usually necessary to equip cameras of multiple brands. However, the SDKs of cameras of different brands are incompatible, which brings certain difficulties and complexities to the development and maintenance of the camera framework of the application. Considering that the penetration rate of GigE interface cameras in the market is relatively high, and GigE interface cameras are widely used in various application scenarios, and the SDKs of various brands of cameras with GigE interface also have incompatibility issues, therefore, the above problems need to be solved urgently. Summary of the invention

[0006] The present invention aims to solve the problem of incompatibility of SDKs of cameras of various brands with GigE interfaces in the prior art and to provide a GigE interface camera driving method based on a universal SDK.

[0007] A GigE interface camera driving method based on a universal SDK. The method allows a third-party client to control corresponding functions of a controlled camera with a GigE interface by calling corresponding function API interfaces in the universal SDK. The universal SDK communicates with the GigE interface of the controlled camera based on the GigE Vision communication protocol.

[0008] Preferably, the general SDK includes a GVCP module, a GVSP module, a UDP communication module, a register and command word information configuration module and a camera function module;

[0009] The control information sent by the third-party client to control the corresponding function of the camera of the corresponding brand is transmitted to the register and command word information configuration module through the corresponding function API interface of the camera function module; wherein the control information to control the corresponding function of the camera of the corresponding brand includes the control function name, control function parameters and controlled camera parameter information;

[0010] The register and command word information configuration module obtains the register and command word information corresponding to the control information of the corresponding function according to the camera parameters in the control information of the corresponding function received, and sends it to the GVCP module;

[0011] The GVCP module is used to construct a control instruction data packet of the corresponding function according to the register and command word information corresponding to the received control information of the corresponding function in accordance with the GigE Vision communication protocol, and send it to the GigE interface of the controlled camera through the UDP communication module;

[0012] The GVCP module is also used to parse the response of the corresponding function sent by the GigE interface of the controlled camera received through the UDP communication module in accordance with the GigE Vision communication protocol, and upload the parsing result to the third-party client through the corresponding function API interface of the camera function module;

[0013] The GVSP module is used to parse the GVSP image data packets received from the GigE interface of the camera through the UDP communication module, and send the parsing results to the third-party client through the corresponding function API interface of the camera function module.

[0014] Preferably, obtaining the register and command word information corresponding to the control information of the corresponding function includes two methods:

[0015] The first method: first obtain the XML files of the corresponding brand of cameras through the client of each brand of camera, and store the XML files of multiple brands of cameras in the register and command word information configuration module;

[0016] The register and command word information configuration module calls the XML file of the corresponding brand camera from the XML files of multiple brands of cameras according to the camera parameters in the control information of the corresponding function received, parses the XML file, and extracts the register and command word information corresponding to the control information of the corresponding function from the parsed XML file;

[0017] The second method is to open the client software of each brand of camera on the computer, control the functions of the corresponding brand of camera through the client software of each brand of camera, run the packet capture software in the background of the computer, capture the data packets under the corresponding control, obtain the register and command word information of the corresponding function by analyzing the content of the data packet, and store it in the register and command word information configuration module;

[0018] The register and command word information configuration module calls the register and command word information corresponding to the control information of the corresponding function of the corresponding brand of camera from the register and command word information corresponding to all functions of multiple brands of cameras according to the camera parameters in the control information of the corresponding function received.

[0019] Preferably, the camera function module includes an API interface and a variable unit for controlling various functions of the camera; wherein the variable unit stores parameter information of the controlled camera, intermediate variables used by the API interfaces of various functions, a picture arrival callback function and an exposure event callback function.

[0020] Preferably, the controlled camera parameter information includes the network port IP address, the camera IP address, the network port MAC address, the subnet mask, the default gateway, the camera manufacturer name and the camera serial number.

[0021] Preferably, when a third-party client calls the API interface of a corresponding function, the controlled camera parameters are retrieved from the variable unit through the API interface of the function, and the controlled camera parameters, as well as the control function name and control function parameters corresponding to the API interface are passed to the register and command word information configuration module.

[0022] Preferably, the API interface for controlling various functions of the camera includes an API interface for discovering a GigE interface camera, an API interface for constructing a camera instance, an API interface for obtaining camera control rights, an API interface for configuring a stream channel, an API interface for setting an acquisition mode, an API interface for setting imaging parameters, an API interface for starting acquisition, an API interface for triggering an operation, an API interface for obtaining the current single-frame image, an API interface for exiting acquisition, and an API interface for releasing camera control rights, and all API interfaces can call the controlled camera parameter information from the variable unit;

[0023] The control function name of the API interface for discovering GigE interface cameras is Discover GigE interface cameras;

[0024] The control function name of the API interface for constructing a camera instance is construct camera instance;

[0025] The control function name of the API interface for obtaining camera control rights is Get Camera Control Rights;

[0026] The control function name of the API interface for configuring the flow channel is Configure Flow Channel;

[0027] The control function name of the API interface of the collection mode setting is collection mode setting;

[0028] The control function name of the API interface for imaging parameter setting is parameter setting;

[0029] The control function name of the API interface for starting collection is Start Collection;

[0030] The control function name of the trigger operation API interface is trigger operation;

[0031] The control function name of the API interface for obtaining the current single-frame image is Get Single-Frame Image;

[0032] The control function name of the API interface for exiting collection is Exit Collection;

[0033] The control function name of the API interface for releasing the camera control right is Release Camera Control Right.

[0034] Preferably, the functional parameters corresponding to the API interface for setting the acquisition mode include setting the trigger mode and setting the continuous acquisition mode; wherein the trigger mode includes hard trigger and soft trigger, and the continuous acquisition mode includes the camera acquiring and transmitting images at a fixed frame rate without the need for external triggering.

[0035] Preferably, when the acquisition API interface is opened and the parsed image data packet is received, the trigger action lock flag position in the intermediate variable used by the trigger operation API interface is set to true, indicating that the image data is being received; when the trigger operation API interface is called at this time, the trigger operation API interface will wait until the current image data packet is received, set the trigger action lock flag position to false, and then execute the trigger operation.

[0036] Preferably, there are two ways for the general SDK to collect and obtain pictures: one is to actively obtain a single-frame image at the current moment, and the other is to use a picture arrival callback mechanism.

[0037] Advantages of the present invention:

[0038] The present invention realizes a cross-brand compatible GigE interface camera control solution. The implementation of the GigE interface camera driving method based on the universal SDK of the present invention not only greatly improves the versatility and convenience of camera driving, but also provides strong technical support for the integrated application of multi-brand cameras. Through the present invention, users do not need to write specific driver programs for cameras of different brands. By driving the corresponding functions of the camera through the corresponding function API interface in the universal SDK of the present invention, comprehensive control of the camera can be achieved, which significantly improves the development efficiency and scalability of the system.

[0039] The core of the universal SDK of the present invention that can achieve universal control of different brands is how to obtain the register and command word information corresponding to the control information for controlling the corresponding functions of the camera. There are two ways for the register and command word information configuration module to obtain the register address and command word information required for the control information for controlling the corresponding functions of the camera. The first is to parse the camera XML file stored in the module through the internal register and command word information configuration module of the universal SDK, so as to extract the register and field information of the corresponding command; the second is to open the client software that comes with the camera, perform corresponding control operations on the camera, capture the data packet of the corresponding control command by running the packet capture software in the background, and then analyze the data packet content to obtain it. With these two methods, the driving method of the present invention can accurately construct the control instruction data packet to ensure effective control of GigE interface cameras of various brands. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a schematic diagram of the interaction between the general SDK, the controlled camera and the third-party client;

[0041] Figure 2 It is a complete example flow chart of the GigE interface camera driving method based on the universal SDK of the present invention. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0044] The present invention provides a universal GigE interface camera SDK. A universal GigE camera control method is implemented based on the functional interface provided by the universal SDK, aiming to reduce the development and maintenance costs of the camera framework in the visual system and avoid the inconvenience caused by using cameras of different brands for multiple positions in application scenarios such as surface mounted intelligent equipment.

[0045] See also Figure 1 This embodiment describes a GigE interface camera driving method based on a universal SDK. This method allows a third-party client to control the corresponding functions of a controlled camera with a GigE interface by calling the corresponding function API interface in the universal SDK, wherein the universal SDK communicates with the GigE interface of the controlled camera based on the GigE Vision communication protocol. The full name of API is Application Programming Interface.

[0046] Furthermore, the general SDK includes the GVCP module, GVSP module, UDP communication module, register and command word information configuration module, and camera function module;

[0047] The control information sent by the third-party client to control the corresponding function of the camera of the corresponding brand is transmitted to the register and command word information configuration module through the corresponding function API interface of the camera function module; wherein the control information to control the corresponding function of the camera of the corresponding brand includes the control function name, control function parameters and controlled camera parameter information;

[0048] The register and command word information configuration module obtains the register and command word information corresponding to the control information of the corresponding function according to the camera parameters in the control information of the corresponding function received, and sends it to the GVCP module;

[0049] The GVCP module is used to construct a control instruction data packet of the corresponding function according to the register and command word information corresponding to the received control information of the corresponding function in accordance with the GigE Vision communication protocol, and send it to the GigE interface of the controlled camera through the UDP communication module;

[0050] The GVCP module is also used to parse the response of the corresponding function sent by the GigE interface of the controlled camera received through the UDP communication module in accordance with the GigE Vision communication protocol, and upload the parsing result to the third-party client through the corresponding function API interface of the camera function module;

[0051] The GVSP module is used to parse the GVSP image data packets received from the GigE interface of the camera through the UDP communication module, and send the parsing results to the third-party client through the corresponding function API interface of the camera function module.

[0052] Furthermore, there are two ways to obtain the register and command word information corresponding to the control information of the corresponding function:

[0053] The first method is: firstly, the XML files of cameras of various brands are obtained through the clients of the cameras of respective brands, and stored in the register and command word information configuration module; the register and command word information configuration module calls the XML file of the corresponding brand camera from the XML files of cameras of various brands according to the camera parameters in the control information of the corresponding function received, and parses the XML file, and extracts the register and command word information corresponding to the control information of the corresponding function from the parsed XML file;

[0054] The second method is to open the client software of each brand of camera on the computer, control the functions of the corresponding brand of camera through the client software of each brand of camera, run the packet capture software in the background of the computer, capture the data packet under the corresponding control, obtain the register and command word information of the corresponding function by analyzing the content of the data packet, and store it in the register and command word information configuration module; the register and command word information configuration module calls the register and command word information corresponding to the control information of the corresponding function of the corresponding brand of camera from the register and command word information corresponding to all functions of multiple brands of cameras according to the camera parameters in the control information of the corresponding function received.

[0055] Furthermore, in the general SDK, the camera function modules include API interfaces and variable units for controlling various camera functions; wherein the variable units store parameter information of the controlled camera, intermediate variables used by the API interfaces of various functions, image arrival callback functions, and exposure event callback functions.

[0056] Furthermore, when a third-party client calls the API interface of the corresponding function, the controlled camera parameters are retrieved from the variable unit through the API interface of the function, and the controlled camera parameters, as well as the control function name and control function parameters corresponding to the API interface are passed to the register and command word information configuration module.

[0057] Furthermore, in the general SDK, the API interfaces for controlling various functions of the camera include the API interface for discovering GigE interface cameras, the API interface for constructing camera instances, the API interface for obtaining camera control rights, the API interface for configuring stream channels, the API interface for setting acquisition modes, the API interface for setting imaging parameters, the API interface for starting acquisition, the API interface for triggering operations, the API interface for obtaining the current single-frame image, the API interface for exiting acquisition, and the API interface for releasing camera control rights, and all API interfaces can call the controlled camera parameter information from the variable unit;

[0058] The control function name of the API interface for discovering GigE interface cameras is Discover GigE interface cameras;

[0059] The control function name of the API interface for constructing a camera instance is construct camera instance;

[0060] The control function name of the API interface for obtaining camera control rights is Get Camera Control Rights;

[0061] The control function name of the API interface for configuring the flow channel is Configure Flow Channel;

[0062] The control function name of the API interface of the collection mode setting is collection mode setting;

[0063] The control function name of the API interface for imaging parameter setting is parameter setting;

[0064] The control function name of the API interface for starting collection is Start Collection;

[0065] The control function name of the trigger operation API interface is trigger operation;

[0066] The control function name of the API interface for obtaining the current single-frame image is Get Single-Frame Image;

[0067] The control function name of the API interface for exiting collection is Exit Collection;

[0068] The control function name of the API interface for releasing the camera control right is Release Camera Control Right.

[0069] Furthermore, the functional parameters corresponding to the API interface of the acquisition mode setting include setting the trigger mode and setting the continuous acquisition mode; wherein the trigger mode includes hard trigger and soft trigger, and the continuous acquisition mode includes the camera acquiring and transmitting images at a fixed frame rate without the need for external triggering.

[0070] Furthermore, there are two ways for the general SDK to collect and obtain images: one is to actively obtain a single-frame image at the current moment, and the other is to use the image arrival callback mechanism.

[0071] The first method is to make the main thread of the general SDK enter a blocked state by calling the API interface for obtaining the current single-frame image through a third-party client, until a frame of image data is received and parsed by the GVSP module or the thread blocking wait times out before resuming the operation of the main thread. If image data arrives and all image data packets are received, the API interface for obtaining the current single-frame image returns a correct code to the third-party client. If the blocking wait times out, the API interface for obtaining the current single-frame image returns a timeout error code to the third-party client. The blocking wait time can be customized by the user.

[0072] The second method is that every time a frame of image data arrives and is received, the image data pointed to by the image data pointer inside the universal SDK will be overwritten and updated by the current frame data, and the registered callback function will be automatically called to perform the defined operation.

[0073] Furthermore, after configuring the stream channel, the Universal SDK will start a sub-thread in the configured stream channel API that loops and waits for the exposure event signal. When the camera exposure is completed, the image data receiving thread started in the Universal SDK will send a signal when the first image data packet arrives, and then notify the sub-thread that loops and waits for the exposure event signal to enter the next operation. If the application registers an exposure event callback function, it will asynchronously execute the exposure event callback function registered by the user, and then loop into the waiting for the next exposure event signal.

[0074] Furthermore, when the acquisition API interface is enabled and receives the parsed image data packet, the trigger action lock flag position in the intermediate variable used by the trigger operation API interface will be set to true, indicating that the image data is being received; when the trigger operation API interface is called at this time, the trigger operation API interface will wait for the current image data packet to be received, set the trigger action lock flag position to false, and then execute the trigger operation. This ensures that the image data packet of the previous frame has been received before each trigger, and the general SDK is ready to receive the next frame of image data, which ensures the security of image data transmission to a certain extent. Before soft triggering, it will first check whether the trigger action lock flag position is false; if it is true, wait for the flag position to be false before the next trigger, if the waiting timeout interface returns failure. Only when the asynchronous receiving tasks corresponding to all image data packets of a single frame image are enabled, the flag position is set to false to ensure that all asynchronous receiving tasks are ready before triggering.

[0075] Specific application examples include Figure 2 As shown, it takes a Demo learning routine in the general SDK toolkit as an example to generally demonstrate the macro management and basic action control of the GigE interface camera. The application of the general SDK can set many learning routines, which can be set manually according to needs. These operations are all implemented by calling the corresponding functional API interface in the general SDK of the present invention, and the calling sequence of the corresponding functional API interface can be set in advance. The following is to control the controlled camera with a GigE interface through the corresponding functional API interface in the general SDK, control the controlled camera to perform image acquisition, and exit image acquisition. The specific implementation steps are provided as follows:

[0076] Step 1: Discover GigE camera devices. The third-party client calls the API interface of the general SDK to discover GigE interface cameras, obtains the parameter information of all GigE interface cameras connected to the network port, and stores all the obtained information in the variable unit. The camera parameter information includes the network port IP address, camera IP address, network port MAC address, subnet mask, default gateway, camera manufacturer name, camera serial number, etc.

[0077] Step 2: Construct a camera instance. The third-party client calls the API interface for constructing a camera instance of the general SDK to construct a camera instance according to the camera parameter information obtained by discovering the API interface of the GigE interface camera. All subsequent control operations are performed on the instance object, which is the controlled camera.

[0078] Step 3: Get camera control rights. Before controlling the controlled camera, you first need to get the control rights of the controlled camera. The third-party client calls the API interface of the general SDK to get the control rights of the controlled camera. If other applications occupy the camera, or the control rights are not released normally when the camera is exited last time, the camera will fail to obtain permissions.

[0079] Step 4: Configure the stream channel. The API interface for configuring the stream channel can be a packaged interface, which includes operations such as heartbeat prohibition setting, image packet size setting, packet delay zero setting, receiving and sending end IP and port number configuration, and exposure event mechanism initialization. The third-party client configures the API interface for configuring the stream channel by calling the API interface for configuring the stream channel. The third-party client can also call the corresponding function separately to flexibly configure the corresponding stream channel parameters.

[0080] Step 5: Set the acquisition mode. The acquisition mode includes trigger mode and continuous acquisition mode. The trigger mode is divided into hard trigger and soft trigger. In the continuous acquisition mode, the camera acquires and transmits images at a fixed frame rate without an external trigger signal. In this embodiment, the acquisition mode is set to trigger mode, and the third-party client configures the API interface of the acquisition mode setting by calling the API interface of the acquisition mode setting.

[0081] Step six: register the callback function. The universal SDK of the present invention sets two callback functions: the picture arrival callback function and the exposure event callback function, and both callback functions are registered in the variable unit. After registering the picture arrival callback function, the callback function mechanism of the universal SDK will automatically call the picture arrival callback function in the variable unit after receiving a complete frame of image data and parsing it. The third-party client can define corresponding operations in the picture arrival callback function. Similarly, after registering the exposure event callback function, the universal SDK will automatically call the registered exposure event callback function every time the camera completes an exposure.

[0082] Step 7: Camera imaging parameter settings. Third-party clients can set camera imaging parameters through the imaging parameter setting API interface provided by the general SDK to meet the needs of different application scenarios.

[0083] Step 8: Enable acquisition. Enable the acquisition switch of the controlled camera through the acquisition-enabling API interface provided by the general SDK. Correspondingly, the receiving subthread of the image data packet will be enabled inside the acquisition-enabling API interface of the general SDK.

[0084] Step 9: Continuous triggering: In this embodiment, the third-party client calls the API interface of the trigger operation to perform continuous soft triggering on the controlled camera, and can subsequently exit the continuous triggering acquisition cycle by pressing a button.

[0085] Step 10: Exit acquisition. The third-party client calls the API interface of the general SDK to exit acquisition to turn off the camera acquisition switch, and the corresponding sub-thread receiving the image data packet in the API interface of the general SDK to start acquisition exits.

[0086] Step 11: Release the camera control right. The third-party client calls the API interface to release the camera control right, so that the controlled camera can be controlled by other applications.

[0087] In the above process of calling the corresponding function API interface of the general SDK, it is necessary to first obtain the register and command word information corresponding to the control information of the corresponding function before controlling the corresponding function of the controlled camera.

[0088] Although the present invention is described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. It should therefore be understood that many modifications may be made to the exemplary embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in a manner different from that described in the original claims. It should also be understood that features described in conjunction with individual embodiments may be used in other described embodiments.

Claims

1. A GigE interface camera driving method based on a general SDK, characterized in that: The method allows a third-party client to control corresponding functions of a controlled camera with a GigE interface by calling corresponding functional API interfaces in a universal SDK, wherein the universal SDK communicates with the GigE interface of the controlled camera based on the GigE Vision communication protocol.

2. The GigE interface camera driving method based on a universal SDK according to claim 1, characterized in that: The general SDK includes GVCP module, GVSP module, UDP communication module, register and command word information configuration module and camera function module; The control information sent by the third-party client to control the corresponding function of the camera of the corresponding brand is transmitted to the register and command word information configuration module through the corresponding function API interface of the camera function module; wherein the control information to control the corresponding function of the camera of the corresponding brand includes the control function name, control function parameters and controlled camera parameter information; The register and command word information configuration module obtains the register and command word information corresponding to the control information of the corresponding function according to the camera parameters in the control information of the corresponding function received, and sends it to the GVCP module; The GVCP module is used to construct a control instruction data packet of the corresponding function according to the register and command word information corresponding to the received control information of the corresponding function in accordance with the GigE Vision communication protocol, and send it to the GigE interface of the controlled camera through the UDP communication module; The GVCP module is also used to parse the response of the corresponding function sent by the GigE interface of the controlled camera received through the UDP communication module in accordance with the GigE Vision communication protocol, and upload the parsing result to the third-party client through the corresponding function API interface of the camera function module; The GVSP module is used to parse the GVSP image data packets received from the GigE interface of the camera through the UDP communication module, and send the parsing results to the third-party client through the corresponding function API interface of the camera function module.

3. The GigE interface camera driving method based on a universal SDK according to claim 2, characterized in that: There are two ways to obtain the register and command word information corresponding to the control information of the corresponding function: The first method: first obtain the XML files of the corresponding brand of cameras through the client of each brand of camera, and store the XML files of multiple brands of cameras in the register and command word information configuration module; The register and command word information configuration module calls the XML file of the corresponding brand camera from the XML files of multiple brands of cameras according to the camera parameters in the control information of the corresponding function received, parses the XML file, and extracts the register and command word information corresponding to the control information of the corresponding function from the parsed XML file; The second method is to open the client software of each brand of camera on the computer, control the functions of the corresponding brand of camera through the client software of each brand of camera, run the packet capture software in the background of the computer, capture the data packets under the corresponding control, obtain the register and command word information of the corresponding function by analyzing the content of the data packet, and store it in the register and command word information configuration module; The register and command word information configuration module calls the register and command word information corresponding to the control information of the corresponding function of the corresponding brand of camera from the register and command word information corresponding to all functions of multiple brands of cameras according to the camera parameters in the control information of the corresponding function received.

4. The GigE interface camera driving method based on a universal SDK according to claim 2, characterized in that: The camera function module includes an API interface and a variable unit for controlling various camera functions; the variable unit stores the controlled camera parameter information, intermediate variables used by the API interfaces of various functions, image arrival callback functions, and exposure event callback functions.

5. The GigE interface camera driving method based on a universal SDK according to claim 2, characterized in that: The controlled camera parameter information includes network port IP address, camera IP address, network port MAC address, subnet mask, default gateway, camera manufacturer name and camera serial number.

6. The GigE interface camera driving method based on a universal SDK according to claim 4, characterized in that: When a third-party client calls the API interface of the corresponding function, the controlled camera parameters are retrieved from the variable unit through the API interface of the function, and the controlled camera parameters, as well as the control function name and control function parameters corresponding to the API interface are passed to the register and command word information configuration module.

7. The GigE interface camera driving method based on a universal SDK according to claim 2, characterized in that: The API interfaces for controlling various functions of the camera include the API interface for discovering GigE interface cameras, the API interface for constructing camera instances, the API interface for obtaining camera control rights, the API interface for configuring stream channels, the API interface for setting acquisition modes, the API interface for setting imaging parameters, the API interface for starting acquisition, the API interface for triggering operations, the API interface for obtaining the current single-frame image, the API interface for exiting acquisition, and the API interface for releasing camera control rights. All API interfaces can call the controlled camera parameter information from the variable unit. The control function name of the API interface for discovering GigE interface cameras is Discover GigE interface cameras; The control function name of the API interface for constructing a camera instance is construct camera instance; The control function name of the API interface for obtaining camera control rights is Get Camera Control Rights; The control function name of the API interface for configuring the flow channel is Configure Flow Channel; The control function name of the API interface of the collection mode setting is collection mode setting; The control function name of the API interface for imaging parameter setting is parameter setting; The control function name of the API interface for starting collection is Start Collection; The control function name of the trigger operation API interface is trigger operation; The control function name of the API interface for obtaining the current single-frame image is Get Single-Frame Image; The control function name of the API interface for exiting collection is Exit Collection; The control function name of the API interface for releasing the camera control right is Release Camera Control Right.

8. The GigE interface camera driving method based on a universal SDK according to claim 7, characterized in that: The function parameters corresponding to the API interface of the acquisition mode setting include setting the trigger mode and setting the continuous acquisition mode; among them, the trigger mode includes hard trigger and soft trigger, and the continuous acquisition mode includes that the camera acquires and transmits images at a fixed frame rate without the need for external trigger.

9. The GigE interface camera driving method based on a universal SDK according to claim 8, characterized in that: When the acquisition API interface is opened and the parsed image data packet is received, the trigger action lock flag position in the intermediate variable used by the trigger operation API interface will be set to true, indicating that the image data is being received; when the trigger operation API interface is called at this time, the trigger operation API interface will wait until the current image data packet is received, set the trigger action lock flag position to false, and then execute the trigger operation.

10. The GigE interface camera driving method based on a universal SDK according to claim 1, characterized in that: There are two ways to collect and obtain pictures using the general SDK: one is to actively obtain a single-frame image at the current moment, and the other is to use the picture arrival callback mechanism.