CN114125299B - Industrial camera and control method thereof - Google Patents

Industrial camera and control method thereof Download PDF

Info

Publication number
CN114125299B
CN114125299B CN202111423473.9A CN202111423473A CN114125299B CN 114125299 B CN114125299 B CN 114125299B CN 202111423473 A CN202111423473 A CN 202111423473A CN 114125299 B CN114125299 B CN 114125299B
Authority
CN
China
Prior art keywords
algorithm
acquisition
cache
locking state
cache data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111423473.9A
Other languages
Chinese (zh)
Other versions
CN114125299A (en
Inventor
刘麒
房徐
张勇
姚毅
杨艺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Luster LightTech Co Ltd
Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd
Original Assignee
Luster LightTech Co Ltd
Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Luster LightTech Co Ltd, Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN202111423473.9A priority Critical patent/CN114125299B/en
Publication of CN114125299A publication Critical patent/CN114125299A/en
Application granted granted Critical
Publication of CN114125299B publication Critical patent/CN114125299B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/665Control of cameras or camera modules involving internal camera communication with the image sensor, e.g. synchronising or multiplexing SSIS control signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof
    • H04N13/20Image signal generators
    • H04N13/204Image signal generators using stereoscopic image cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

According to the industrial camera and the control method thereof, the image shooting, the algorithm processing and the data transmission are respectively processed through the acquisition buffer queue, the algorithm buffer queue and the three processing branches, and the three processing branches are controlled through the acquisition locking state of the acquisition buffer queue and the algorithm locking state of the algorithm buffer queue, so that the three processing branches are mutually connected without being mutually restricted, for example: if the acquisition cache data with the acquisition locking state of no exists in the acquisition cache queue, the acquisition serial number is i, an image shooting processing step is carried out, and image content is stored into the acquisition cache content of the ith acquisition cache data, and the acquisition locking state of the ith acquisition cache data is set to be yes; the application realizes the running water type parallel processing through controlling the industrial camera, so that the processing time of the industrial camera is reduced, and the detection efficiency is improved.

Description

Industrial camera and control method thereof
Technical Field
The application relates to the field of industrial cameras, in particular to an industrial camera and a control method thereof.
Background
With the increase of the production capacity of modern factories and miniaturization of parts and the like, intelligent detection is mainly performed on detected objects through a visual detection system, such as: an object to be inspected such as an electronic connector, an automobile part, and an SMT (Surface Mount Technology ) circuit board; the machine vision system comprises a light source, an industrial camera, a lens and image acquisition and processing equipment, and the machine vision system acquires images of the detected object and analyzes or compares the images with standard images so as to detect flaws or defects of the detected object.
The working flow of the industrial camera comprises image shooting, algorithm processing and data transmission, and the industrial camera mainly adopts a serial mode to process the working flow at present, as shown in fig. 1, the image shooting, the algorithm processing and the data transmission have dependence, so that each frame needs to ensure the front-back sequence among the image shooting, the algorithm processing and the data transmission, and after the transmission of the previous frame is finished, the next frame can be started, and therefore, 3N time slices are needed for acquiring N frames of images.
However, modern factories have high timeliness requirements for intelligent detection, and when the number of frames for acquiring images is large, the current workflow of an industrial camera needs long time, and the requirements for intelligent detection cannot be met.
Disclosure of Invention
The application provides an industrial camera and a control method thereof, which aim to solve the technical problem.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, some embodiments of the present application provide a control method of an industrial camera, the method including:
determining an acquisition cache queue and an algorithm cache queue, wherein M acquisition cache data are arranged in the acquisition cache queue, the acquisition cache data comprise an acquisition sequence number, an acquisition locking state and acquisition cache contents, M algorithm cache data are arranged in the algorithm cache queue, and the algorithm cache data comprise an algorithm sequence number, an algorithm locking state and algorithm cache contents;
judging the acquisition locking state in the acquisition cache queue and the algorithm locking state in the algorithm cache queue;
if the acquisition cache data with the acquisition locking state of no exists in the acquisition cache queue, the acquisition serial number of the acquisition cache data is i (i is less than or equal to M), performing an image shooting processing step, and storing image content into the acquisition cache content of the ith acquisition cache data, wherein the acquisition locking state of the ith acquisition cache data is set to be yes;
if the acquisition cache queue contains acquisition cache data with the acquisition locking state being yes, the acquisition serial number is i (i is less than or equal to M), the acquisition cache content of the ith acquisition cache data is subjected to algorithm processing to obtain an algorithm processing result, and the acquisition locking state of the ith acquisition cache data is set to be no;
if the algorithm cache queue contains algorithm cache data with the algorithm locking state of no, the algorithm serial number of the algorithm cache queue is j (j is less than or equal to M), an algorithm processing result is stored in algorithm cache content of the jth algorithm cache data, and the algorithm locking state of the jth algorithm cache data is set to be yes;
if the algorithm cache queue contains algorithm cache data with the algorithm locking state being yes, the algorithm serial number of the algorithm cache data is j (j is less than or equal to M), the algorithm cache content of the jth algorithm cache data is subjected to a data transmission processing step, and the algorithm locking state of the jth algorithm cache data is set to be no.
In one possible implementation, the method further includes:
and if no acquisition cache data with the acquisition locking state being no exists in the acquisition cache queue, judging whether the acquisition cache data with the acquisition locking state being no exists in the acquisition cache queue or not after the preset time.
In one possible implementation, the method further includes:
and if the acquisition cache data with the acquisition locking state being yes does not exist in the acquisition cache queue, judging whether the acquisition cache data with the acquisition locking state being yes exists in the acquisition cache queue or not after the preset time.
In one possible implementation, the method further includes:
if no algorithm cache data with the algorithm locking state being no exists in the algorithm cache queue, judging whether collected cache data with the algorithm locking state being no exists in the algorithm cache queue or not after the preset time.
In one possible implementation, the method further includes:
if the algorithm cache data with the algorithm locking state being yes does not exist in the algorithm cache queue, judging whether the algorithm cache data with the algorithm locking state being no exists in the algorithm cache queue or not after the preset time.
In one possible implementation manner, the acquisition locking state is used for marking whether corresponding acquisition cache data is occupied;
if the acquisition locking state is yes, the corresponding acquisition cache data is occupied and can be used for algorithm processing;
if the acquisition locking state is negative, the corresponding acquisition cache data is not occupied and can be used for image shooting processing.
In one possible implementation manner, the algorithm locking state is used for marking whether corresponding algorithm cache data is occupied;
if the algorithm locking state is yes, the corresponding algorithm cache data is occupied and can be used for data transmission processing;
if the algorithm locking state is no, the corresponding algorithm cache data is not occupied and can be used for storing the algorithm processing result.
In one possible implementation, the method further includes:
acquiring a first mark, a second mark and a third mark;
stopping the operation of the industrial camera when the first mark, the second mark and the third mark all represent the end;
when at least one of the first flag, the second flag, and the third flag indicates not to end, the industrial camera continues to operate.
In a second aspect, some embodiments of the present application provide an industrial camera, the industrial camera including a processor, the processor having a plurality of cores, the plurality of cores respectively configured to process image capturing, algorithm processing, and data transmission; the industrial camera employs the control method of the first aspect.
In a second aspect, some embodiments of the present application provide a machine vision system comprising a light source, an industrial camera, a lens, an image acquisition and processing device; the industrial camera employs the control method of the first aspect.
According to the industrial camera and the control method thereof, the image shooting, the algorithm processing and the data transmission are respectively processed through the acquisition buffer queue, the algorithm buffer queue and the three processing branches, and the three processing branches are controlled through the acquisition locking state of the acquisition buffer queue and the algorithm locking state of the algorithm buffer queue, so that the three processing branches are mutually connected without being mutually restricted, for example: if the acquisition cache data with the acquisition locking state of no exists in the acquisition cache queue, the acquisition serial number is i, an image shooting processing step is carried out, and image content is stored into the acquisition cache content of the ith acquisition cache data, and the acquisition locking state of the ith acquisition cache data is set to be yes; according to the application, through the control method of the industrial camera, the running water type parallel processing is realized, so that the processing time of the industrial camera is shortened, and the detection efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of the control effect of an industrial camera according to the present application;
FIG. 2 is a schematic diagram illustrating a control effect of an industrial camera according to an embodiment of the present application;
FIG. 3 is a flow chart of a control method of an industrial camera according to an embodiment of the application;
FIG. 4 is a schematic diagram of a structure of an acquisition buffer queue according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an algorithm cache queue according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Each frame of picture in the industrial camera is required to be subjected to image shooting, algorithm processing and data transmission processing, and the three processing steps have dependence, because the image shooting is a plurality of 2D images shot under the synchronization of the industrial camera and the light source, and each 2D image has information of different light source characteristics; carrying out algorithm processing on a plurality of shot 2D images to obtain 3D data; the data transmission passes the 3D data to the image acquisition and processing device,
in order to solve the above problems, some embodiments of the present application provide a control method for an industrial camera, which controls an overall processing flow of the industrial camera by combining a pipeline working mode, and fully utilizes hardware resources by overlapping processing procedures in parallel, so as to improve an acquisition frequency of the industrial camera and an overall detection rate of a machine vision system.
The control method of the industrial camera provided by the application achieves the working mode shown in figure 2, the processing steps of each frame of image are overlapped in parallel, the hardware resources of the industrial camera are fully utilized, the acquisition frequency of the industrial camera is improved, the industrial camera can be a 3D industrial camera,
to achieve the operation mode shown in fig. 2, the control method of the industrial camera combines the pipeline operation mode with the buffer queue as shown in fig. 3, and the control method may include the following steps:
s101, determining an acquisition cache queue and an algorithm cache queue.
The acquisition buffer queue is provided with M acquisition buffer data, and the algorithm buffer queue is also provided with M algorithm buffer data.
As shown in fig. 4, the acquisition buffer data includes an acquisition sequence number I (i=1 to i=m), an acquisition lock state LG, and an acquisition buffer content TG. As shown in fig. 5, the algorithm cache data includes an algorithm number J (j=1 to j=m), an algorithm lock state LA, and an algorithm cache content TA.
S102, performing image shooting processing through a first thread.
The first thread has a first flag F1, and the first flag F1 is used to determine whether to end the first thread.
The acquisition locking state is used for marking whether corresponding acquisition cache data are occupied or not, and if the acquisition locking state is yes, the acquisition cache data are occupied and can be used for algorithm processing; if the acquisition locking state is no, the acquisition locking state is not occupied and can be used for image shooting processing.
And if the acquisition cache data with the acquisition locking state of no does not exist in the acquisition cache queue, judging after waiting for the preset time.
If the acquisition cache data with the acquisition locking state being no exists in the acquisition cache queue, the acquisition serial number is i, the image shooting processing step is carried out, the image content is stored into the acquisition cache content of the ith acquisition cache data, and the acquisition locking state of the ith acquisition cache data is set to be yes.
For example, firstly, whether the acquisition buffer queue has acquisition buffer data with the acquisition locking state being no is judged, if the acquisition buffer queue does not have the acquisition buffer data with the acquisition locking state being no, the processing is waited for 10 milliseconds, and whether the acquisition buffer queue has the acquisition buffer data with the acquisition locking state being no is judged again; if the collection cache queue contains collection cache data with a collection locking state of no, the collection serial number is 2, the image shooting processing step is executed, the image content is stored in the collection cache content of the 2 nd collection cache data, and the collection locking state of the 2 nd collection cache data is set to be yes. Finally, judging a first mark F1, and if the first mark F1 is yes, jumping out of the loop of the first thread; if the first flag F1 is negative, the loop of the first thread continues.
S103, performing algorithm processing through a second thread.
The second thread has a second flag F2, and the second flag F2 is used to determine whether to end the second thread.
Firstly, judging an acquisition locking state in an acquisition cache queue, wherein the acquisition locking state is used for marking whether corresponding acquisition cache data are occupied or not, and if the acquisition locking state is yes, the acquisition cache data are occupied and can be used for algorithm processing; if the acquisition locking state is no, the acquisition locking state is not occupied and can be used for image shooting processing.
And if the acquisition cache data with the acquisition locking state being yes does not exist in the acquisition cache queue, judging after waiting for a preset time.
If the acquisition cache data with the acquisition locking state being yes exists in the acquisition cache queue, the acquisition serial number is i, the acquisition cache content of the ith acquisition cache data is subjected to algorithm processing to obtain an algorithm processing result, and the acquisition locking state of the ith acquisition cache data is set to be no.
Then determining an algorithm locking state in an algorithm cache queue, wherein the algorithm locking state is used for marking whether corresponding algorithm cache data are occupied or not, and if the algorithm locking state is yes, the algorithm cache data are occupied and can be used for data transmission processing; if the algorithm locking state is no, the algorithm locking state is not occupied and can be used for saving the algorithm processing result.
If no algorithm cache data with the algorithm locking state being no exists in the algorithm cache queue, judging after waiting for a preset time.
If the algorithm cache queue contains algorithm cache data with the algorithm locking state of no, the algorithm serial number of the algorithm cache queue is j, an algorithm processing result is stored in the algorithm cache content of the jth algorithm cache data, and the algorithm locking state of the jth algorithm cache data is set to be yes.
For example, firstly, whether the acquisition buffer data with the acquisition locking state being yes exists in the acquisition buffer queue is judged, if the acquisition buffer data with the acquisition locking state being yes does not exist in the acquisition buffer queue, the waiting time is 10 milliseconds, and whether the acquisition buffer data with the acquisition locking state being yes exists in the acquisition buffer queue is judged again; if the collection cache queue contains collection cache data with the collection locking state being yes, the collection serial number is 2, the algorithm processing step is executed on the collection cache content of the 2 nd collection cache data, and the collection locking state of the 2 nd collection cache data is set to be no. Secondly, judging whether algorithm cache data with the algorithm locking state being NO exists in the algorithm cache queue, if no algorithm cache data with the algorithm locking state being NO exists in the algorithm cache queue, waiting for 10 milliseconds, and judging whether the algorithm cache data with the algorithm locking state being NO exists in the algorithm cache queue again; if the algorithm cache data with the algorithm locking state of no exists in the set cache queue, the algorithm serial number is 5, the algorithm processing step is executed on the algorithm cache content of the 5 th algorithm cache data, and the algorithm locking state of the 5 th algorithm cache data is set to be yes. Finally, judging a second mark F2, and if the second mark F2 is yes, jumping out of the loop of the second thread; if the second flag F2 is negative, the loop of the second thread continues.
S104, carrying out data transmission processing through a third thread.
The third thread has a third flag F3, and the third flag F3 is used to determine whether to end the third thread.
Judging an algorithm locking state in the algorithm cache queue, wherein the algorithm locking state is used for marking whether corresponding algorithm cache data are occupied or not, and if the algorithm locking state is yes, the algorithm cache data are occupied and can be used for data transmission processing; if the algorithm locking state is no, the algorithm locking state is not occupied and can be used for saving the algorithm processing result.
If the algorithm cache queue does not contain the algorithm cache data with the algorithm locking state being yes, judging after waiting for a preset time.
If the algorithm cache queue contains algorithm cache data with the algorithm locking state of yes, the algorithm serial number of the algorithm cache data is j, the algorithm cache content (namely an algorithm processing result) of the jth algorithm cache data is subjected to a data transmission processing step, and the algorithm locking state of the jth algorithm cache data is set to be no.
For example, firstly determining whether there is algorithm cache data with the algorithm locking state being yes in the algorithm cache queue, if there is no algorithm cache data with the algorithm locking state being yes in the algorithm cache queue, waiting for 10 ms, and determining whether there is algorithm cache data with the algorithm locking state being yes in the algorithm cache queue again; if the algorithm cache data with the algorithm locking state being yes exists in the set cache queue, the algorithm serial number is 5, the algorithm cache content (namely an algorithm processing result) of the 5 th algorithm cache data is transmitted, and the algorithm locking state of the 5 th algorithm cache data is set to be yes. Finally, judging a third mark F3, and if the third mark F3 is yes, jumping out of the loop of the third thread; if the third flag F3 is negative, the loop of the third thread continues.
S105, when the first flag, the second flag, and the third flag each indicate the end, the industrial camera ends the present control.
And clearing the acquisition buffer queue and the algorithm buffer queue, and closing the first thread, the second thread and the third thread.
In some embodiments, the industrial camera continues to perform the present control when at least one of the first flag, the second flag, and the third flag indicates not ended.
The application improves the acquisition frequency of the industrial camera by the control method of the industrial camera, and the specific time slice circulation condition which can be realized in the application is shown in the following figure 2:
at time slice 1: the 1 st frame is used for shooting images, and the 2 nd and 3 rd frames are not started yet;
at time slice 2: carrying out algorithm processing on the 1 st frame, carrying out image shooting on the 2 nd frame, and not beginning the 3 rd frame;
at time slice 3: carrying out data transmission on the 1 st frame, carrying out algorithm processing on the 2 nd frame, and carrying out image shooting on the 3 rd frame;
at time slice 4: the 1 st frame is finished, the 2 nd frame is subjected to data transmission, the 3 rd frame is subjected to algorithm processing, and the 4 th frame is subjected to image shooting;
at time slice N: ending the N-3 th frame, carrying out data transmission on the N-2 th frame, carrying out algorithm processing on the N-1 th frame, and carrying out image shooting on the N th frame;
at time slice n+3: ending the N frame, carrying out data transmission on the N+1st frame, carrying out algorithm processing on the N+2nd frame, and carrying out image shooting on the N+3rd frame;
from the above, the processing of N frames of pictures is completed in the existing working mode, and 3N time slices are required; the optimized assembly line working mode of the industrial camera control method provided by the application only needs n+3 time slices, so that the time is reduced and the efficiency is improved.
In one embodiment, the three steps of image capturing, algorithm processing, and data transmission in each frame of picture do not reach the same time length, so the length of each time slice is determined by the most time-consuming one of the steps that are currently in progress.
Some embodiments of the present application further provide an industrial camera, where the industrial camera includes a processor, where the processor has a plurality of cores, where the plurality of cores are respectively used to process image capturing, algorithm processing, and data transmission; the industrial camera adopts the control method.
Some embodiments of the present application also provide a machine vision system, where the machine vision system includes a light source, an industrial camera, a lens, and an image acquisition and processing device; the light source, the industrial camera and the image acquisition and processing equipment are connected, the industrial camera is connected with the lens, the control of the machine vision system is realized through the image acquisition and processing equipment, and the industrial camera adopts the control method.
In some embodiments, the machine vision system may further comprise a controller coupled to the industrial camera, the image acquisition and processing device for controlling the machine vision system.
According to the industrial camera and the control method thereof, the image shooting, the algorithm processing and the data transmission are respectively processed through the acquisition buffer queue, the algorithm buffer queue and the three processing branches, and the three processing branches are controlled through the acquisition locking state of the acquisition buffer queue and the algorithm locking state of the algorithm buffer queue, so that the three processing branches are mutually connected without being mutually restricted, for example: if the acquisition cache data with the acquisition locking state of no exists in the acquisition cache queue, the acquisition serial number of the acquisition cache data is i (i is less than or equal to M), performing an image shooting processing step, and storing image content into the acquisition cache content of the ith acquisition cache data, wherein the acquisition locking state of the ith acquisition cache data is set to be yes; according to the application, through the control method of the industrial camera, the running water type parallel processing is realized, so that the processing time of the industrial camera is shortened, and the detection efficiency is improved.
The above is only for illustrating the technical idea of the present application, and the protection scope of the present application is not limited by this, and any modification made on the basis of the technical scheme according to the technical idea of the present application falls within the protection scope of the claims of the present application.
Furthermore, the order in which the elements and sequences are presented, the use of numerical letters, or other designations are used in the application is not intended to limit the sequence of the processes and methods unless specifically recited in the claims. While certain presently useful embodiments have been discussed in the foregoing disclosure by way of various examples, it is to be understood that such details are for the purpose of illustration only and that the appended claims are not limited to the disclosed embodiments, but rather are intended to cover all modifications and equivalent combinations that fall within the spirit and scope of the embodiments of the present application. For example, while the system components described above may be implemented by hardware devices, they may also be implemented solely by software solutions, such as installing the described system on an existing server or mobile device.
Similarly, it should be appreciated that in order to simplify the present disclosure and thereby facilitate an understanding of one or more embodiments, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure. This method of disclosure, however, is not intended to imply that more features than are required by the subject application. Indeed, less than all of the features of a single embodiment disclosed above.
Each patent, patent application publication, and other material, such as articles, books, specifications, publications, documents, etc., cited herein is hereby incorporated by reference in its entirety. Except for the application history file that is inconsistent or conflicting with this disclosure, the file (currently or later attached to this disclosure) that limits the broadest scope of the claims of this disclosure is also excluded. It is noted that the description, definition, and/or use of the term in the appended claims controls the description, definition, and/or use of the term in this application if there is a discrepancy or conflict between the description, definition, and/or use of the term in the appended claims.

Claims (10)

1. A method of controlling an industrial camera, the method comprising:
determining an acquisition cache queue and an algorithm cache queue, wherein M acquisition cache data are arranged in the acquisition cache queue, the acquisition cache data comprise an acquisition sequence number, an acquisition locking state and acquisition cache contents, M algorithm cache data are arranged in the algorithm cache queue, and the algorithm cache data comprise an algorithm sequence number, an algorithm locking state and algorithm cache contents;
image shooting processing is carried out through a first thread, algorithm processing is carried out through a second thread, and data transmission processing is carried out through a third thread;
judging the acquisition locking state in the acquisition cache queue and the algorithm locking state in the algorithm cache queue;
if the acquisition cache data with the acquisition locking state of no exists in the acquisition cache queue, the acquisition serial number of the acquisition cache data is i (i is less than or equal to M), performing an image shooting processing step, and storing image content into the acquisition cache content of the ith acquisition cache data, wherein the acquisition locking state of the ith acquisition cache data is set to be yes;
if the acquisition cache queue contains acquisition cache data with the acquisition locking state being yes, the acquisition serial number is i (i is less than or equal to M), the acquisition cache content of the ith acquisition cache data is subjected to algorithm processing to obtain an algorithm processing result, and the acquisition locking state of the ith acquisition cache data is set to be no;
if the algorithm cache queue contains algorithm cache data with the algorithm locking state of no, the algorithm serial number of the algorithm cache queue is j (j is less than or equal to M), an algorithm processing result is stored in algorithm cache content of the jth algorithm cache data, and the algorithm locking state of the jth algorithm cache data is set to be yes;
if the algorithm cache queue contains algorithm cache data with the algorithm locking state being yes, the algorithm serial number of the algorithm cache data is j (j is less than or equal to M), the algorithm cache content of the jth algorithm cache data is subjected to a data transmission processing step, and the algorithm locking state of the jth algorithm cache data is set to be no.
2. The method of claim 1, further comprising:
and if no acquisition cache data with the acquisition locking state being no exists in the acquisition cache queue, judging whether the acquisition cache data with the acquisition locking state being no exists in the acquisition cache queue or not after the preset time.
3. The method of claim 1, further comprising:
and if the acquisition cache data with the acquisition locking state being yes does not exist in the acquisition cache queue, judging whether the acquisition cache data with the acquisition locking state being yes exists in the acquisition cache queue or not after the preset time.
4. The method of claim 1, further comprising:
if no algorithm cache data with the algorithm locking state being no exists in the algorithm cache queue, judging whether collected cache data with the algorithm locking state being no exists in the algorithm cache queue or not after the preset time.
5. The method of claim 1, further comprising:
if the algorithm cache data with the algorithm locking state being yes does not exist in the algorithm cache queue, judging whether the algorithm cache data with the algorithm locking state being no exists in the algorithm cache queue or not after the preset time.
6. A control method of an industrial camera according to any one of claims 1-3, wherein the acquisition lock status is used to mark whether the corresponding acquisition cache data is occupied;
if the acquisition locking state is yes, the corresponding acquisition cache data is occupied and can be used for algorithm processing;
if the acquisition locking state is negative, the corresponding acquisition cache data is not occupied and can be used for image shooting processing.
7. The method according to claim 1, 4 or 5, wherein the algorithm locking status is used to mark whether the corresponding algorithm cache data is occupied;
if the algorithm locking state is yes, the corresponding algorithm cache data is occupied and can be used for data transmission processing;
if the algorithm locking state is no, the corresponding algorithm cache data is not occupied and can be used for storing the algorithm processing result.
8. The method of claim 1, further comprising:
acquiring a first mark, a second mark and a third mark, wherein the first mark is used for judging whether to end the first thread, the second mark is used for judging whether to end the second thread, and the third mark is used for judging whether to end the third thread;
stopping the operation of the industrial camera when the first mark, the second mark and the third mark all represent the end;
when at least one of the first flag, the second flag, and the third flag indicates not to end, the industrial camera continues to operate.
9. An industrial camera employing the control method according to any one of claims 1-8, wherein the industrial camera comprises a processor having a plurality of cores for processing image capturing, algorithm processing, data transmission, respectively.
10. A machine vision system employing the control method of any one of claims 1-8, wherein the machine vision system comprises a light source, an industrial camera, a lens, and an image acquisition and processing device.
CN202111423473.9A 2021-11-26 2021-11-26 Industrial camera and control method thereof Active CN114125299B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111423473.9A CN114125299B (en) 2021-11-26 2021-11-26 Industrial camera and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111423473.9A CN114125299B (en) 2021-11-26 2021-11-26 Industrial camera and control method thereof

Publications (2)

Publication Number Publication Date
CN114125299A CN114125299A (en) 2022-03-01
CN114125299B true CN114125299B (en) 2023-10-10

Family

ID=80370269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111423473.9A Active CN114125299B (en) 2021-11-26 2021-11-26 Industrial camera and control method thereof

Country Status (1)

Country Link
CN (1) CN114125299B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631568A (en) * 2013-12-20 2014-03-12 厦门大学 Medical-image-oriented multi-thread parallel computing method
CN103713314A (en) * 2012-09-28 2014-04-09 中国石油化工股份有限公司 Pre-stack time migration parallel processing method
CN105159654A (en) * 2015-08-21 2015-12-16 中国人民解放军信息工程大学 Multi-thread parallelism based integrity measurement hash algorithm optimization method
CN105827976A (en) * 2016-04-26 2016-08-03 北京博瑞空间科技发展有限公司 GPU (graphics processing unit)-based video acquisition and processing device and system
CN108055452A (en) * 2017-11-01 2018-05-18 广东欧珀移动通信有限公司 Image processing method, device and equipment
CN109961390A (en) * 2017-12-22 2019-07-02 飞依诺科技(苏州)有限公司 Data localized method and system
CN110597663A (en) * 2019-09-16 2019-12-20 阿里巴巴集团控股有限公司 Transaction processing method and device
CN112487034A (en) * 2020-12-01 2021-03-12 上海思客琦智能装备科技股份有限公司 Double-queue asynchronous image processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9652817B2 (en) * 2015-03-12 2017-05-16 Samsung Electronics Co., Ltd. Automated compute kernel fusion, resizing, and interleave

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103713314A (en) * 2012-09-28 2014-04-09 中国石油化工股份有限公司 Pre-stack time migration parallel processing method
CN103631568A (en) * 2013-12-20 2014-03-12 厦门大学 Medical-image-oriented multi-thread parallel computing method
CN105159654A (en) * 2015-08-21 2015-12-16 中国人民解放军信息工程大学 Multi-thread parallelism based integrity measurement hash algorithm optimization method
CN105827976A (en) * 2016-04-26 2016-08-03 北京博瑞空间科技发展有限公司 GPU (graphics processing unit)-based video acquisition and processing device and system
CN108055452A (en) * 2017-11-01 2018-05-18 广东欧珀移动通信有限公司 Image processing method, device and equipment
CN109961390A (en) * 2017-12-22 2019-07-02 飞依诺科技(苏州)有限公司 Data localized method and system
CN110597663A (en) * 2019-09-16 2019-12-20 阿里巴巴集团控股有限公司 Transaction processing method and device
CN112487034A (en) * 2020-12-01 2021-03-12 上海思客琦智能装备科技股份有限公司 Double-queue asynchronous image processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李士刚 ; 胡长军 ; 王珏 ; 李建江 ; .异构多核上多级并行模型支持及性能优化.软件学报.2013,(12),第2782-2796页. *

Also Published As

Publication number Publication date
CN114125299A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
US11380232B2 (en) Display screen quality detection method, apparatus, electronic device and storage medium
CN111650210B (en) Burr detection method and detection system for high-speed high-precision lithium ion battery pole piece
CN105163028B (en) A kind of control method and device of dual camera
JP7025452B2 (en) Display screen peripheral circuit detection method, display screen peripheral circuit detection device, electronic device and storage medium
CN107368776A (en) Car damage identification image acquiring method, device, server and terminal device
CN110399831B (en) Inspection method and device
CN107179942B (en) Real-time data analysis task distribution processing method based on multithreading
CN109525836B (en) Embedded multimode is survey device simultaneously based on FPGA
CN112163468A (en) Image processing method and device based on multiple threads
CN116167992A (en) Defect detection method, defect detection device, electronic device and computer readable storage medium
CN114125299B (en) Industrial camera and control method thereof
CN111464790A (en) Industrial environment monitoring video processing method and system based on deep learning
CN109256341B (en) Method and device for inspecting monocrystalline silicon solar cells
CN104702833B (en) The method and a kind of electronic equipment of a kind of information processing
CN109886963B (en) Image processing method and system
CN111724377A (en) Broken yarn detection method, broken yarn detection device, electronic equipment, storage medium and shutdown system
CN105893578A (en) Method and device for selecting photos
CN110580185B (en) Data preprocessing method, device and storage medium
CN101378507B (en) Blocking effect removal system and method
CN109146916A (en) A kind of moving body track method and device
CN115379128A (en) Exposure control method and device, computer readable medium and electronic equipment
WO2022012002A1 (en) Systems and methods for video analysis
CN113961316A (en) Digital slice scanning method and device based on multiple threads
CN112967224A (en) Electronic circuit board detection system, method and medium based on artificial intelligence
CN110288565B (en) Defect identification method and device for carbon fiber composite core wire and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230719

Address after: 100094 701, 7 floor, 7 building, 13 Cui Hunan Ring Road, Haidian District, Beijing.

Applicant after: Lingyunguang Technology Co.,Ltd.

Applicant after: Suzhou lingyunguang Industrial Intelligent Technology Co.,Ltd.

Address before: 100094 701, 7 floor, 7 building, 13 Cui Hunan Ring Road, Haidian District, Beijing.

Applicant before: Lingyunguang Technology Co.,Ltd.

Applicant before: Beijing Lingyun Photon Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant