CN115190239B - Image acquisition method and device, electronic equipment and storage medium - Google Patents

Image acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115190239B
CN115190239B CN202210742873.4A CN202210742873A CN115190239B CN 115190239 B CN115190239 B CN 115190239B CN 202210742873 A CN202210742873 A CN 202210742873A CN 115190239 B CN115190239 B CN 115190239B
Authority
CN
China
Prior art keywords
displacement sensor
detected
signal
time
preset
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
CN202210742873.4A
Other languages
Chinese (zh)
Other versions
CN115190239A (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.)
LCFC Hefei Electronics Technology Co Ltd
Original Assignee
LCFC Hefei Electronics 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 LCFC Hefei Electronics Technology Co Ltd filed Critical LCFC Hefei Electronics Technology Co Ltd
Priority to CN202210742873.4A priority Critical patent/CN115190239B/en
Publication of CN115190239A publication Critical patent/CN115190239A/en
Application granted granted Critical
Publication of CN115190239B publication Critical patent/CN115190239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/026Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by measuring distance between sensor and object

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The application provides an image acquisition method, an image acquisition device, electronic equipment and a storage medium; the method comprises the following steps: controlling the first displacement sensor to send a first start signal and a stop signal based on the relative distance between the object to be detected and the first displacement sensor; the first starting signal is used for indicating the first displacement sensor to start sending signals, and the stopping signal is used for indicating the first displacement sensor to stop sending signals; controlling the second displacement sensor to send a second opening signal based on the relative distance between the object to be detected and the second displacement sensor; the second starting signal is used for indicating the second displacement sensor to start sending signals; and acquiring images of the object to be detected based on the moment when the first displacement sensor sends the first starting signal, the moment when the first displacement sensor sends the stopping signal and the moment when the second displacement sensor sends the second starting signal. The application can improve the precision of image acquisition.

Description

Image acquisition method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of machine vision, and in particular, to an image acquisition method, an image acquisition device, an electronic device, and a storage medium.
Background
With rapid development and wide use of machine vision, image acquisition of an object to be detected by using machine vision is becoming a mainstream of machine vision application. However, in the process of image acquisition of an object to be detected, the problems of missing acquisition of the image of the object to be detected and repeated acquisition of the image of the object to be detected easily occur in the processing process of the existing image acquisition method, so that people hope to reduce the occurrence of missing acquisition of the image of the object to be detected and repeated acquisition of the image of the object to be detected and improve the accuracy of image acquisition.
Therefore, how to intelligently perform image acquisition on an object to be detected to improve the accuracy of image acquisition is a constantly pursued goal.
Disclosure of Invention
The embodiment of the application provides an image acquisition method, an image acquisition device, electronic equipment and a storage medium.
According to a first aspect of the present application, there is provided an image acquisition method comprising: controlling the first displacement sensor to send a first start signal and a stop signal based on the relative distance between the object to be detected and the first displacement sensor; the first starting signal is used for indicating the first displacement sensor to start sending signals, and the stopping signal is used for indicating the first displacement sensor to stop sending signals; controlling the second displacement sensor to send a second opening signal based on the relative distance between the object to be detected and the second displacement sensor; wherein the second start signal is used for indicating the second displacement sensor to start sending signals; and acquiring an image of the object to be detected based on the moment when the first displacement sensor sends the first opening signal, the moment when the first displacement sensor sends the stopping signal and the moment when the second displacement sensor sends the second opening signal.
According to an embodiment of the present application, the controlling the first displacement sensor to send a first start signal and a stop signal based on a relative distance between an object to be detected and the first displacement sensor includes: in the process of moving the object to be detected, controlling the first displacement sensor to send the first opening signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value and the time length of the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value is larger than or equal to a preset time threshold value; and in the process of moving the object to be detected, controlling the first displacement sensor to send the stop signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is smaller than the preset first distance threshold and the time length smaller than the preset first distance threshold is larger than or equal to the preset time threshold.
According to an embodiment of the present application, the controlling the second displacement sensor to send a second start signal based on the relative distance between the object to be detected and the second displacement sensor includes: and in the process of moving the object to be detected, controlling the second displacement sensor to send the second opening signal in response to the fact that the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold and the time length of the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold is larger than or equal to the preset time threshold.
According to an embodiment of the present application, the image capturing of the object to be detected based on the time when the first displacement sensor sends the first on signal, the time when the first displacement sensor sends the stop signal, and the time when the second displacement sensor sends the second on signal includes: determining a delay time based on a time at which the first displacement sensor transmits the first start signal and a time at which the first displacement sensor transmits the stop signal; and acquiring an image of the object to be detected based on the delay time and the moment when the second displacement sensor sends the second starting signal.
According to an embodiment of the present application, the determining the delay time based on the time when the first displacement sensor transmits the first start signal and the time when the first displacement sensor transmits the stop signal includes: determining a duration corresponding to a difference value based on the difference value between the moment when the first displacement sensor sends the stop signal and the moment when the first displacement sensor sends the first opening signal; and determining half of the time length corresponding to the difference value as the delay time.
According to an embodiment of the present application, the image capturing of the object to be detected based on the delay time and the time when the second displacement sensor sends the second start signal includes: and after the time corresponding to the delay time passes from the moment when the second start signal is sent by the second displacement sensor, acquiring an image of the object to be detected.
According to an embodiment of the present application, the first detection area corresponding to the first displacement sensor and the second detection area corresponding to the second displacement sensor are located on the same horizontal line; the center of the acquisition area corresponding to the image acquisition and the center of the second detection area corresponding to the second displacement sensor are positioned on the same vertical line.
According to a second aspect of the present application, there is provided an image capturing apparatus comprising: the first control module is used for controlling the first displacement sensor to send a first start signal and a stop signal based on the relative distance between the object to be detected and the first displacement sensor; the first starting signal is used for indicating the first displacement sensor to start sending signals, and the stopping signal is used for indicating the first displacement sensor to stop sending signals; the second control module is used for controlling the second displacement sensor to send a second starting signal based on the relative distance between the object to be detected and the second displacement sensor; wherein the second start signal is used for indicating the second displacement sensor to start sending signals; the acquisition module is used for acquiring images of the object to be detected based on the moment when the first displacement sensor sends the first opening signal, the moment when the first displacement sensor sends the stopping signal and the moment when the second displacement sensor sends the second opening signal.
According to an embodiment of the present application, the first control module is configured to: in the process of moving the object to be detected, controlling the first displacement sensor to send the first opening signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value and the time length of the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value is larger than or equal to a preset time threshold value; and in the process of moving the object to be detected, controlling the first displacement sensor to send the stop signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is smaller than the preset first distance threshold and the time length smaller than the preset first distance threshold is larger than or equal to the preset time threshold.
According to an embodiment of the present application, the second control module is configured to: and in the process of moving the object to be detected, controlling the second displacement sensor to send the second opening signal in response to the fact that the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold and the time length of the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold is larger than or equal to the preset time threshold.
According to an embodiment of the present application, the acquisition module is configured to: determining a delay time based on a time at which the first displacement sensor transmits the first start signal and a time at which the first displacement sensor transmits the stop signal; and acquiring an image of the object to be detected based on the delay time and the moment when the second displacement sensor sends the second starting signal.
According to an embodiment of the present application, the acquisition module is configured to: determining a duration corresponding to a difference value based on the difference value between the moment when the first displacement sensor sends the stop signal and the moment when the first displacement sensor sends the first opening signal; and determining half of the time length corresponding to the difference value as the delay time.
According to an embodiment of the present application, the acquisition module is configured to: and after the time corresponding to the delay time passes from the moment when the second start signal is sent by the second displacement sensor, acquiring an image of the object to be detected.
According to an embodiment of the present application, the first detection area corresponding to the first displacement sensor and the second detection area corresponding to the second displacement sensor are located on the same horizontal line; the center of the acquisition area corresponding to the image acquisition and the center of the second detection area corresponding to the second displacement sensor are positioned on the same vertical line.
According to a third aspect of the present application, there is provided an electronic device comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods of the present application.
According to a fourth aspect of the present application there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of the present application.
According to the method, based on the relative distance between the object to be detected and the first displacement sensor, the first displacement sensor is controlled to send a first starting signal and a stopping signal; the first starting signal is used for indicating the first displacement sensor to start sending signals, and the stopping signal is used for indicating the first displacement sensor to stop sending signals; controlling the second displacement sensor to send a second opening signal based on the relative distance between the object to be detected and the second displacement sensor; wherein the second start signal is used for indicating the second displacement sensor to start sending signals; and acquiring an image of the object to be detected based on the moment when the first displacement sensor sends the first opening signal, the moment when the first displacement sensor sends the stopping signal and the moment when the second displacement sensor sends the second opening signal. In this way, the accuracy of image acquisition can be improved.
It should be understood that the teachings of the present application need not achieve all of the benefits set forth above, but rather that certain technical solutions may achieve certain technical effects, and that other embodiments of the present application may also achieve benefits not set forth above.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present application will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. Several embodiments of the present application are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
in the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Fig. 1 shows a schematic diagram of a process flow of an image acquisition method according to an embodiment of the present application;
Fig. 2 is a schematic diagram of a process flow of image acquisition of the object to be detected based on the time when the first displacement sensor sends the first start signal, the time when the first displacement sensor sends the stop signal, and the time when the second displacement sensor sends the second start signal according to the embodiment of the present application;
fig. 3 shows a second process flow diagram of the image acquisition method according to the embodiment of the present application;
fig. 4 shows a third process flow diagram of the image acquisition method according to the embodiment of the present application;
Fig. 5 shows a process flow diagram of an image acquisition method according to an embodiment of the present application;
Fig. 6 shows an application scenario diagram of an image acquisition method according to an embodiment of the present application;
fig. 7 shows another application scenario diagram of the image acquisition method provided by the embodiment of the present application;
FIG. 8 shows an alternative schematic view of an image acquisition apparatus provided by an embodiment of the present application;
Fig. 9 shows a schematic diagram of a composition structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present application more comprehensible, the technical solutions according to the embodiments of the present application will be clearly described in the following with reference to the accompanying drawings, and it is obvious 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 application without making any inventive effort, are intended to be within the scope of the application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the application only and is not intended to be limiting of the application.
Before describing embodiments of the present application in further detail, the terms and terminology involved in the embodiments of the present application will be described, and the terms and terminology involved in the embodiments of the present application will be used in the following explanation.
The displacement sensor can accurately measure the displacement change of the measured object in a non-contact manner, and is mainly applied to measuring geometric quantities such as displacement, thickness, vibration, distance and the like of the measured object.
In the related art, the currently known technical schemes of image acquisition are easy to cause the problems of missing acquisition of the image of the object to be detected and repeated acquisition of the image of the object to be detected. At present, a camera, a light source and an inductor are arranged on a production line, when the inductor senses an object to be detected, the inductor triggers a signal and sends the signal to an industrial personal computer, and the industrial personal computer controls the camera to complete photographing. In the related art, the sensor is triggered by mistake due to vibration of a production line and the unevenness of an object to be detected in the image acquisition process, so that the problems of missing acquisition of the image of the object to be detected and repeated acquisition of the image of the object to be detected occur, and further, the problem of low image acquisition precision occurs.
Aiming at the problems of missing acquisition of an image of an object to be detected and repeated acquisition of the image of the object to be detected, which are caused by the image acquisition method provided by the related technology, the problem of low image acquisition precision is solved, and the method of the embodiment of the application controls the first displacement sensor to send a first start signal and a stop signal based on the relative distance between the object to be detected and the first displacement sensor; the first starting signal is used for indicating the first displacement sensor to start sending signals, and the stopping signal is used for indicating the first displacement sensor to stop sending signals; controlling the second displacement sensor to send a second opening signal based on the relative distance between the object to be detected and the second displacement sensor; wherein the second start signal is used for indicating the second displacement sensor to start sending signals; and acquiring an image of the object to be detected based on the moment when the first displacement sensor sends the first opening signal, the moment when the first displacement sensor sends the stopping signal and the moment when the second displacement sensor sends the second opening signal. Therefore, repeated acquisition and missing acquisition in the image acquisition process can be avoided. Therefore, compared with the sensor which is easy to trigger by mistake in the related art, the image acquisition method can accurately control the displacement sensor, thereby accurately controlling the image acquisition equipment to acquire the image of the object to be detected and improving the accuracy of image acquisition.
The processing flow in the image acquisition method provided by the embodiment of the application is explained. Referring to fig. 1, fig. 1 is a schematic process flow diagram of an image acquisition method according to an embodiment of the present application, and will be described with reference to steps S101 to S103 shown in fig. 1.
Step S101, based on the relative distance between an object to be detected and a first displacement sensor, controlling the first displacement sensor to send a first start signal and a stop signal; the first starting signal is used for indicating the first displacement sensor to start sending signals, and the stopping signal is used for indicating the first displacement sensor to stop sending signals.
In some embodiments, the first displacement sensor may include: laser displacement sensor, linear displacement sensor or inductance type high-precision displacement sensor. The first displacement sensor may also include other displacement sensors, and embodiments of the present application are not limited. The object to be detected may include: the product to be detected can have a certain thickness, and is positioned on the production line and moves linearly at a uniform speed along with the production line. The first displacement sensor is positioned above the position of the object to be detected, and a first detection area corresponding to the first displacement sensor is positioned on the assembly line. Under the condition that an object to be detected passes through the first detection area, the first displacement sensor is used for detecting the height change of the first detection area relative to the assembly line and sending a first start signal and a stop signal according to the height change of the first detection area relative to the assembly line, and the first displacement sensor can detect the height change of the first detection area relative to the assembly line when the first displacement sensor starts to send signals and when the first displacement sensor stops to send signals. The first start signal is used for indicating the first displacement sensor to start sending signals, and the stop signal is used for indicating the first displacement sensor to stop sending signals. The relative distance of the object to be detected and the first displacement sensor may include: the first detection zone is at a height relative to the pipeline.
In some embodiments, controlling the first displacement sensor to send the first start signal and stop based on the relative distance of the object to be detected from the first displacement sensor may include: in the process of moving the object to be detected, controlling the first displacement sensor to send the first opening signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value and the time length of the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value is larger than or equal to a preset time threshold value; and in the process of moving the object to be detected, controlling the first displacement sensor to send the stop signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is smaller than a preset first distance threshold value and the time length of the relative distance between the object to be detected and the first displacement sensor is smaller than the preset first distance threshold value is larger than or equal to a preset time threshold value.
In some embodiments, the preset first distance threshold may include: minimum value of thickness of the object to be detected. The preset first distance threshold may further include other preset distance values, and the embodiment of the present application is not limited to a specific first distance threshold. The preset time threshold may include: the preset duration is not limited to a specific preset duration in the embodiment of the present application. Controlling the first displacement sensor to transmit the first turn-on signal may include: outputting a first opening signal, and determining a first opening time corresponding to the first opening signal. Controlling the first displacement sensor to transmit the stop signal may include: outputting a stop signal, and determining a stop time corresponding to the output stop signal.
As an example, the first displacement sensor is in a stop state, a preset time threshold is 2ms, the trigger distance is 0.3cm, the height of a first detection area corresponding to the first displacement sensor relative to the assembly line is 0cm, the first displacement sensor detects that the height of the first detection area corresponding to the first displacement sensor relative to the assembly line changes to 0.7cm, namely the relative distance between an object to be detected and the first displacement sensor is 0.7cm, the duration of the height of the object to be detected is kept to be 0.7cm exceeds 2ms, the first displacement sensor is controlled to send the first opening signal, the first opening signal is output, and the first opening time corresponding to the first opening signal is determined to be output.
As an example, the first displacement sensor is in an on state, the preset time threshold is 2ms, the preset first distance threshold is 0.3cm, the height of the first detection area corresponding to the first displacement sensor relative to the pipeline is 0.7cm, the first displacement sensor detects that the height of the first detection area corresponding to the first displacement sensor relative to the pipeline changes to 0cm, namely, the relative distance between the object to be detected and the first displacement sensor is 0cm, but after 1ms, the first displacement sensor detects that the height of the first detection area relative to the pipeline is restored to 0.7cm and kept exceeding 2ms, and then the first displacement sensor continues to keep the on state.
As an example, the first displacement sensor is in an on state, a preset time threshold is 2ms, a preset first distance threshold is 0.3cm, the height of a first detection area corresponding to the first displacement sensor relative to the assembly line is 0.7cm, the first displacement sensor detects that the height of the first detection area corresponding to the first displacement sensor relative to the assembly line changes to 0cm, namely, the relative distance between an object to be detected and the first displacement sensor is 0cm, and the duration of keeping the height of 0cm exceeds 2ms, the first displacement sensor is controlled to send the stop signal, the stop signal is output, and the stop moment corresponding to the output stop signal is determined.
Step S102, based on the relative distance between the object to be detected and a second displacement sensor, controlling the second displacement sensor to send a second starting signal; wherein the second start signal is used for indicating the second displacement sensor to start sending signals.
In some embodiments, the second displacement sensor may comprise: laser displacement sensor, linear displacement sensor or inductance type high-precision displacement sensor. The second displacement sensor may also include other displacement sensors, embodiments of the application not being limited. The second displacement sensor and the first displacement sensor may be different types of displacement sensors. For example, the second displacement sensor is a laser displacement sensor, and the first displacement sensor is an inductive high-precision displacement sensor. The second displacement sensor may also be the same type of displacement sensor as the first displacement sensor. For example, the second displacement sensor is a laser displacement sensor and the first displacement sensor is a laser displacement sensor. The second displacement sensor is positioned above the position of the object to be detected, and a second detection area corresponding to the second displacement sensor is positioned on the assembly line. The first detection area corresponding to the first displacement sensor and the second detection area corresponding to the second displacement sensor are positioned on the same horizontal line, and the object to be detected passes through the first detection area and then passes through the second detection area. Under the condition that an object to be detected passes through the second detection area, the second displacement sensor is used for detecting the height change of the second detection area relative to the assembly line and sending a second starting signal according to the height change of the second detection area relative to the assembly line, and the second displacement sensor can detect the height change of the second detection area relative to the assembly line when the second displacement sensor starts to send signals and when the second displacement sensor stops to send signals. Wherein the second on signal is used for indicating the second displacement sensor to start sending signals. The relative distance of the object to be detected from the second displacement sensor may include: the second detection area is at a height relative to the pipeline.
In some embodiments, controlling the first displacement sensor to transmit the first turn-on signal based on a relative distance of the object to be detected from the second displacement sensor may include: and in the process of moving the object to be detected, controlling the second displacement sensor to send the second opening signal in response to the fact that the relative distance between the object to be detected and the second displacement sensor is larger than or equal to a preset second distance threshold value and the duration of the relative distance between the object to be detected and the second displacement sensor is larger than or equal to a preset second distance threshold value is larger than or equal to a preset time threshold value.
In some embodiments, the preset second distance threshold may include: minimum value of thickness of the object to be detected. The preset second distance threshold may further include other preset distance values, and the embodiment of the present application is not limited to a specific second distance threshold. The preset second distance threshold and the preset first distance threshold may include the same distance value, and the preset second distance threshold and the preset first distance threshold may also include different distance values. The preset time threshold may include: the preset duration is not limited to a specific preset duration in the embodiment of the present application. Controlling the second displacement sensor to transmit the second activation signal may include: outputting a second starting signal, and determining a second starting time corresponding to the second starting signal.
As an example, the second displacement sensor is in a stop state, a preset time threshold is 2ms, the trigger distance is 0.3cm, the height of a second detection area corresponding to the second displacement sensor relative to the assembly line is 0cm, the second displacement sensor detects that the height of the second detection area corresponding to the second displacement sensor relative to the assembly line changes to 0.7cm, namely the relative distance between an object to be detected and the second displacement sensor is 0.7cm, the duration of the height of the object to be detected and the second displacement sensor is kept to be 0.7cm exceeds 2ms, the second displacement sensor is controlled to send the second opening signal, the second opening signal is output, and the second opening time corresponding to the second opening signal is determined to be output.
As an example, the second displacement sensor is in an on state, the preset time threshold is 2ms, the preset second distance threshold is 0.3cm, the height of the second detection area corresponding to the second displacement sensor relative to the pipeline is 0.7cm, the second displacement sensor detects that the height of the second detection area corresponding to the second displacement sensor relative to the pipeline changes to 0cm, namely, the relative distance between the object to be detected and the second displacement sensor is 0cm, but after 1ms, the second displacement sensor detects that the height of the second detection area relative to the pipeline is restored to 0.7cm and is kept exceeding 2ms, and then the second displacement sensor continues to keep the on state.
Step S103, performing image acquisition on the object to be detected based on the time when the first displacement sensor sends the first start signal, the time when the first displacement sensor sends the stop signal, and the time when the second displacement sensor sends the second start signal.
In some embodiments, the time when the first displacement sensor sends the first start signal may include: the first displacement sensor outputs a first opening time corresponding to the first opening signal, and the embodiment of the application is not limited to the specific time when the first displacement sensor sends the first opening signal. The time at which the first displacement sensor transmits the stop signal may include: the stopping time corresponding to the stopping signal output by the first displacement sensor is not limited to the specific time when the stopping signal is sent by the first displacement sensor. The time at which the second displacement sensor transmits the second start signal may include: the second displacement sensor outputs a second opening time corresponding to the second opening signal, and the embodiment of the application is not limited to a specific time when the second displacement sensor sends the second opening signal. Image acquisition of the object to be detected may include: the image acquisition equipment acquires images of the object to be detected. Wherein, the image acquisition device may include: industrial cameras. The image capturing device may also include other image capturing devices, and embodiments of the present application are not limited to a particular image capturing device.
In a specific implementation, based on the time when the first displacement sensor sends the first start signal, the time when the first displacement sensor sends the stop signal, and the time when the second displacement sensor sends the second start signal, performing image acquisition on the object to be detected may include: determining a delay time based on a time at which the first displacement sensor transmits the first start signal and a time at which the first displacement sensor transmits the stop signal; and acquiring an image of the object to be detected based on the delay time and the moment when the second displacement sensor sends the second starting signal.
In some embodiments, as shown in fig. 2, the processing procedure for performing image acquisition on the object to be detected based on the time when the first displacement sensor sends the first start signal, the time when the first displacement sensor sends the stop signal, and the time when the second displacement sensor sends the second start signal may include:
step S21, determining a duration corresponding to the difference value based on the difference value between the time when the first displacement sensor sends the stop signal and the time when the first displacement sensor sends the first start signal.
Step S22, determining half of the duration corresponding to the difference value as the delay time.
Step S23, after the duration corresponding to the delay time elapses from the time when the second displacement sensor sends the second start signal, acquiring an image of the object to be detected.
For step S21, a first turn-on time corresponding to the first turn-on signal output by the first displacement sensor is determined. And determining the stop time corresponding to the output stop signal of the first displacement sensor. Then a difference between the stop time and the first start time is determined. And finally, determining the duration corresponding to the difference value between the stop time and the first opening time.
For step S22, the delay time may include: half the duration of the stop time corresponding to the difference in the first opening time. The delay time may further include: the preset delay time length is not limited to a specific delay time in the embodiment of the application. And determining half of the duration corresponding to the difference value of the stop time and the first opening time as delay time.
For step S23, a second start time corresponding to the output of the second start signal by the second displacement sensor is determined. After half of the time length corresponding to the difference between the stop time and the first opening time is passed, the image acquisition device acquires images of the object to be detected. The image acquisition equipment is positioned above the position of the object to be acquired, and the center of the acquisition area corresponding to image acquisition and the center of the second detection area corresponding to the second displacement sensor are positioned on the same vertical line.
For example, the first start time is 2022, 5, 6, 15:09:14 and the stop time is 2022, 5, 6, 15:09:30. The duration corresponding to the difference between the stop time and the first opening time is determined to be 16s. The delay time is half the duration of the stop time corresponding to the difference in the first opening time, i.e. 8s. The second opening time is 2022, 5 months, 6 days, 15:11:10. After half of the time length corresponding to the difference between the stop time and the first opening time is passed, that is, when 2022 is 5 months and 6 days are 15:11:18, the image acquisition device acquires images of the object to be detected.
In some embodiments, a second process flow diagram of the image acquisition method, as shown in fig. 3, includes:
step S201, in the process of moving the object to be detected, controlling the first displacement sensor to send the first start signal in response to the relative distance between the object to be detected and the first displacement sensor being greater than or equal to a preset first distance threshold and the time length greater than or equal to the preset first distance threshold being greater than or equal to a preset time threshold.
In some embodiments, the preset first distance threshold may include: minimum value of thickness of the object to be detected. The preset first distance threshold may further include other preset distance values, and the embodiment of the present application is not limited to a specific first distance threshold. The preset time threshold may include: the preset duration is not limited to a specific preset duration in the embodiment of the present application. Controlling the first displacement sensor to transmit the first turn-on signal may include: outputting a first opening signal, and determining a first opening time corresponding to the first opening signal. Controlling the first displacement sensor to transmit the stop signal may include: outputting a stop signal, and determining a stop time corresponding to the output stop signal.
In some embodiments, in a process that an object to be detected moves linearly on a production line at a uniform speed, in response to a first detection area corresponding to a first displacement sensor being greater than or equal to a preset first distance threshold and a time length greater than or equal to a preset time threshold, the first displacement sensor is controlled to send the first start signal, the first displacement sensor outputs a first start signal M0, and a first start time T0 corresponding to the first start signal M0 is determined to be output. So far, the product to be detected reaches the first detection area.
Step S202, in the process of moving the object to be detected, controlling the first displacement sensor to send the stop signal in response to the relative distance between the object to be detected and the first displacement sensor being smaller than the preset first distance threshold and the time length smaller than the preset first distance threshold being greater than or equal to the preset time threshold.
In some embodiments, in response to the height of the first detection area relative to the pipeline being less than a preset first distance threshold and the time period being greater than or equal to a preset time threshold, the first displacement sensor is controlled to send the stop signal, the first displacement sensor outputs the stop signal M1, and the stop time T1 corresponding to the output stop signal M1 is determined. So far, the product to be detected completely passes through the first detection area.
Step S203, in the process of moving the object to be detected, controlling the second displacement sensor to send the second start signal in response to the relative distance between the object to be detected and the second displacement sensor being greater than or equal to the preset second distance threshold and the time period greater than or equal to the preset second distance threshold being greater than or equal to the preset time threshold.
In some embodiments, in response to the height of the second detection area corresponding to the second displacement sensor relative to the pipeline being greater than or equal to a preset second distance threshold, and a duration of greater than or equal to the preset second distance threshold being greater than or equal to a preset time threshold, the second displacement sensor is controlled to send the second start signal, the second displacement sensor outputs the second start signal M2, and the second start time T2 corresponding to the output second start signal M2 is determined. So far, the product to be detected reaches the second detection area.
In some embodiments, a third process flow diagram of the image acquisition method, as shown in fig. 4, includes:
step S301, determining a delay time based on a time when the first displacement sensor transmits the first start signal and a time when the first displacement sensor transmits the stop signal.
In some embodiments, the time when the first displacement sensor sends the first start signal may include: the first turn-on signal M0 corresponds to a first turn-on time T0. The time at which the first displacement sensor transmits the stop signal may include: the first displacement sensor outputs a stop time T1 corresponding to the stop signal M1. The delay time may include: half the duration of the stop time corresponding to the difference in the first opening time. The delay time may further include: the preset delay time length is not limited to a specific delay time in the embodiment of the application. Determining the delay time based on the time when the first displacement sensor transmits the first start signal and the time when the first displacement sensor transmits the stop signal may include: based on the first opening time T0 and the stopping time T1, a difference between the stopping time T1 and the first opening time T0 is determined. Half of the duration corresponding to the difference between the stop time T1 and the first start time T0 is determined as the delay time.
Step S302, performing image acquisition on the object to be detected based on the delay time and the time when the second displacement sensor sends the second start signal.
In some embodiments, the time at which the second displacement sensor sends the second turn-on signal may include: the second turn-on signal M2 corresponds to a second turn-on time T2. Based on the delay time and the time when the second displacement sensor sends the second start signal, performing image acquisition on the object to be detected may include: after a period of time corresponding to the delay time from the second opening time T2, the image acquisition device acquires an image of the object to be detected.
In some embodiments, a process flow diagram of the image acquisition method is shown in fig. 5, and includes:
step S401, determining a duration corresponding to the difference value based on the difference value between the time when the first displacement sensor sends the stop signal and the time when the first displacement sensor sends the first start signal.
Step S402, determining half of the duration corresponding to the difference value as the delay time.
In some embodiments, determining that the half of the duration corresponding to the difference value is the delay time may include: based on the first opening time T0 and the stopping time T1, a difference between the stopping time T1 and the first opening time T0 is determined. And determining half of the duration corresponding to the difference between the stop time T1 and the first opening time T0 as the delay time.
Step S403, after the duration corresponding to the delay time elapses from the time when the second displacement sensor sends the second start signal, acquiring an image of the object to be detected.
In some embodiments, after the duration corresponding to the delay time elapses from the time when the second start signal is sent by the second displacement sensor, acquiring the image of the object to be detected may include: after half of the time length corresponding to the difference between the stop time T1 and the first start time T0 from the second start time T2, the image acquisition apparatus acquires an image of the object to be detected. The image acquisition equipment is positioned above the position of the object to be acquired, and the center of the acquisition area corresponding to image acquisition and the center of the second detection area corresponding to the second displacement sensor are positioned on the same vertical line.
Fig. 6 shows an application scenario diagram of an image acquisition method according to an embodiment of the present application.
Referring to fig. 6, an application scenario of the image acquisition method provided by the embodiment of the application is applied to an image acquisition control system of a production line. The image acquisition control system may include: the system comprises a system server, a PLC (Programmable Logic Controller, a programmable logic controller) controller, a 1# laser displacement sensor, a 2# laser displacement sensor, a light source and a camera. The 1# laser displacement sensor, the 2# laser displacement sensor, the light source and the camera are connected with the PLC. The PLC controller is connected with the system server. The 1# laser displacement sensor and the 2# laser displacement sensor may include: a laser displacement sensor. The 1# laser displacement sensor can be used for detecting the height change of a 1# detection area corresponding to the 1# laser displacement sensor relative to the production line and outputting a signal to the PLC controller based on the height change. The 2# laser displacement sensor can be used for detecting the height change of a 2# detection area corresponding to the 2# laser displacement sensor relative to the production line and outputting a signal to the PLC controller based on the height change. The light source may include: a machine vision light source. The light source may be for: the object to be acquired is illuminated, the interference of ambient light is overcome, the stability of the image acquisition control system is ensured, and the precision and the efficiency of the image acquisition control system are improved. The PLC controller may be based on: and the output signals of the 1# laser displacement sensor and the 2# laser displacement sensor control the on and off of the light source and control the camera to collect images of the object to be collected. The system server may be configured to: based on the interaction of signals between the PLC and the system server, the image corresponding to the object to be acquired, which is acquired by the camera, is stored in the system server, and the system server performs subsequent image detection on the image corresponding to the object to be acquired.
It can be appreciated that the application scenario of the image capturing method of fig. 6 is only a part of exemplary implementation of the embodiment of the present application, and the application scenario of the image capturing method of the embodiment of the present application includes, but is not limited to, the application scenario of the image capturing method shown in fig. 6.
Fig. 7 shows another application scenario diagram of the image acquisition method provided by the embodiment of the application.
Referring to fig. 7, another application scenario of the image acquisition method provided by the embodiment of the application is applied to an image acquisition control system of a production line. The image acquisition control system may include: the system comprises a system server, a PLC controller, a sensor 1#, a sensor 2#, a light source and a photographing camera. The product to be detected can have a certain thickness, and is positioned on the production line and moves linearly at a uniform speed along with the production line. The photographing camera is located above the position of the object to be detected, the sensor 1# and the sensor 2# are located above the position of the object to be detected, the first detection area corresponding to the sensor 1# is located on a production line, the second detection area corresponding to the sensor 2# is located on the production line, the center of the collecting area corresponding to the photographing camera and the center of the second detection area corresponding to the sensor 2# are located on the same vertical line, and the first detection area and the second detection area are located on the same horizontal line. In the case where the product to be inspected passes through the first detection area, the sensor 1# is used to detect a change in the height of the first detection area relative to the line. In the case where the product to be inspected passes through the second detection area, the sensor 2# is used to detect a change in the height of the second detection area with respect to the line. The sensor 1# and the sensor 2# may include: a laser displacement sensor.
In the process of uniform linear movement of the product to be detected on the production line, the sensor 1# is controlled to be started in response to the fact that the height of the first detection area relative to the production line is larger than or equal to a preset first distance threshold value and the time length of the first detection area relative to the production line is larger than or equal to a preset time threshold value, the sensor 1# outputs a rising edge signal M0 to the PLC, and the first starting time T0 corresponding to the rising edge signal M0 is determined. So far, the product to be detected reaches the first detection area. And controlling the sensor 1# to stop in response to the fact that the height of the first detection area relative to the pipeline is smaller than a preset first distance threshold and the time length of the first detection area smaller than the preset first distance threshold is larger than or equal to a preset time threshold, outputting a falling edge signal M1 to the PLC controller by the sensor 1# and determining a stop time T1 corresponding to the falling edge signal M1. So far, the product to be detected completely passes through the first detection area.
And controlling the sensor 2# to be started in response to the fact that the height of the second detection area relative to the assembly line is greater than or equal to a preset second distance threshold value and the duration of the second detection area being greater than or equal to the preset second distance threshold value is greater than or equal to a preset time threshold value, outputting a rising edge signal M2 to the PLC by the sensor 2# and determining a second starting moment T2 corresponding to the rising edge signal M2. So far, the product to be detected reaches the second detection area.
The PLC controller determines a first turn-on time T0 corresponding to the rising edge signal M0 outputted from the sensor 1 #. And determining a stop time T1 corresponding to the sensor 1# output falling edge signal M1. Then, a difference between the stop time T1 and the first start time T0 is determined. Finally, the duration corresponding to the difference (T1-T0) between the stop time T1 and the first opening time T0 is determined. The PLC controller determines half of the duration corresponding to the difference (T1-T0) between the stop time T1 and the first opening time T0 as the delay time. I.e. determiningIs the delay time.
After receiving the rising edge signal M0, the falling edge signal M1 and the rising edge signal M2, the PLC controller determines a second start time T2 corresponding to the rising edge signal M2 output by the sensor 2 #. At the time of delay timeAnd then, the PLC controls the light source to start and controls the photographing camera to collect images of the product to be detected. The PLC controller receives the image corresponding to the product to be detected, which is acquired by the photographing camera, and resets the rising edge signal M0, the falling edge signal M1 and the rising edge signal M2 of the sensor 1# and the sensor 2 #.
The system server performs signal interaction with the PLC, images corresponding to the products to be detected, which are acquired by the photographing camera, are stored in the system server, and the system server performs subsequent image detection on the images corresponding to the objects to be acquired.
It can be appreciated that the application scenario of the image capturing method of fig. 7 is only a part of exemplary implementation of the embodiment of the present application, and the application scenario of the image capturing method of the embodiment of the present application includes, but is not limited to, the application scenario of the image capturing method shown in fig. 7.
In the method of the embodiment of the application, in the process of moving the object to be detected, the first displacement sensor is controlled to send a first starting signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value and the time length of the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value is larger than or equal to a preset time threshold value; and in the process of moving the object to be detected, controlling the first displacement sensor to send a stop signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is smaller than the preset first distance threshold and the time length smaller than the preset first distance threshold is larger than or equal to the preset time threshold. And in the process of moving the object to be detected, controlling the second displacement sensor to send a second starting signal in response to the fact that the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold value and the time length of the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold value is larger than or equal to the preset time threshold value. Therefore, the displacement sensor can be prevented from being closed by mistake in the gap due to the existence of the gap in the object to be detected, and further, the image acquisition of the object to be detected can be carried out by mistake. The first distance threshold value and the second distance threshold value are preset, so that the situation that the displacement sensor cannot be started or closed due to the fact that the surface of the object to be detected is uneven can be avoided, and further image acquisition is performed on the object to be detected by mistake. In this way, the accuracy of image acquisition can be improved. According to the method, the first detection area corresponding to the first displacement sensor and the second detection area corresponding to the second displacement sensor are positioned on the same horizontal line; the center of the acquisition area corresponding to the image acquisition and the center of the second detection area corresponding to the second displacement sensor are positioned on the same vertical line, so that the acquisition visual field of the image acquisition equipment and the center of the object to be detected can be ensured to be positioned on the same vertical line, the quality of an image acquired by the image is improved, and the accuracy of the image acquisition is further improved. According to the method, based on the delay time and the moment when the second displacement sensor sends the second starting signal, the image of the object to be detected is acquired, so that repeated image acquisition of the same object to be detected can be avoided, the acquisition visual field of the image acquisition device and the center of the object to be detected can be ensured to be on the same vertical line, the image acquisition precision is improved, and the image acquisition cost is reduced.
Therefore, compared with the sensor which is easy to trigger by mistake in the related art, the image acquisition method can accurately control the displacement sensor, thereby accurately controlling the image acquisition equipment to acquire the image of the object to be detected, and further improving the accuracy of image acquisition.
Continuing with the description below of an exemplary architecture of the image capture device 70 implemented as a software module provided by embodiments of the present application, in some embodiments, as shown in fig. 8, the software modules in the image capture device 70 may include: a first control module 701, configured to control the first displacement sensor to send a first start signal and a stop signal based on a relative distance between an object to be detected and the first displacement sensor; the first starting signal is used for indicating the first displacement sensor to start sending signals, and the stopping signal is used for indicating the first displacement sensor to stop sending signals; a second control module 702, configured to control the second displacement sensor to send a second start signal based on a relative distance between the object to be detected and the second displacement sensor; wherein the second start signal is used for indicating the second displacement sensor to start sending signals; the acquisition module 703 is configured to perform image acquisition on the object to be detected based on the time when the first displacement sensor sends the first start signal, the time when the first displacement sensor sends the stop signal, and the time when the second displacement sensor sends the second start signal.
In some embodiments, the first control module 701 is configured to, in a process of controlling the first displacement sensor to send the first start signal and the stop signal based on the relative distance between the object to be detected and the first displacement sensor: in the process of moving the object to be detected, controlling the first displacement sensor to send the first opening signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value and the time length of the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value is larger than or equal to a preset time threshold value; and in the process of moving the object to be detected, controlling the first displacement sensor to send the stop signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is smaller than the preset first distance threshold and the time length smaller than the preset first distance threshold is larger than or equal to the preset time threshold.
In some embodiments, the second control module 702 is configured to, in controlling the second displacement sensor to send a second start signal based on a relative distance between the object to be detected and the second displacement sensor: and in the process of moving the object to be detected, controlling the second displacement sensor to send the second opening signal in response to the fact that the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold and the time length of the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold is larger than or equal to the preset time threshold.
In some embodiments, the acquisition module 703 is configured to, during image acquisition of the object to be detected based on the time when the first displacement sensor sends the first on signal, the time when the first displacement sensor sends the stop signal, and the time when the second displacement sensor sends the second on signal: determining a delay time based on a time at which the first displacement sensor transmits the first start signal and a time at which the first displacement sensor transmits the stop signal; and acquiring an image of the object to be detected based on the delay time and the moment when the second displacement sensor sends the second starting signal.
In some embodiments, the acquisition module 703 is configured to, in determining the delay time based on the time when the first displacement sensor sends the first start signal and the time when the first displacement sensor sends the stop signal: determining a duration corresponding to a difference value based on the difference value between the moment when the first displacement sensor sends the stop signal and the moment when the first displacement sensor sends the first opening signal; and determining half of the time length corresponding to the difference value as the delay time.
In some embodiments, the acquisition module 703 is configured to, during image acquisition of the object to be detected, based on the delay time and a time when the second displacement sensor sends the second start signal: and after the time corresponding to the delay time passes from the moment when the second start signal is sent by the second displacement sensor, acquiring an image of the object to be detected.
In some embodiments, the first detection area corresponding to the first displacement sensor and the second detection area corresponding to the second displacement sensor are located on the same horizontal line; the center of the acquisition area corresponding to the image acquisition and the center of the second detection area corresponding to the second displacement sensor are positioned on the same vertical line.
It should be noted that, the description of the apparatus according to the embodiment of the present application is similar to the description of the embodiment of the method described above, and has similar beneficial effects as the embodiment of the method, so that a detailed description is omitted. The technical details of the image capturing device according to the embodiment of the present application, which are not described in detail, can be understood from the description of any one of fig. 1 to 8.
According to an embodiment of the present application, the present application also provides an electronic device and a non-transitory computer-readable storage medium.
Fig. 9 shows a schematic block diagram of an example electronic device 800 that may be used to implement an embodiment of the application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 9, the electronic device 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 802 or a computer program loaded from a storage unit 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
Various components in electronic device 800 are connected to I/O interface 805, including: an input unit 806 such as a keyboard, mouse, etc.; an output unit 807 such as various types of displays, speakers, and the like; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, or the like. The communication unit 809 allows the electronic device 800 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 801 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the respective methods and processes described above, for example, an image acquisition method. For example, in some embodiments, the image acquisition method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 800 via the ROM 802 and/or the communication unit 809. When a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the image acquisition method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the image acquisition method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution disclosed in the present application can be achieved, and are not limited herein.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (7)

1. An image acquisition method, the method comprising:
controlling the first displacement sensor to send a first start signal and a stop signal based on the relative distance between the object to be detected and the first displacement sensor; the first starting signal is used for indicating the first displacement sensor to start sending signals, and the stopping signal is used for indicating the first displacement sensor to stop sending signals;
Wherein, based on the relative distance between the object to be detected and the first displacement sensor, the first displacement sensor is controlled to send a first start signal and a stop signal, and the method comprises the following steps:
In the process of moving the object to be detected, controlling the first displacement sensor to send the first opening signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value and the time length of the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value is larger than or equal to a preset time threshold value;
In the process of moving the object to be detected, controlling the first displacement sensor to send the stop signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is smaller than the preset first distance threshold and the time length of the relative distance between the object to be detected and the first displacement sensor is smaller than the preset first distance threshold is larger than or equal to the preset time threshold;
Controlling the second displacement sensor to send a second opening signal based on the relative distance between the object to be detected and the second displacement sensor; wherein the second start signal is used for indicating the second displacement sensor to start sending signals;
Image acquisition is carried out on the object to be detected based on the moment when the first displacement sensor sends the first starting signal, the moment when the first displacement sensor sends the stopping signal and the moment when the second displacement sensor sends the second starting signal;
The image acquisition of the object to be detected based on the time when the first displacement sensor sends the first opening signal, the time when the first displacement sensor sends the stop signal, and the time when the second displacement sensor sends the second opening signal includes:
Determining a delay time based on a time at which the first displacement sensor transmits the first start signal and a time at which the first displacement sensor transmits the stop signal;
based on the delay time and the moment when the second start signal is sent by the second displacement sensor, image acquisition is carried out on the object to be detected;
the image acquisition of the object to be detected based on the delay time and the time when the second displacement sensor sends the second start signal includes:
And after the time corresponding to the delay time passes from the moment when the second start signal is sent by the second displacement sensor, acquiring an image of the object to be detected.
2. The method of claim 1, wherein controlling the second displacement sensor to send a second on signal based on a relative distance of the object to be detected from the second displacement sensor comprises:
And in the process of moving the object to be detected, controlling the second displacement sensor to send the second opening signal in response to the fact that the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold and the time length of the relative distance between the object to be detected and the second displacement sensor is larger than or equal to the preset second distance threshold is larger than or equal to the preset time threshold.
3. The method of claim 1, wherein the determining a delay time based on a time at which the first displacement sensor transmits the first turn-on signal and a time at which the first displacement sensor transmits the stop signal comprises:
determining a duration corresponding to a difference value based on the difference value between the moment when the first displacement sensor sends the stop signal and the moment when the first displacement sensor sends the first opening signal;
and determining half of the time length corresponding to the difference value as the delay time.
4. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The first detection area corresponding to the first displacement sensor and the second detection area corresponding to the second displacement sensor are positioned on the same horizontal line;
the center of the acquisition area corresponding to the image acquisition and the center of the second detection area corresponding to the second displacement sensor are positioned on the same vertical line.
5. An image acquisition device, the device comprising:
the first control module is used for controlling the first displacement sensor to send a first start signal and a stop signal based on the relative distance between the object to be detected and the first displacement sensor; the first starting signal is used for indicating the first displacement sensor to start sending signals, and the stopping signal is used for indicating the first displacement sensor to stop sending signals;
The first control module is further configured to, in a process of controlling the first displacement sensor to send a first start signal and a stop signal based on a relative distance between the object to be detected and the first displacement sensor: in the process of moving the object to be detected, controlling the first displacement sensor to send the first opening signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value and the time length of the relative distance between the object to be detected and the first displacement sensor is larger than or equal to a preset first distance threshold value is larger than or equal to a preset time threshold value;
In the process of moving the object to be detected, controlling the first displacement sensor to send the stop signal in response to the fact that the relative distance between the object to be detected and the first displacement sensor is smaller than the preset first distance threshold and the time length of the relative distance between the object to be detected and the first displacement sensor is smaller than the preset first distance threshold is larger than or equal to the preset time threshold;
The second control module is used for controlling the second displacement sensor to send a second starting signal based on the relative distance between the object to be detected and the second displacement sensor; wherein the second start signal is used for indicating the second displacement sensor to start sending signals;
The acquisition module is used for acquiring images of the object to be detected based on the moment when the first displacement sensor sends the first starting signal, the moment when the first displacement sensor sends the stopping signal and the moment when the second displacement sensor sends the second starting signal;
The acquisition module is further configured to determine a delay time based on a time when the first displacement sensor transmits the first start signal and a time when the first displacement sensor transmits the stop signal, and a time when the second displacement sensor transmits the second start signal, in a process of acquiring the image of the object to be detected;
based on the delay time and the moment when the second start signal is sent by the second displacement sensor, image acquisition is carried out on the object to be detected;
the acquisition module is further configured to acquire an image of the object to be detected after a time corresponding to the delay time elapses from a time when the second start signal is transmitted by the second displacement sensor.
6. An electronic device, comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
7. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN202210742873.4A 2022-06-27 2022-06-27 Image acquisition method and device, electronic equipment and storage medium Active CN115190239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210742873.4A CN115190239B (en) 2022-06-27 2022-06-27 Image acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210742873.4A CN115190239B (en) 2022-06-27 2022-06-27 Image acquisition method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115190239A CN115190239A (en) 2022-10-14
CN115190239B true CN115190239B (en) 2024-04-19

Family

ID=83515096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210742873.4A Active CN115190239B (en) 2022-06-27 2022-06-27 Image acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115190239B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104267041A (en) * 2014-09-12 2015-01-07 北京慧眼智行科技有限公司 High-speed online detection system and method of presswork
CN104349021A (en) * 2013-07-24 2015-02-11 腾讯科技(深圳)有限公司 Image acquisition method, device and terminal
CN206114546U (en) * 2016-09-19 2017-04-19 南京航空航天大学 Printing defect vision detection system
CN108287162A (en) * 2018-01-09 2018-07-17 温州三特食品科技有限公司 A kind of method of food security intelligent measurement
CN207985382U (en) * 2018-01-09 2018-10-19 温州三特食品科技有限公司 A kind of food security intelligent detection device
CN108956633A (en) * 2018-07-18 2018-12-07 郑州云海信息技术有限公司 A kind of equipment and system triggering camera synchronous acquisition moving object image
CN110674649A (en) * 2018-07-02 2020-01-10 西克股份公司 Photoelectric sensor and method for repeated optical detection of objects at different object distances
CN111428560A (en) * 2020-02-20 2020-07-17 重庆创通联达智能技术有限公司 Video image processing method and device, electronic equipment and storage medium
CN111475059A (en) * 2013-03-14 2020-07-31 视力移动科技公司 Gesture detection based on proximity sensor and image sensor
CN111935393A (en) * 2020-06-28 2020-11-13 百度在线网络技术(北京)有限公司 Shooting method, shooting device, electronic equipment and storage medium
CN113759432A (en) * 2021-07-20 2021-12-07 浙江华视智检科技有限公司 Security check system, data acquisition rate adjusting method and article information detection method
CN216308903U (en) * 2021-11-17 2022-04-15 福建星谷信息科技有限公司 Continuous scanning device for effective width of wood board

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6992707B2 (en) * 2002-03-06 2006-01-31 Hewlett-Packard Development Company, L.P. Delayed encoding based joint video and still image pipeline with still burst mode
DE102005056265A1 (en) * 2005-11-14 2007-05-16 Pilz Gmbh & Co Kg Device and method for monitoring a room area, in particular for securing a danger zone of an automated system
US20220012911A1 (en) * 2020-07-13 2022-01-13 United States Postal Service System and method for analyzing an image to determine spacing between a person and an object

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111475059A (en) * 2013-03-14 2020-07-31 视力移动科技公司 Gesture detection based on proximity sensor and image sensor
CN104349021A (en) * 2013-07-24 2015-02-11 腾讯科技(深圳)有限公司 Image acquisition method, device and terminal
CN104267041A (en) * 2014-09-12 2015-01-07 北京慧眼智行科技有限公司 High-speed online detection system and method of presswork
CN206114546U (en) * 2016-09-19 2017-04-19 南京航空航天大学 Printing defect vision detection system
CN108287162A (en) * 2018-01-09 2018-07-17 温州三特食品科技有限公司 A kind of method of food security intelligent measurement
CN207985382U (en) * 2018-01-09 2018-10-19 温州三特食品科技有限公司 A kind of food security intelligent detection device
CN110674649A (en) * 2018-07-02 2020-01-10 西克股份公司 Photoelectric sensor and method for repeated optical detection of objects at different object distances
CN108956633A (en) * 2018-07-18 2018-12-07 郑州云海信息技术有限公司 A kind of equipment and system triggering camera synchronous acquisition moving object image
CN111428560A (en) * 2020-02-20 2020-07-17 重庆创通联达智能技术有限公司 Video image processing method and device, electronic equipment and storage medium
CN111935393A (en) * 2020-06-28 2020-11-13 百度在线网络技术(北京)有限公司 Shooting method, shooting device, electronic equipment and storage medium
CN113759432A (en) * 2021-07-20 2021-12-07 浙江华视智检科技有限公司 Security check system, data acquisition rate adjusting method and article information detection method
CN216308903U (en) * 2021-11-17 2022-04-15 福建星谷信息科技有限公司 Continuous scanning device for effective width of wood board

Also Published As

Publication number Publication date
CN115190239A (en) 2022-10-14

Similar Documents

Publication Publication Date Title
US11713970B2 (en) Positioning method, electronic device and computer readable storage medium
EP4043912A1 (en) Method and apparatus for testing sensing effect, moving apparatus, electronic device, storage medium, computer program product, and system for testing sensing effect
CN112597895B (en) Confidence determining method based on offset detection, road side equipment and cloud control platform
CN110687513B (en) Human body target detection method, device and storage medium
CN115190239B (en) Image acquisition method and device, electronic equipment and storage medium
CN113029136A (en) Method, apparatus, storage medium, and program product for positioning information processing
CN116118363B (en) Intelligent defect marking method, device, system and storage medium
CN116681913A (en) Positioning method, device, equipment and storage medium for label printing
CN115236653B (en) Radar detection method, device, equipment and medium
CN114120252B (en) Automatic driving vehicle state identification method and device, electronic equipment and vehicle
JPWO2017183107A1 (en) Transient detection device, transient detection system, and transient detection method
CN115035481A (en) Image object distance fusion method, device, equipment and storage medium
CN115311624A (en) Slope displacement monitoring method and device, electronic equipment and storage medium
CN115877401B (en) Posture detection method, device and equipment for hydraulic support and storage medium
CN115373418A (en) Motion control method, device, equipment and medium for mobile terminal
CN113026828B (en) Underwater pile foundation flaw detection method, device, equipment, storage medium and program product
CN112683216B (en) Method and device for generating vehicle length information, road side equipment and cloud control platform
CN117590019A (en) Speed detection method and device, electronic equipment and storage medium
CN117589188B (en) Driving path planning method, driving path planning device, electronic equipment and storage medium
CN108253229B (en) Control method and device for safe operation of mechanical structure and terminal equipment
CN115938109A (en) Method, device, storage medium and equipment for detecting vehicle crossing by traffic radar
CN115373037A (en) Detection method, device, equipment and storage medium
CN116892939A (en) Track determination method and device, electronic equipment and storage medium
CN114488195A (en) Blind area range detection method and device for automatic driving vehicle and electronic equipment
CN117047778A (en) Method and device for determining movement track of mechanical arm, electronic equipment 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
GR01 Patent grant
GR01 Patent grant