Image acquisition and processing method based on camera callback function and multi-thread technology

A technology of image acquisition and processing and multi-threading technology, which is applied in the fields of electrical digital data processing, image communication, multi-channel programming device, etc., can solve the problems of difficulty in meeting the timing requirements of "flying shooting", unable to complete image processing in time, and decreased accuracy. , to achieve the effect of meeting equipment timing requirements and meeting production takt requirements

Inactive Publication Date: 2021-03-09
SHANGHAI SKEQI AUTOMATION ENG CO LTD
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This method of asynchronously controlling image acquisition and image processing can improve production efficiency, but due to the short image acquisition time and slightly poor image quality, it is easy to lead to a decrease in accuracy
[0010] Disadvantages or deficiencies of existing technologies: With the resolution of cameras changing from the commonly used 300,000 pixels to millions to tens of millions of pixels, the amount of data and time for image processing has greatly increased, and the possible phenomenon is that the image processing time is too long at image capture time
At this time, for the "fixed shooting" method, due to the lengthening of image processing time, the operating efficiency of the entire system will be further reduced
For the "flying shooting" method, it may be that the image processing cannot be completed in time, and the continuous accumulation of image data in the buffer memory will cause the image processing speed to slow down, making it difficult to meet the timing requirements of "flying shooting".

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Image acquisition and processing method based on camera callback function and multi-thread technology
  • Image acquisition and processing method based on camera callback function and multi-thread technology
  • Image acquisition and processing method based on camera callback function and multi-thread technology

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] In order to cope with the situation that the image processing time is much longer than the image acquisition time, the collected images will not lose frames and can be processed in time to better meet the timing requirements of the equipment. The present invention adopts an image acquisition and processing software design method, that is, under the condition that the PC or other upper computer carrier hardware remains unchanged, the hardware performance can be fully exerted by designing on the software level. The "shooting" scene can be applied, and it can show more advantages in batch detection, which is mainly realized by callback function, event delegation and multi-threading technology.

[0024] The specific method is as follows: 1) Acquiring image data. refer to Figure 4 , first declare the GetImage event in the secondary development class of the camera SDK, that is, the image acquisition class, and trigger the event in the camera acquisition callback function. ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an image acquisition and processing method based on a camera callback function and a multi-thread technology. The method comprises the following steps: (1) acquiring image data; (2) opening up a thread pool; (3) synchronizing an image processing result. According to the image acquisition and processing method based on the camera callback function and the multi-thread technology, the situation that the image processing time is far longer than the image acquisition time can be dealt with, the acquired image can be processed in time while frame loss is avoided, and therefore the time sequence requirement of equipment can be better met; the method has certain advantages in batch and continuous detection, that is, the hardware performance can be fully utilized, so that the image acquisition and processing process can better meet the requirement of production takt.

Description

technical field [0001] The invention relates to the technical field of image acquisition and processing. Background technique [0002] 1. Camera callback function: [0003] In the industrial vision system, there are two ways for the control host to obtain real-time image data from the industrial camera through the camera SDK: [0004] 1) By calling the API function Grab() of the camera SDK, the image data is obtained after the set waiting time; [0005] 2) Trigger the camera acquisition through software or hardware, and then obtain the image data through the callback function, such as figure 1 shown. [0006] 2. Industrial machine vision processing system mode: [0007] At present, industrial machine vision acquisition and processing systems generally adopt two methods of "fixed shooting" and "flying shooting", such as figure 2 with image 3 shown. [0008] "Fixed shooting" refers to a motion controller such as a PLC that controls the mechanical axis to move to the c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04N5/232G06F9/50
CPCG06F9/5027G06F2209/5018H04N23/80
Inventor 王兴鹏毛欢庆付文辉
Owner SHANGHAI SKEQI AUTOMATION ENG CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products