CN112858169B - Light source detection equipment, light source lighting method thereof and light source control device - Google Patents
Light source detection equipment, light source lighting method thereof and light source control device Download PDFInfo
- Publication number
- CN112858169B CN112858169B CN202110137076.9A CN202110137076A CN112858169B CN 112858169 B CN112858169 B CN 112858169B CN 202110137076 A CN202110137076 A CN 202110137076A CN 112858169 B CN112858169 B CN 112858169B
- Authority
- CN
- China
- Prior art keywords
- light source
- light
- starting
- light emitting
- point position
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 104
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000003287 optical effect Effects 0.000 claims abstract description 78
- 230000000007 visual effect Effects 0.000 claims description 31
- 238000007689 inspection Methods 0.000 claims description 26
- 238000010438 heat treatment Methods 0.000 abstract description 6
- 230000008569 process Effects 0.000 abstract description 5
- 230000008033 biological extinction Effects 0.000 abstract description 2
- 230000002349 favourable effect Effects 0.000 abstract 1
- 239000003086 colorant Substances 0.000 description 6
- 230000007547 defect Effects 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000003466 welding Methods 0.000 description 2
- 101500027295 Homo sapiens Sperm histone HP3 Proteins 0.000 description 1
- 102400000926 Sperm histone HP3 Human genes 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000008602 contraction Effects 0.000 description 1
- 238000011217 control strategy Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/01—Arrangements or apparatus for facilitating the optical investigation
Landscapes
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Facsimile Scanning Arrangements (AREA)
- Image Input (AREA)
Abstract
The invention discloses a light source detection device, a light source lighting method and a light source control device thereof, wherein the light source lighting method of the light source detection device obtains the view starting point position or the view end point position of an image acquisition module by obtaining the scanning width of the image acquisition module along the scanning direction, the starting position of the light source and the length of a light emitting area along the scanning direction, and takes the view starting point position or the view end point position as a reference, determines the starting position and the end point position of the light emitting area which needs to be lighted currently according to the scanning width, determines the starting number and the end point number of the light emitting area which needs to be lighted currently according to the starting position and the end point position and the length of the light source, and controls the lighting or the extinction of the light emitting area according to the starting number and the end point number, thereby realizing the sectional lighting of the light source, reducing the heating value of the light source in the detection process, solving the problem that the heating of the light source affects the detection precision, being favorable for improving the stability of optical detection and improving the detection precision.
Description
Technical Field
The present invention relates to the field of optical detection technologies, and in particular, to an optical detection apparatus, a light source lighting method thereof, and a light source control device.
Background
Automated optical inspection (Automated Optical Inspection, AOI) equipment is equipment that detects common defects encountered in welding production based on optical principles.
When automatic detection operation is carried out, a light source of automatic optical detection equipment is turned on, an image acquisition module automatically scans a workpiece to be detected (such as a PCB), an image of the workpiece to be detected is acquired, after image processing, defects of the workpiece to be detected are detected, and the defects are displayed/marked through a display or an automatic mark.
In the traditional automatic optical detection equipment, the light source is usually set as a strip light source, and the light source controller adopts a single channel to control the on-off of the light source, namely, when the workpiece to be detected is subjected to positioning scanning detection, the light source controller controls the whole strip light source to be fully started to emit light; after the scanning detection is completed, the light source controller controls the whole strip light source to be completely turned off. The inventors found in the process of implementing the conventional technology that: when the detection operation is carried out, the whole strip-shaped light source is always kept in an on state and can generate heat, the heat generated by the light source indirectly heats the workpiece to be detected, so that the workpiece to be detected is expanded under the influence of thermal expansion and cold contraction, the detection precision of the workpiece to be detected is influenced, and when the same workpiece to be detected is repeatedly detected for many times, the heat of the light source is high, and the influence on the detection precision of the workpiece to be detected is more prominent.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems in the related art to some extent. Therefore, a first object of the present invention is to provide a light source lighting method of an optical inspection apparatus, which can reduce the heat of a light source during inspection, so as to reduce the influence on a workpiece to be inspected and improve the inspection accuracy.
A second object of the present invention is to provide a light source control device of an optical detection apparatus.
A third object of the present invention is to propose an optical detection device.
To achieve the above object, an embodiment of the present invention provides a light source lighting method of an optical detection device, where the optical detection device includes a light source and an image acquisition module, the light source includes at least two light emitting areas, and the at least two light emitting areas are sequentially arranged along a scanning direction, and the method includes the following steps: acquiring the scanning width of the image acquisition module along the scanning direction, the starting position of the light source and the length of the light-emitting area along the scanning direction; acquiring a view starting point position or a view ending point position of an image acquisition module; determining the starting position and the end position of a light-emitting area which needs to be lightened currently according to the scanning width by taking the starting position or the end position of the visual field as a reference; determining the starting number and the end number of the light-emitting area to be lightened currently according to the starting position and the end position of the light-emitting area to be lightened currently, and the starting position and the length of the light source; the light-emitting area is controlled to be turned on or off according to the start number and the end number.
According to the light source lighting method provided by the embodiment of the invention, the scanning width of the image acquisition module along the scanning direction, the starting position of the light source and the length of the light emitting area along the scanning direction are acquired, the starting position or the finishing position of the visual field of the image acquisition module is acquired, the starting position and the finishing position of the light emitting area which needs to be lighted currently are determined according to the scanning width by taking the starting position or the finishing position of the visual field as a reference, the starting number and the finishing number of the light emitting area which needs to be lighted currently are determined according to the starting position and the finishing position of the light source and the starting position and the length of the light source, and the lighting or extinguishing of the light emitting area is controlled according to the starting number and the finishing number, so that the light source is lighted in a sectional mode.
According to one embodiment of the present invention, determining a start position and an end position of a light emitting area to be currently lit according to a scan width with reference to a start position of a field of view includes: taking the starting position of the visual field as the starting position of a light-emitting area which needs to be lightened currently; and adding the scanning width on the basis of the starting point position of the visual field to obtain the end point position of the luminous area which is required to be lightened currently.
According to one embodiment of the present invention, determining a start position and an end position of a light emitting area to be currently lit according to a scan width with reference to a field end position includes: subtracting the scanning width on the basis of the end position of the visual field to obtain the initial position of the luminous area which needs to be lightened currently; and taking the end position of the visual field as the end position of the luminous area which needs to be lightened currently.
According to one embodiment of the present invention, determining the start number and the end number of the light emitting area to be lit at present according to the start position and the end position of the light emitting area to be lit at present, the start position and the length of the light source, includes: acquiring a first distance between the initial position of a light-emitting area to be lightened at present and the initial position of a light source, and calculating the ratio of the first distance to the length to determine the initial number of the light-emitting area to be lightened at present; and obtaining a second distance between the end position of the light-emitting area to be lightened at present and the initial position of the light source, and calculating the ratio of the second distance to the length to determine the end number of the light-emitting area to be lightened at present.
According to an embodiment of the present invention, controlling lighting or extinguishing of a light emitting area according to a start number and an end number includes: judging whether the vision field starting point position and the vision field end point position of the image acquisition module are both between the starting position and the end position of the light source; if the view starting point position and the view end point position of the image acquisition module are both between the starting position of the light source and the end position of the light source, acquiring a number difference value between the end number and the starting number; if the number difference is equal to 0, the luminous areas corresponding to the initial numbers are controlled to be on, and the rest luminous areas are all off; if the number difference is equal to 1, the luminous areas corresponding to the initial number and the luminous areas corresponding to the end number are controlled to be lightened, and the rest luminous areas are extinguished; if the number difference is greater than 1, the luminous areas corresponding to the initial number, the luminous areas corresponding to the end number and the luminous areas between the initial number and the end number are all lighted, and the rest luminous areas are all extinguished.
According to an embodiment of the present invention, the lighting area is controlled to be turned on or off according to the start number and the end number, further comprising: if the view starting point position and the view end point position of the image acquisition module are not located between the starting position and the end position of the light source, the light-emitting area of the light source is controlled to be extinguished; if the view starting point position of the image acquisition module is not between the starting position of the light source and the end point position of the light source and the view end point position of the image acquisition module is between the starting position of the light source and the end point position of the light source, controlling the luminous areas between the numbers corresponding to the starting position of the light source and the end point numbers to be on, and extinguishing the rest luminous areas; if the view starting point position of the image acquisition module is positioned between the starting position of the light source and the end point position of the light source and the view end point position of the image acquisition module is not positioned between the starting position of the light source and the end point position of the light source, the luminous areas between the starting number and the number corresponding to the end point position of the light source are controlled to be on, and the rest luminous areas are all extinguished.
According to an embodiment of the present invention, the above-mentioned light source lighting method further includes: judging whether detection is finished; if the detection is finished, the luminous areas are controlled to be extinguished; if the detection is not completed, the step of acquiring the view start point position or the view end point position of the image acquisition module is performed in a return manner.
To achieve the above object, a second aspect of the present invention provides a light source control apparatus for an optical inspection device, wherein the optical inspection device includes a light source and an image acquisition module, the light source includes at least two light emitting areas, the at least two light emitting areas are sequentially arranged along a scanning direction, the light source control apparatus comprising: a first acquisition unit for acquiring a scanning width of the image acquisition module along a scanning direction, a starting position of the light source and a length of the light emitting area along the scanning direction; the second acquisition unit is used for acquiring the vision field starting point position or the vision field end point position of the image acquisition module; and the control unit is used for determining the starting position and the end position of the light-emitting area which is required to be lightened currently according to the scanning width by taking the starting position or the end position of the visual field as a reference, determining the starting number and the end number of the light-emitting area which is required to be lightened currently according to the starting position and the end position of the light-emitting area which is required to be lightened currently, the starting position and the length of the light source, and controlling the light-emitting area to be lightened or extinguished according to the starting number and the end number.
According to the light source control device provided by the embodiment of the invention, the first acquisition unit is used for acquiring the scanning width of the image acquisition module along the scanning direction, the starting position of the light source and the length of the light-emitting area along the scanning direction, the second acquisition unit is used for acquiring the starting position or the finishing position of the visual field of the image acquisition module, the control unit is used for determining the starting position and the finishing position of the light-emitting area which needs to be lightened currently according to the scanning width by taking the starting position or the finishing position of the visual field as a reference, determining the starting number and the finishing number of the light-emitting area which needs to be lightened currently according to the starting position and the finishing position of the light source and the starting position and the length of the light source, and controlling the light-emitting area to be lightened or extinguished according to the starting number and the finishing number, so that the light source is lightened in a subsection mode.
According to one embodiment of the invention, a light source comprises: n light-emitting elements, wherein each light-emitting element in the N light-emitting elements correspondingly forms a light-emitting area, and the N light-emitting elements are connected in series between two ends of a power supply, wherein N is an integer greater than 1; the first switch unit is connected in series in a power supply loop formed by the N light-emitting elements and the power supply and used for controlling the on-off of the power supply loop; the N second switch units are in one-to-one correspondence with the N light-emitting elements, and each of the N second switch units is connected with the corresponding light-emitting element in parallel and used for controlling the light-on or light-off of the corresponding light-emitting element; and the controller is respectively connected with the control unit, the first switch unit and the N second switch units and is used for controlling the first switch unit and the N second switch units according to the control signals output by the control unit so as to enable the luminous areas formed by the luminous elements to be on or off.
According to one implementation of the invention, the first switch unit comprises N first switches, the N first switches are in one-to-one correspondence with the N light emitting elements, and the N first switches are connected in parallel and then connected in series in a power supply loop formed by the N light emitting elements and a power supply source.
According to one embodiment of the present invention, the second switching unit includes N-1 second switches and third switches, the N-1 second switches are in one-to-one correspondence with light emitting elements other than the light emitting elements corresponding to the second switching unit, the third switches are corresponding to the light emitting elements corresponding to the second switching unit, and the N-1 second switches are connected in parallel and then connected in series with the third switches, and are connected in parallel with the light emitting elements corresponding to the second switching unit after being connected in series.
According to one implementation of the invention, the first switch is a normally open contact of the relay, the second switch is a normally open contact of the relay, and the third switch is a normally closed contact of the relay.
To achieve the above object, an embodiment of a third aspect of the present invention provides an optical detection apparatus, including: the device comprises an image acquisition module, a motion platform and a light source control device of the optical detection equipment.
According to the optical detection device provided by the embodiment of the invention, the light source is lighted in a segmented manner through the light source control device, and compared with the traditional technology that the whole strip-shaped light source is controlled to be lighted completely, the optical detection device provided by the embodiment of the invention can reduce the heating value of the light source in the detection process, solves the problem that the detection precision is affected by the heating of the light source, is beneficial to improving the stability of optical detection and improves the detection precision.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a schematic diagram of the working principle of an optical detection device according to an embodiment of the present invention;
fig. 2 is a flowchart of a light source lighting method of the optical inspection apparatus according to the first embodiment of the present invention;
fig. 3 is a flowchart of a light source lighting method of the optical inspection apparatus according to the second embodiment of the present invention;
fig. 4 is a flowchart of a light source lighting method of the optical inspection apparatus according to the third embodiment of the present invention;
fig. 5 is a flowchart of a light source lighting method of the optical inspection apparatus according to the fourth embodiment of the present invention;
FIG. 6 is a schematic block diagram of a light source control device of an optical inspection apparatus according to an embodiment of the present invention;
FIG. 7 is a schematic block diagram of a light source according to an embodiment of the invention;
fig. 8 is a schematic circuit diagram of a light source according to an embodiment of the present invention;
fig. 9 is a schematic structural view of an optical inspection apparatus according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
The following describes an optical detection device, a light source lighting method thereof and a light source control device according to an embodiment of the present invention with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic diagram of the operation of an optical inspection apparatus. In this application, the optical detection device includes a light source 110 and an image acquisition module 120. The light source 110 is a segmented light source, and includes at least two light emitting regions 111, and the at least two light emitting regions 111 are sequentially arranged along a scanning direction, wherein the scanning direction is an arrow direction x as shown in fig. 1. The light source 110 is a multi-driving channel light source, each driving channel correspondingly controls one light-emitting area 111, and each light-emitting area 111 can be respectively controlled to be on or off through the driving channel. The optical detection apparatus further includes a light source control means (not shown in fig. 1) for controlling the respective driving channels to light up or light down the corresponding light emitting areas 111. The light emitting areas 111 may be provided as LED strips having the same length, the light emitting color of the LED lamps is not limited, and the light emitting areas may be arranged in a strip shape. The image acquisition module 120 may be an industrial scanning camera, such as a CCD (Charge-coupled Device) line scan camera.
In this embodiment, the optical inspection apparatus further includes a motion platform 130, where the motion platform 130 is used to place a workpiece to be inspected. As shown in fig. 1, when the image acquisition module 120 is located at the first position, the light emitting region 111 corresponding to the position immediately below the first position is lighted, and the light emitting regions 111 of the remaining positions are extinguished. When the image acquisition module 120 moves to the second position, the light emitting region 111 corresponding to the position immediately below the second position is lighted, and the light emitting regions 111 of the remaining positions are extinguished. The image acquisition module 120 is controlled to continuously scan the workpiece to be detected column by column, images of the workpiece to be detected are acquired, and the light source 110 is controlled to sequentially light up from the light-emitting area 111 at the starting position along the scanning direction, so that the workpiece to be detected on the motion platform 130 is irradiated, and the detection of the workpiece to be detected is completed.
Fig. 2 is a flowchart of a method for lighting a light source of an optical inspection apparatus according to an embodiment of the present invention, which may be performed by a software and hardware apparatus configured with specific automatic optical inspection, and referring to fig. 2, the method may include the steps of:
step S101, acquiring a scanning width of the image acquisition module along the scanning direction, a starting position of the light source, and a length of the light emitting area along the scanning direction.
The image acquisition module comprises a line scanning telecentric lens, and the line scanning telecentric lens is used for scanning the workpiece to be detected along the scanning direction. The scan range of the line scan telecentric lens can be characterized by the scan width of the image acquisition module along the scan direction. In the detection process, the image acquisition module can be controlled to continuously scan along the scanning direction along the step size slightly smaller than the scanning width so as to acquire the image data of the workpiece to be detected.
For the same optical detection device, the scan width W1 of the image acquisition module, the start position P1 of the light source, and the length L1 of the light emitting region in the scan direction are kept unchanged, so in this embodiment, the scan width W1 of the image acquisition module, the start position P1 of the light source, and the length L1 of the light emitting region in the scan direction are recorded in a configuration file for subsequent calculation and recall.
Further, in order to facilitate the respective control of the light emitting areas, the light emitting areas may be numbered, the light emitting area number defining the start position of the light source is 0, the light emitting area number defining the end position is S, the numbers corresponding to the light emitting areas between the start position and the end position are sequentially increased from 0, and the numbers corresponding to the light emitting areas at the start position and the end position are recorded in the configuration file.
Step S102, a view start position or a view end position of the image acquisition module is acquired.
As shown in fig. 1, during the detection, the view start point position P2' or the view end point position p2″ of the image acquisition module is acquired in real time. In this embodiment, the image acquisition module may include a camera assembly, a grating ruler module and a linear motor, where the linear motor drives the camera assembly to perform a translational scanning motion, and the reading head of the grating ruler module may obtain the view start point position P2' or the view end point position P2 ". Or the image acquisition module of the embodiment can comprise a camera component, an encoder and a screw rod movement module driven by a rotary motor, wherein the encoder can obtain the vision starting point position P2 'or the vision end point position P2'.
Step S103, determining the starting position and the end position of the light-emitting area which needs to be lightened currently according to the scanning width by taking the starting position or the end position of the visual field as a reference.
Specifically, the irradiation range of the light emitting region that is currently required to be lit should be adapted to the scanning width of the image acquisition module. Therefore, the start position and the end position of the light emitting region can be acquired by acquiring the view start position P2' or the view end position P2″ of the image acquisition module. In this embodiment, the scanning width of the image acquisition module may be greater than, less than, or equal to the length of each light emitting area along the scanning direction, and thus the number of light emitting areas corresponding between the view start point position and the view end point position of the image acquisition module may be one or more. And acquiring the starting position and the end position of the light-emitting area to be lightened currently according to the starting position and the end position of the visual field, so as to acquire the number of one or more light-emitting areas to be lightened according to the starting position and the end position.
As an example, determining the start position and the end position of the light emitting area currently required to be lit according to the scanning width W1 with reference to the view start position P2', includes: taking the starting position P2' of the visual field as the starting position of a light-emitting area which needs to be lightened currently; and adding the scanning width on the basis of the starting point position P2' of the visual field to obtain the end point position of the luminous area which needs to be lightened currently.
That is, when the view start position P2' is taken as a reference, the start position P3 of the light emitting region that needs to be lighted at present is the view start position P2', that is, p3=p2 '; the end position P4 of the light emitting area that is currently required to be lit is the field of view start position P2 'of the image acquisition module plus the scan width, that is, p4=p2' +w1.
As another example, determining the start position and the end position of the light emitting area currently required to be lit according to the scanning width W1 with reference to the field end position p2″ includes: subtracting the scanning width on the basis of the visual field end point position P2' to obtain the initial position of the luminous area needing to be lightened currently; the field end position P2 "is set as the end position of the light emitting region that is currently required to be lit.
That is, when the view end position p2″ is taken as a reference, the end position P4 of the light emitting region that is currently required to be lighted is the view end position p2″, that is, p4=p2″; the starting position P3 of the currently required illuminated light-emitting region is the field end position p2″ minus the scan width of the image acquisition module, i.e., p3=p2 "-W1.
Step S104, determining the starting number and the end number of the light-emitting area to be lightened according to the starting position and the end position of the light-emitting area to be lightened, and the starting position and the length of the light source.
Specifically, the corresponding relation between the number of the light emitting area and the number of the driving channel is stored in the light source control device of the optical detection device, and then the light source control device can control the corresponding driving channel to power on according to the acquired starting number and the end number of the light emitting area so as to drive the light emitting area with the corresponding number to light.
As an example, the start number of a light emitting region that is currently required to be lit may be determined by:
acquiring a first distance between the starting position of the light-emitting area to be lighted currently and the starting position of the light source, and calculating the ratio of the first distance to the length to determine the starting number of the light-emitting area to be lighted currently, namely, the starting number N1 can be acquired by the following formula:
N1=(P3-P1)/L1
wherein N1 represents the start number of the light emitting area that needs to be lit at present, P3 represents the start position of the light emitting area that needs to be lit at present, P1 represents the start position of the light source, and L1 represents the length.
As another example, the end point number of a light emitting region that is currently required to be lit may be determined by:
acquiring a second distance between the end position of the light-emitting area to be lighted at present and the initial position of the light source, and calculating the ratio of the second distance to the length to determine the end number of the light-emitting area to be lighted at present, namely, the end number N2 can be acquired through the following formula:
N2=(P4-P1)/L1
Wherein N2 represents the end number of the light emitting area to be lit at present, P4 represents the end position of the light emitting area to be lit at present, P1 represents the start position of the light source, and L1 represents the length.
When the start number N1 and the end number N2 of the light emitting region currently required to be lit are calculated according to the above formula, the calculation result may be an integer or a decimal. When the calculation result is decimal, the start number N1 and the end number N2 are rounded up. For example, when the start number N1 in the calculation result is 0.1, the start number N1 is 1, and when the end number N2 in the calculation result is 1.5, the end number N2 is 2.
Step S105, the lighting area is controlled to be on or off according to the start number and the end number.
Specifically, after the initial number and the final number of the light-emitting area to be lighted are obtained, the corresponding driving channels are controlled to power up according to the corresponding relation between the number of the pre-stored light-emitting area and the driving channels, so as to light the light-emitting area corresponding to the initial number and the final number, or light the light-emitting area between the initial number and the final number.
As shown in fig. 3, in one embodiment, controlling lighting or extinguishing of the light emitting region according to the start number and the end number includes:
Step S201, judging whether the view starting point position and the view end point position of the image acquisition module are both between the starting position and the end position of the light source;
step S202, if the view starting point position and the view end point position of the image acquisition module are both between the starting position and the end point position of the light source, acquiring a number difference value between the end point number and the starting number;
step S203, if the number difference is equal to 0, the luminous areas corresponding to the initial numbers are controlled to be on, and the rest luminous areas are all off;
step S204, if the number difference is equal to 1, the luminous areas corresponding to the initial number and the luminous areas corresponding to the end number are controlled to be on, and the rest luminous areas are turned off;
in step S205, if the number difference is greater than 1, the light emitting region corresponding to the start number, the light emitting region corresponding to the end number, and the light emitting region between the start number and the end number are all turned on, and the rest of the light emitting regions are all turned off.
Specifically, if the view start position and the view end position of the image acquisition module are both between the start position of the light source and the end position of the light source, that is, the start number N1 and the end number N2 satisfy: 0= < N1< = S and 0= < N2< = S, the light emitting region between the start number N1 and the end number N2 is lighted. And acquiring the position of the luminous area to be lightened by acquiring the difference value between the end number and the initial number. If the number difference between the end number and the initial number is 0, which indicates that the end number and the initial number both correspond to the same segment of light-emitting area, the corresponding light-emitting area can be controlled to light according to the initial number (or the end number). If the number difference between the end number and the initial number is 1, the luminous areas corresponding to the end number and the initial number are adjacent luminous areas, and the luminous areas corresponding to the initial number and the end number are controlled to be lighted respectively. If the number difference between the end number and the initial number is greater than 1, the interval between the light-emitting areas corresponding to the end number and the initial number is at least one light-emitting area, and the light-emitting areas corresponding to each number in the end number are controlled to be lightened. For example, when the end number is 5 and the start number is 2, the light emitting regions corresponding to control numbers 2, 3, 4, and 5 are all lighted.
Further, if neither the view start position nor the view end position of the image acquisition module is located between the start position of the light source and the end position of the light source, that is, the start number N1 and the end number N2 satisfy: n1> S or N2<0, that is, the start point and the end point of the field of view are located outside the start position of the light source or outside the end position of the light source, the light-emitting areas of the light source are controlled to be turned off.
If the view start position of the image acquisition module is not between the start position of the light source and the end position of the light source, and the view end position of the image acquisition module is between the start position of the light source and the end position of the light source, that is, the start number N1 and the end number N2 satisfy: and N1<0 and 0= < n2< = S, the light emitting areas between the numbers corresponding to the starting positions of the light sources and the ending point numbers are controlled to be on, and the rest light emitting areas are controlled to be off.
If the view start position of the image acquisition module is between the start position of the light source and the end position of the light source and the view end position of the image acquisition module is not between the start position of the light source and the end position of the light source, that is, the start number N1 and the end number N2 satisfy: and if 0= < N1< = S and N2> S, the light emitting areas between the start number and the number corresponding to the end position of the light source are controlled to be on, and the rest light emitting areas are all turned off.
According to the light source lighting method of the optical detection device, the scanning width of the image acquisition module along the scanning direction, the starting position of the light source and the length of the light emitting area along the scanning direction are acquired, the starting position or the end position of the visual field of the image acquisition module is acquired, the starting position or the end position of the light emitting area which needs to be lighted currently is determined according to the scanning width by taking the starting position or the end position of the visual field as a reference, the starting number and the end number of the light emitting area which needs to be lighted currently are determined according to the starting position and the end position of the light source and the starting position and the length of the light source, and the lighting or the extinction of the light emitting area is controlled according to the starting number and the end number, so that the sectional lighting of the light source is realized.
As shown in fig. 4, in one embodiment, the light source lighting method of the optical detection device further includes:
Step S106, judging whether the detection is completed, if the detection is completed, executing step S107, and if the detection is not completed, returning to step S102, and executing the acquisition of the view starting point position or the view end point position of the image acquisition module.
Step S107, the control light-emitting areas are all turned off.
In this embodiment, the optical inspection apparatus controls the image acquisition module to sequentially inspect each row of the workpiece to be inspected along the scanning direction, after the inspection of each row is performed, the optical inspection apparatus controls the axis on which the image acquisition module is located to move to the starting position of the next row, and after the inspection of the entire workpiece to be inspected is completed, the inspection is completed.
Specifically, after the detection of each column is performed, the execution progress of the detection configuration file is obtained, whether all detection operations of the workpieces to be detected are completed or not is judged according to the execution progress of the configuration file, if all detection operations are completed, a turn-off control signal is sent to all driving channels, and all luminous areas are controlled to be turned off; if all detection works are not completed, the optical detection device controls the axis where the image acquisition module is located to move to the starting position of the next row, and returns to execute the step S102 to determine the starting number and the end number of the light-emitting area which needs to be lightened currently, and controls the corresponding light-emitting area to be lightened according to the detection result.
In one embodiment, the color of the light emitting area is adjustable, and the method for lighting the light source of the optical detection device further comprises the following steps: acquiring the actual background color of a workpiece to be measured; and controlling the lighting of the luminous area according to the actual background color of the workpiece to be detected.
In this embodiment, the light emitting area includes an LED lamp emitting at least one color, and the LED lamp of the light emitting area is adjusted to emit detection light of a corresponding color according to the background color of the workpiece to be detected, which is beneficial to improving the detection effect and improving the detection accuracy.
As shown in fig. 5, optionally, the method for lighting the light source of the optical detection device further includes the following steps:
step S301: and acquiring the actual background color of the workpiece to be measured.
In this embodiment, the image data may be analyzed to obtain an actual background color of the workpiece to be measured currently, where the actual background color may be a color of a base plate of the workpiece to be measured.
Step S302: and establishing a standard database based on the background color of the workpiece and the detected light color corresponding to the optimal sampling effect.
The color of the detection light corresponding to the optimal sampling effect means that the background color of the workpiece has larger color difference from the welding defect, the processing defect or other defect areas of the workpiece under the irradiation of the detection light.
In this embodiment, the standard database may be a data list of workpiece background colors and detection light colors, in which each workpiece background color corresponds to a detection light color one by one, and the standard database may be stored in the control unit in advance.
Step S303: and matching the actual background color with a standard database, and determining the current matching light source color.
Step S304: and controlling the lighting of the light-emitting area according to the color of the matched light source.
And (3) according to the big data test, obtaining the corresponding relation between the background color of the workpiece and the detected light color corresponding to the optimal sampling effect, establishing a standard database based on the corresponding relation, comparing the actual background color of the workpiece to be tested with the background color of the workpiece in the standard database, matching the corresponding matched light source color, controlling the LED lamps in the light-emitting area opposite to the acquisition area of the current image acquisition module to be lightened, emitting the matched light source color, and controlling other LED lamps to be turned off.
It should be noted that, to ensure uniform illuminance of the test, each LED lamp may be configured to emit light of different colors separately, and typically, the light emitting region may be configured to emit three primary colors of red light, green light and blue light, and the three primary colors may be configured to emit different colors. Of course, the color of the detection light of the light emitting area may also be set to uniform visible white light, which is not limited in this embodiment.
As shown in fig. 6, a further embodiment of the present application provides a light source control apparatus of an optical detection device, where, as shown in fig. 1, the optical detection device includes a light source 110 and an image acquisition module 120. The light source 110 includes at least two light emitting regions 111, and the at least two light emitting regions 111 are sequentially arranged along a scanning direction. As shown in fig. 6, the light source control apparatus of the optical detection device includes a first acquisition unit 210, a second acquisition unit 220, and a control unit 230. The first acquiring unit 210 is configured to acquire a scan width of the image acquiring module 120 along the scan direction, a start position of the light source 110, and a length of the light emitting region 111 along the scan direction. The second acquisition unit 220 is configured to acquire a view start position or a view end position of the image acquisition module 120. The control unit 230 is configured to determine a start position and an end position of the light emitting area 111 to be lit at present according to the scan width based on the start position or the end position of the field, determine a start number and an end number of the light emitting area 111 to be lit at present according to the start position and the end position of the light emitting area 111 to be lit at present, the start position and the length of the light source 110, and control the light emitting area 111 to be lit or to be lit according to the start number and the end number.
In one embodiment, the control unit 230 is specifically configured to use the view start position as a reference, take the view start position as a start position of a light emitting area to be lit up currently, and add the scan width to the view start position to obtain an end position of the light emitting area to be lit up currently.
In one embodiment, the control unit 230 is specifically configured to subtract the scan width from the end position of the field of view to obtain the start position of the light emitting area to be lit at present based on the end position of the field of view; and taking the end position of the visual field as the end position of the luminous area which needs to be lightened currently.
In one embodiment, the control unit 230 is specifically configured to obtain a first distance between a starting position of a light-emitting area to be currently lit and a starting position of a light source, and calculate a ratio of the first distance to the length to determine a starting number of the light-emitting area to be currently lit; and obtaining a second distance between the end position of the light-emitting area to be lightened at present and the initial position of the light source, and calculating the ratio of the second distance to the length to determine the end number of the light-emitting area to be lightened at present.
In one embodiment, the control unit 230 is further configured to determine whether the start position and the end position of the field of view of the image acquisition module are both between the start position and the end position of the light source; if the view starting point position and the view end point position of the image acquisition module are both between the starting position of the light source and the end position of the light source, acquiring a number difference value between the end number and the starting number; if the number difference is equal to 0, the luminous areas corresponding to the initial numbers are controlled to be on, and the rest luminous areas are all off; if the number difference is equal to 1, the luminous areas corresponding to the initial number and the luminous areas corresponding to the end number are controlled to be lightened, and the rest luminous areas are extinguished; if the number difference is greater than 1, the luminous areas corresponding to the initial number, the luminous areas corresponding to the end number and the luminous areas between the initial number and the end number are all lighted, and the rest luminous areas are all extinguished.
In one embodiment, the control unit 230 is further configured to control the light emitting area of the light source to be turned off if neither the start position nor the end position of the field of view of the image acquisition module is located between the start position of the light source and the end position of the light source; if the view starting point position of the image acquisition module is not between the starting position of the light source and the end point position of the light source and the view end point position of the image acquisition module is between the starting position of the light source and the end point position of the light source, controlling the luminous areas between the numbers corresponding to the starting position of the light source and the end point numbers to be on, and extinguishing the rest luminous areas; if the view starting point position of the image acquisition module is positioned between the starting position of the light source and the end point position of the light source and the view end point position of the image acquisition module is not positioned between the starting position of the light source and the end point position of the light source, the luminous areas between the starting number and the number corresponding to the end point position of the light source are controlled to be on, and the rest luminous areas are all extinguished.
In one embodiment, the control unit 230 is further configured to determine whether the detection is completed; if the detection is finished, controlling the light-emitting areas to be extinguished; and if the detection is not finished, returning to execute the acquisition of the vision field starting point position or the vision field end point position of the image acquisition module so as to continue the detection.
As shown in fig. 7, in one embodiment, the light source may include N light emitting elements connected in series. It will be appreciated that the light source may also be composed of N light emitting elements (not shown in the figure) connected in parallel, and the zonal control of the respective light emitting elements is achieved by configuring the switching elements.
Specifically, the light source includes N light emitting elements 310, a first switching unit 320, N second switching units 330, and a controller (not shown in fig. 7). Each light emitting element 310 of the N light emitting elements 310 corresponds to form one light emitting region, and the N light emitting elements 310 are connected in series between both ends of the power supply 340, where N is an integer greater than 1. The first switching unit 320 is connected in series in a power supply loop formed by the N light emitting elements 310 and the power supply 340, and is used for controlling on/off of the power supply loop. The N second switching units 330 are in one-to-one correspondence with the N light emitting elements 310, and each of the N second switching units 330 is connected in parallel with the corresponding light emitting element 310 for controlling the on or off of the corresponding light emitting element. The controller is connected to the control unit (not shown in fig. 7), the first switching unit 320, and the N second switching units 330, respectively, and is configured to control the first switching unit 320 and the N second switching units 330 according to a control signal output from the control unit, so as to turn on or off a light emitting region formed by the light emitting element 310.
The light emitting element 310 may be light emitting diodes, where N light emitting diodes are connected in series to form a light source, and each light emitting diode forms a light emitting area correspondingly. The controller is connected with a control unit in the light source control device of the optical detection device, the control unit generates a control strategy of the light emitting element 310 according to the current scanning position of the image acquisition module and outputs a control signal to the controller, and the controller controls the corresponding light emitting element 310 to be on or off according to the control signal output by the control unit so as to enable the corresponding light emitting area to be on or off.
When the controller needs to control a certain light emitting element 310 to be turned on, the controller controls the first switch unit 320 to be turned on and controls the corresponding second switch unit 330 of the corresponding light emitting element 310 to be turned off, so that the light emitting element 310 is turned on. When the controller needs to control a certain light emitting element 310 to be turned off, the controller controls the first switch unit 320 to be turned on, and controls the corresponding second switch unit 330 of the corresponding light emitting element 310 to be turned on, so that the light emitting element 310 is shorted, and the light emitting element 310 is turned off. For example, when the light source control device of the optical detection apparatus determines that the light emitting area to be lit is the light emitting area with the number 0 and the number 1 according to the current scanning position of the image acquisition module, the controller controls the first switch unit 320 to be turned on, controls the second switch units 330 corresponding to the light emitting element No. 0 and the light emitting element No. 1 to be turned off, and controls the other second switch units 330 to be turned on, so that the light emitting element No. 0 and the light emitting element No. 1 are lit, and the other light emitting elements 310 are turned off.
In the light source in the above embodiment, the on-off of the power supply loop formed by connecting the N light emitting elements and the power supply in series is controlled by the first switch unit, each of the N second switch units is connected in parallel with the corresponding light emitting element to control the on or off of the corresponding light emitting element, and the first switch unit and the N second switch units are controlled by the controller according to the control signal to enable the light emitting area formed by the light emitting element to be on or off, so that the partition control of the light source is realized.
As shown in fig. 8, in one embodiment, the first switch unit 320 includes N first switches 321, the N first switches 321 are in one-to-one correspondence with the N light emitting elements 310, and the N first switches 321 are connected in parallel and then connected in series in a power supply loop formed by the N light emitting elements 310 and the power supply 340.
The second switching unit 330 includes N-1 second switches 331 and third switches 332, the N-1 second switches 331 are in one-to-one correspondence with the light emitting elements 310 other than the light emitting element 310 corresponding to the second switching unit 330, the third switches 332 are corresponding to the light emitting elements corresponding to the second switching unit 310, and the N-1 second switches 331 are connected in parallel and then connected in series with the third switches 332, and are connected in parallel with the light emitting elements 310 corresponding to the second switching unit 330 after being connected in series.
The first switch 321 is a normally open contact of the relay, the second switch 331 is a normally open contact of the relay, and the third switch 332 is a normally closed contact of the relay. The controller can be a PLC controller and is used for controlling the on-off of the relay coil so as to control the opening and closing of the normally open contact and the normally closed contact of the relay.
Specifically, taking the light source shown in fig. 8 as an example, if the light source includes 7 light emitting elements 310, the 7 light emitting elements 310 are respectively numbered, and the numbers sequentially increase from number 0 to number 7. Similarly, the first switch, the second switch, and the third switch are numbered respectively. The first switch 321, the second switch 331 and the third switch 332 with the same number are controlled by the same relay, wherein the first switch 321 and the second switch 331 are all normally open contacts of the relay, and the third switch 332 is a normally closed contact of the relay. When normally open contacts with the same number are closed, normally closed contacts with the corresponding numbers are opened; when the normally open contacts of the relays with the same numbers are opened, the corresponding normally closed contacts are closed.
The two ends of each light emitting element 310 are connected in parallel with a second switching unit 330. Each of the second switching units 330 includes a third switch 332 and 6 second switches 331,6 second switches 331 connected in parallel and then connected in series with the third switch 332. The numbers of the third switches 332 are in one-to-one correspondence with the numbers of the light emitting elements 310, for example, the number of the third switches connected in parallel to the two ends of the number 0 light emitting element 310 is 0, the number of the third switches connected in parallel to the two ends of the number 1 light emitting element 310 is 1, and so on. The 6 second switches connected in parallel to the two ends of each light emitting element 310 are the second switches except the second switch corresponding to the number of the light emitting element, for example, the numbers of the second switches 331 connected in parallel to the two ends of the number 0 light emitting element are the number 1, the number 2, the number 3, the number 4, the number 5 and the number 6, respectively; the numbers of the second switches 331 connected in parallel at the two ends of the light emitting element 1 are respectively No. 0, no. 2, no. 3, no. 4, no. 5 and No. 6, and so on.
When the first switches 321 from No. 0 to No. 6 are all turned off, the power supply circuit from the power supply 340 to the light emitting element 310 is turned off, and the whole light source is turned off. When the first switch 321 No. 0 is closed and the other first switches 321 are opened, correspondingly, the second switch 331 No. 0 at both ends of each light emitting element 310 is closed, the other second switches 331 are opened, and the third switch 332 No. 0 is opened, and the other third switches 332 are closed, so that the light emitting element 310 No. 0 can emit light, and the other light emitting elements 310 are all short-circuited. Similarly, when the first switch 321 No. 1 is closed and the other first switches 321 are opened, correspondingly, the second switch 331 No. 1 at both ends of each light emitting element 310 is closed, the other second switches 331 are opened, the third switch 332 No. 1 is opened, and the other third switches 332 are closed, so that the light emitting element 310 No. 1 can emit light, and the other light emitting elements 310 are all short-circuited.
The light source control means of the optical detection device may control the first switch 321, the second switch 331 and the third switch 332 by sending a control signal to the controller, so that the controller controls the first switch 321, the second switch 331 and the third switch 332 according to the control signal. For example, when the control signal sent by the light source control device of the optical detection apparatus is 0100000, the controller controls the first switch 321 No. 1 and the second switch 331 to be closed, and the other first switch 321 and the second switch 331 are both opened, and accordingly, the third switch 332 No. 1 is opened and the other third switches 332 are closed, and the light emitting element 310 No. 1 is turned on and the other light emitting elements 310 are turned off. When the control signal sent by the light source control device of the optical detection apparatus is 0100001, the controller controls the first switches 321 and 6 and the second switches 331 and 321 to be closed, and the other first switches 321 and 331 are opened, and accordingly, the third switches 332 and 332 are opened and the other third switches 332 are closed, the light emitting elements 310 and 6 are turned on and the other light emitting elements 310 are turned off.
According to the light source control device of the optical detection device, the first acquisition unit is used for acquiring the scanning width of the image acquisition module along the scanning direction, the starting position of the light source and the length of the light emitting area along the scanning direction, the second acquisition unit is used for acquiring the starting position or the end position of the visual field of the image acquisition module, the control unit is used for determining the starting position and the end position of the light emitting area which needs to be lightened currently according to the scanning width by taking the starting position or the end position of the visual field as a reference, the starting number and the end number of the light emitting area which needs to be lightened currently are determined according to the starting position and the end position of the light source and the length of the light source, and the light emitting area is controlled to be lightened or extinguished according to the starting number and the end number.
Further, as shown in fig. 9, still another embodiment of the present application provides an optical inspection apparatus including an image acquisition module 120, a motion stage 130, and a light source control device (not shown in fig. 9) of the foregoing optical inspection apparatus.
In this embodiment, the light source control device of the optical detection apparatus may receive the position parameter of the image acquisition module 120 in real time, and control the illumination area in the light source 110 to be lighted in segments according to the position parameter of the image acquisition module 120.
In this embodiment, the control unit of the light source control device of the optical detection apparatus may be integrally provided with the control module of the optical detection apparatus or may be separately provided, which is not limited in this application.
According to the optical detection device, the light source control device of the optical detection device is used for realizing the sectional lighting of the light source, and compared with the prior art that the whole strip-shaped light source is controlled to be fully lighted, the optical detection device of the embodiment can reduce the heating value of the light source in the detection process, solves the problem that the heating value of the light source affects the detection precision, is beneficial to improving the stability of optical detection and improves the detection precision.
It should be noted that the logic and/or steps represented in the flowcharts or otherwise described herein, for example, may be considered as a ordered listing of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
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 invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly, through intermediaries, or both, may be in communication with each other or in interaction with each other, unless expressly defined otherwise. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.
Claims (13)
1. A light source lighting method of an optical detection apparatus, wherein the optical detection apparatus includes a light source and an image acquisition module, the light source includes at least two light emitting areas, the at least two light emitting areas are sequentially arranged along a scanning direction, the method comprising the steps of:
acquiring the scanning width of the image acquisition module along the scanning direction, the starting position of the light source and the length of the light-emitting area along the scanning direction;
acquiring a vision field starting point position or a vision field end point position of the image acquisition module;
determining the starting position and the end position of a light-emitting area which needs to be lightened currently according to the scanning width by taking the starting position or the end position of the visual field as a reference;
determining the starting number and the end number of the light-emitting area to be lightened currently according to the starting position and the end position of the light-emitting area to be lightened currently, the starting position of the light source and the length;
and controlling the lighting areas to be on or off according to the starting number and the ending number, wherein when the image acquisition module is positioned at a first position, the corresponding lighting areas under the first position are on, and the lighting areas at the other positions are off.
2. The method for lighting a light source of an optical detection apparatus according to claim 1, wherein determining a start position and an end position of a light emitting area to be currently lit according to the scanning width with reference to the view start position, comprises:
taking the starting point position of the visual field as the starting position of a light-emitting area which needs to be lightened currently;
and adding the scanning width on the basis of the starting point position of the visual field to obtain the end point position of the luminous area which is required to be lightened currently.
3. The method for lighting a light source of an optical detection apparatus according to claim 1, wherein determining a start position and an end position of a light emitting area to be currently lit based on the scan width with reference to the field end position, comprises:
subtracting the scanning width on the basis of the vision field end point position to obtain the initial position of the luminous area which needs to be lightened currently;
and taking the end point position of the visual field as the end point position of the luminous area which needs to be lightened currently.
4. The method for lighting a light source of an optical inspection apparatus according to claim 1, wherein determining the start number and the end number of the light emitting area to be currently lit according to the start position and the end position of the light emitting area to be currently lit, the start position of the light source, and the length comprises:
Acquiring a first distance between the starting position of the light-emitting area to be lightened currently and the starting position of the light source, and calculating the ratio of the first distance to the length to determine the starting number of the light-emitting area to be lightened currently;
and obtaining a second distance between the end position of the light-emitting area to be lightened at present and the starting position of the light source, and calculating the ratio of the second distance to the length to determine the end number of the light-emitting area to be lightened at present.
5. The method of lighting a light source of an optical detection apparatus according to any one of claims 1 to 4, wherein the controlling the lighting area to be lit or turned off according to the start number and the end number comprises:
judging whether the vision starting point position and the vision end point position of the image acquisition module are both between the starting position of the light source and the end point position of the light source;
if the view starting point position and the view ending point position of the image acquisition module are both between the starting position of the light source and the ending position of the light source, acquiring a number difference value between the ending number and the starting number;
If the number difference value is equal to 0, controlling the luminous areas corresponding to the initial number to be on, and extinguishing the rest luminous areas;
if the number difference is equal to 1, controlling the luminous areas corresponding to the initial number and the luminous areas corresponding to the end number to be on, and extinguishing the rest luminous areas;
and if the number difference is greater than 1, controlling the luminous areas corresponding to the initial number, the luminous areas corresponding to the end number and the luminous areas between the initial number and the end number to be on, and extinguishing the rest luminous areas.
6. The method of lighting a light source of an optical detection apparatus according to claim 5, wherein the controlling the lighting area to be lighted or to be lighted out according to the start number and the end number further comprises:
if the starting point position and the ending point position of the visual field of the image acquisition module are not located between the starting position and the ending position of the light source, controlling the light-emitting areas of the light source to be turned off;
if the starting point position of the visual field of the image acquisition module is not between the starting point position of the light source and the ending point position of the visual field of the image acquisition module is between the starting point position of the light source and the ending point position of the light source, controlling the luminous areas from the numbers corresponding to the starting point position of the light source to the ending point numbers to be on, and extinguishing the rest luminous areas;
And if the starting point position of the visual field of the image acquisition module is positioned between the starting position of the light source and the end point position of the visual field of the image acquisition module is not positioned between the starting position of the light source and the end point position of the light source, controlling the luminous areas between the starting number and the number corresponding to the end point position of the light source to be on, and extinguishing the rest luminous areas.
7. The method of lighting a light source of an optical detection apparatus according to claim 1, further comprising:
judging whether detection is finished;
if the detection is finished, controlling the light-emitting areas to be extinguished;
and if the detection is not finished, returning to the step of acquiring the position of the starting point or the end point of the visual field of the image acquisition module.
8. A light source control device of an optical detection apparatus, the optical detection apparatus comprising a light source and an image acquisition module, the light source comprising at least two light emitting areas, the at least two light emitting areas being arranged in sequence along a scanning direction, the device comprising:
a first acquisition unit configured to acquire a scanning width of the image acquisition module in a scanning direction, a start position of the light source, and a length of the light emitting region in the scanning direction;
A second acquisition unit configured to acquire a view field start point position or a view field end point position of the image acquisition module;
and the control unit is used for determining the starting position and the end position of the light-emitting area which is required to be lightened currently according to the scanning width by taking the starting position or the end position of the visual field as a reference, determining the starting number and the end number of the light-emitting area which is required to be lightened currently according to the starting position and the end position of the light source, the starting position and the length of the light source, and controlling the light-emitting area to be lightened or extinguished according to the starting number and the end number.
9. The light source control device of the optical detection apparatus according to claim 8, wherein the light source comprises:
n light-emitting elements, each of which corresponds to one of the light-emitting areas, connected in series between two ends of a power supply, wherein N is an integer greater than 1;
The first switch unit is connected in series in a power supply loop formed by the N light-emitting elements and the power supply, and is used for controlling the on-off of the power supply loop;
the N second switch units are in one-to-one correspondence with the N light-emitting elements, and each second switch unit in the N second switch units is connected with the corresponding light-emitting element in parallel and used for controlling the on or off of the corresponding light-emitting element;
and the controller is respectively connected with the control unit, the first switch unit and the N second switch units and is used for controlling the first switch unit and the N second switch units according to control signals output by the control unit so as to enable the luminous areas formed by the luminous elements to be on or off.
10. The light source control device of the optical detection apparatus according to claim 9, wherein the first switch unit includes N first switches, the N first switches are in one-to-one correspondence with the N light emitting elements, and the N first switches are connected in parallel and then connected in series in a power supply loop formed by the N light emitting elements and the power supply source.
11. The light source control device of an optical detection apparatus according to claim 10, wherein the second switching unit includes N-1 second switches and a third switch, the N-1 second switches are in one-to-one correspondence with light emitting elements other than the light emitting element corresponding to the second switching unit, the third switch is corresponding to the light emitting element corresponding to the second switching unit, and the N-1 second switches are connected in parallel and then connected in series with the third switch, and are connected in parallel with the light emitting element corresponding to the second switching unit after being connected in series.
12. The light source control device of an optical detection apparatus according to claim 11, wherein the first switch is a normally open contact of a relay, the second switch is a normally open contact of a relay, and the third switch is a normally closed contact of a relay.
13. An optical inspection apparatus, comprising: an image acquisition module, a motion platform and a light source control device of an optical detection apparatus as claimed in any one of claims 8-12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110137076.9A CN112858169B (en) | 2021-02-01 | 2021-02-01 | Light source detection equipment, light source lighting method thereof and light source control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110137076.9A CN112858169B (en) | 2021-02-01 | 2021-02-01 | Light source detection equipment, light source lighting method thereof and light source control device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112858169A CN112858169A (en) | 2021-05-28 |
CN112858169B true CN112858169B (en) | 2024-03-05 |
Family
ID=75987417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110137076.9A Active CN112858169B (en) | 2021-02-01 | 2021-02-01 | Light source detection equipment, light source lighting method thereof and light source control device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112858169B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113962310A (en) * | 2021-10-27 | 2022-01-21 | 漳州爱果冻信息科技有限公司 | Method and system for protecting eyesight of learning environment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102870121A (en) * | 2010-03-11 | 2013-01-09 | 得利捷Ip科技有限公司 | Image capturing device |
CN206387742U (en) * | 2017-01-16 | 2017-08-08 | 东莞理工学院 | A kind of AOI detection means of use CCD images positioning |
CN108256416A (en) * | 2017-11-30 | 2018-07-06 | 北京集创北方科技股份有限公司 | Biological characteristic detection method and system |
CN108449525A (en) * | 2018-03-26 | 2018-08-24 | 京东方科技集团股份有限公司 | The acquisition methods and automatic optical checking equipment of automatic visual inspection Plays image |
CN110248056A (en) * | 2018-03-08 | 2019-09-17 | 欧姆龙株式会社 | Image testing device |
CN111337433A (en) * | 2020-05-21 | 2020-06-26 | 深圳新视智科技术有限公司 | Defect layering device and method for surface defect detection |
CN112147154A (en) * | 2020-10-28 | 2020-12-29 | 江苏善果缘智能科技有限公司 | Co-frequency confocal LED illumination light source construction method for product surface three-dimensional defect detection |
CN112147153A (en) * | 2020-10-28 | 2020-12-29 | 江苏善果缘智能科技有限公司 | LED illumination light source construction method for product surface defect detection |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6633338B1 (en) * | 1999-04-27 | 2003-10-14 | Gsi Lumonics, Inc. | Programmable illuminator for vision system |
KR101628238B1 (en) * | 2009-12-21 | 2016-06-21 | 삼성전자주식회사 | Method and apparatus for image scanning |
-
2021
- 2021-02-01 CN CN202110137076.9A patent/CN112858169B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102870121A (en) * | 2010-03-11 | 2013-01-09 | 得利捷Ip科技有限公司 | Image capturing device |
CN206387742U (en) * | 2017-01-16 | 2017-08-08 | 东莞理工学院 | A kind of AOI detection means of use CCD images positioning |
CN108256416A (en) * | 2017-11-30 | 2018-07-06 | 北京集创北方科技股份有限公司 | Biological characteristic detection method and system |
CN110248056A (en) * | 2018-03-08 | 2019-09-17 | 欧姆龙株式会社 | Image testing device |
CN108449525A (en) * | 2018-03-26 | 2018-08-24 | 京东方科技集团股份有限公司 | The acquisition methods and automatic optical checking equipment of automatic visual inspection Plays image |
CN111337433A (en) * | 2020-05-21 | 2020-06-26 | 深圳新视智科技术有限公司 | Defect layering device and method for surface defect detection |
CN112147154A (en) * | 2020-10-28 | 2020-12-29 | 江苏善果缘智能科技有限公司 | Co-frequency confocal LED illumination light source construction method for product surface three-dimensional defect detection |
CN112147153A (en) * | 2020-10-28 | 2020-12-29 | 江苏善果缘智能科技有限公司 | LED illumination light source construction method for product surface defect detection |
Also Published As
Publication number | Publication date |
---|---|
CN112858169A (en) | 2021-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10342459B2 (en) | Endoscope apparatus and measuring method | |
US7518632B2 (en) | Endoscope device | |
JP6259422B2 (en) | Multimode imaging | |
CN201273855Y (en) | Test device for LED vehicle lamp | |
CN112858169B (en) | Light source detection equipment, light source lighting method thereof and light source control device | |
WO2010137436A1 (en) | Illuminating device | |
JP4278867B2 (en) | Method for measuring the optical quality of a translucent material and detecting defects therein | |
KR20100008840A (en) | Testing method by using brightness variation of organic light-emitting diode display | |
JP4608089B2 (en) | Open loop light intensity calibration method and apparatus | |
US20220365514A1 (en) | System and method for visual state identification of automation systems | |
JPH1038539A (en) | Wafer shape recognizing device | |
TWI390771B (en) | Test equipment for light emitting diode lights | |
CN112304959B (en) | Light source control device and method for detection equipment and detection equipment | |
CN104797052A (en) | Annular high-brightness LED light source for machine vision systems | |
JP2011003479A (en) | Illuminating lamp and illuminating device | |
CN211877808U (en) | Surface detection device | |
CN210037563U (en) | Novel low-noise automatic acquisition system for automobile surface images | |
KR101049097B1 (en) | Light source characteristic inspection system and inspection method using the same | |
CN215297180U (en) | Optical detection system | |
CN114323579B (en) | Automatic detection method for different colors of transparent light guide piece | |
JP2008089416A (en) | Lighting system for inspection, and imaging element inspection apparatus | |
JPS643425B2 (en) | ||
JP4431830B2 (en) | Light control device | |
JPH10307005A (en) | Length measuring apparatus | |
JP2002320070A (en) | Image reader and its fault detection method |
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 |