CN114813786A - Image acquisition method, controller and automatic optical detection equipment - Google Patents

Image acquisition method, controller and automatic optical detection equipment Download PDF

Info

Publication number
CN114813786A
CN114813786A CN202210441616.7A CN202210441616A CN114813786A CN 114813786 A CN114813786 A CN 114813786A CN 202210441616 A CN202210441616 A CN 202210441616A CN 114813786 A CN114813786 A CN 114813786A
Authority
CN
China
Prior art keywords
brightness value
light source
preset
image
camera
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.)
Pending
Application number
CN202210441616.7A
Other languages
Chinese (zh)
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.)
Chengdu Shuzhilian Technology Co Ltd
Original Assignee
Chengdu Shuzhilian 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 Chengdu Shuzhilian Technology Co Ltd filed Critical Chengdu Shuzhilian Technology Co Ltd
Priority to CN202210441616.7A priority Critical patent/CN114813786A/en
Publication of CN114813786A publication Critical patent/CN114813786A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8806Specially adapted optical and illumination features
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B15/00Special procedures for taking photographs; Apparatus therefor
    • G03B15/02Illuminating scene
    • G03B15/03Combinations of cameras with lighting apparatus; Flash units
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8806Specially adapted optical and illumination features
    • G01N2021/8835Adjustable illumination, e.g. software adjustable screen
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • G01N2021/95638Inspecting patterns on the surface of objects for PCB's

Landscapes

  • Physics & Mathematics (AREA)
  • General 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)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The embodiment of the invention provides an image acquisition method, a controller and automatic optical detection equipment, and relates to the field of image acquisition. Firstly, receiving a trigger signal sent by a camera; then, based on the trigger signal, adjusting the brightness value according to a preset mode, wherein the brightness value is adjusted by all light sources connected with the output channels; and controlling the camera to collect the image of the object to be detected every time the brightness value adjustment is completed, so that characters on welding spots and components can be clearly imaged, further the detection of all defect types is realized, and the comprehensiveness and accuracy of the detection result are improved.

Description

Image acquisition method, controller and automatic optical detection equipment
Technical Field
The invention relates to the field of image acquisition, in particular to an image acquisition method, a controller and automatic optical detection equipment.
Background
Automatic Optical Inspection (AOI) is generally used to detect defects such as solder missing, solder excess (pin missing, insufficient solder), solder deficiency (pin hole, copper exposure), and faulty component on a Printed Circuit Board (PCB). The defects of solder missing, much tin, little tin and the like are mainly discovered by detecting the gradient, the saturation and the like of a welding spot by using an AOI light source. Wrong components, namely components (such as capacitors, resistors, diodes, triodes, packaged chips and the like) are pasted wrongly, reversely and the like, and are mainly detected by identifying characters on the components.
Because the imaging of the AOI light source is mainly concentrated on the welding spot, only part of characters on the components can be imaged, and the detection of all defect types cannot be realized simultaneously. Meanwhile, the contrast between the characters and the background is not high, and the accuracy of the detection result is also seriously influenced.
Disclosure of Invention
The embodiment of the invention provides an image acquisition method, a controller and automatic optical detection equipment, which can overcome the defects of the prior art and improve the comprehensiveness and accuracy of detection results.
Embodiments of the invention may be implemented as follows:
in a first aspect, the present invention provides an image capturing method applied to a controller in an automatic optical inspection apparatus, where the controller is provided with a plurality of output channels, each of the output channels is connected to a light source, the controller adjusts a brightness value of the light source connected to each of the output channels through each of the output channels, the automatic optical inspection apparatus further includes a camera, and the controller is electrically connected to the camera, and the method includes:
receiving a trigger signal sent by the camera;
based on the trigger signal, carrying out brightness value adjustment according to a preset mode, wherein the brightness value adjustment objects are all light sources connected with the output channels;
and controlling the camera to acquire the image of the object to be detected every time the brightness value adjustment is completed.
In an alternative embodiment, the light source includes a white light source and a non-white light source, the preset mode includes a first preset mode, and the adjusting the brightness value according to the preset mode includes:
adjusting the brightness value of the white light source to a maximum brightness value;
adjusting the brightness value of the non-white light source to a minimum brightness value.
The embodiment has the advantages that an imaging environment formed by the white light source is provided, and characters on the surface of the component can be clearly imaged.
In an optional embodiment, the light source includes a white light source and a non-white light source, the preset mode includes a second preset mode, and the adjusting the brightness value according to the preset mode includes:
adjusting the brightness value of the white light source to a minimum brightness value;
and adjusting the brightness value of the non-white light source to be a preset brightness value.
The embodiment has the advantages that an imaging environment formed by the AOI light source is provided, so that the welding spots on the PCB can be clearly imaged.
In an optional embodiment, the preset modes include a third preset mode, and the step of adjusting the brightness value according to the preset modes includes:
determining an adjusting period according to the preset times and the preset acquisition time of the camera;
and adjusting the brightness value of the light source connected with each output channel for the preset times according to the adjusting period.
In an optional embodiment, the light sources have multiple colors, each color of the light source corresponds to a preset sequence, each preset sequence includes a preset number of preset brightness values, and the step of adjusting the brightness value of the light source connected to each output channel by the preset number according to the adjustment period includes:
aiming at a target output channel in the plurality of output channels, determining a target preset sequence from the plurality of preset sequences according to the color of a light source connected with the target output channel;
and gradually adjusting the brightness value of the light source connected with the target output channel to each preset brightness value in the target preset sequence according to the adjusting period.
The beneficial effect of the above embodiment is that the camera only needs to send the trigger signal once, and can acquire the image of the PCB under various imaging environments.
In an optional implementation manner, a component is attached to the object to be detected, a character is printed on the surface of the component, the preset mode includes a first preset mode, and the method further includes:
controlling the camera to acquire an image of the character according to the first preset mode;
if the character in the image of the character is not a preset character, judging that the component has a chip mounting error;
and if the character in the image of the character is a preset character and the position of the character in the image of the character is inconsistent with the preset position, judging that the component has a chip mounting error.
The beneficial effects of the embodiment are that, according to the characters on the surface of the component in the image collected based on the first preset mode, whether the component is subjected to the surface mounting error or not can be accurately judged.
In an optional embodiment, the object to be detected includes a welding spot, the preset mode includes a second preset mode, and the method further includes:
controlling the camera to acquire images of the welding spots according to the second preset mode;
analyzing the gradient and the saturation of the welding spot according to the image of the welding spot;
and judging whether the welding spot has welding errors or not according to the gradient and the saturation of the welding spot.
The embodiment has the beneficial effects that whether the welding spot is in welding error can be accurately judged according to the gradient and the saturation of the welding spot in the image collected according to the second preset mode.
In an optional embodiment, the light source includes a white light source and a non-white light source, the object to be detected is attached with a component and includes a solder joint, the preset mode includes a third preset mode, and the method further includes:
controlling a camera to acquire a first image and a second image of the object to be detected according to the third preset mode; wherein the first image is acquired by the camera when a brightness value of the white light source is a maximum brightness value and a brightness value of the non-white light source is a minimum brightness value, and the second image is acquired by the camera when the brightness value of the white light source is the minimum brightness value and the brightness value of the non-white light source is a preset brightness value;
judging whether the component is subjected to a component mounting error according to the first image;
and judging whether the welding spot has welding errors or not according to the second image.
The method has the advantages that whether the component is attached wrongly or not can be judged according to the first image collected according to the third preset mode, and whether the welding spot is wrongly welded or not can be judged according to the second image collected according to the third preset mode.
In a second aspect, the present invention provides a controller comprising: a memory for machine executable instructions; the machine executable instructions when invoked perform a method as in any preceding embodiment.
In a third aspect, the present invention provides an automatic optical inspection apparatus comprising a controller and a camera as described in the previous embodiments.
Compared with the prior art, the image acquisition method, the controller and the automatic optical detection equipment provided by the embodiment of the invention firstly receive the trigger signal sent by the camera; then, based on the trigger signal, adjusting the brightness value according to a preset mode, wherein the brightness value is adjusted by all light sources connected with the output channels; and controlling the camera to acquire the image of the object to be detected every time the brightness value adjustment is completed. In the embodiment of the invention, the controller adjusts the brightness values of the light sources connected with all the output channels at least once based on the trigger signal sent by the camera, and controls the camera to acquire the image of the object to be detected every time the brightness value adjustment is completed, so that characters on welding spots and components can be clearly imaged, the detection of all defect types is realized, and the comprehensiveness and the accuracy of the detection result are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is an example of an image collected under an AOI light source according to an embodiment of the present invention;
FIG. 2 is an example of an image captured under a white light source according to an embodiment of the present invention;
FIG. 3 is a schematic block diagram of an automatic optical inspection apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a connection between the controller and the camera according to the embodiment of the invention;
fig. 5 is a schematic flow chart of an image acquisition method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of an image acquisition process according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating an implementation manner of step S102 according to an embodiment of the present invention;
fig. 8 is another schematic flow chart of an implementation manner of step S102 according to an embodiment of the present invention;
fig. 9 is a schematic flowchart of another implementation manner of step S102 according to an embodiment of the present invention;
fig. 10 is another schematic flowchart of an image capturing method according to an embodiment of the present invention;
fig. 11 is a schematic flowchart of another image acquisition method according to an embodiment of the present invention;
fig. 12 is a schematic flowchart of another image capturing method according to an embodiment of the present invention.
Icon: 100-automatic optical inspection equipment; 110-a controller; 120-a camera;
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
Generally, the imaging of the AOI light source (obtained by mixing a red light source, a green light source and a blue light source) is mainly focused on the welding spot, only part of characters on the device can be imaged (as shown in fig. 1), but the contrast of the characters in the image and the background is not high, while the imaging characteristics of the white light source are mainly focused on a plane, the characters on the device can be clearly imaged (as shown in fig. 2), and the contrast of the characters in the image and the background is high, so that the characters are easy to recognize. In order to improve the comprehensiveness and accuracy of the PCB defect detection result, two image acquisition processes are usually performed on the same PCB to be detected under different imaging light sources, and the efficiency is low.
In order to overcome the defects of the prior art, improve the comprehensiveness and accuracy of the detection result of the defects of the PCB board, and ensure the detection efficiency, the embodiment of the invention provides an image acquisition method, a controller and an automatic optical detection device, which will be described in detail below.
Referring to fig. 3, fig. 3 is a schematic block diagram illustrating a structure of an automatic optical inspection apparatus 100 according to an embodiment of the present invention, where the automatic optical inspection apparatus 100 includes a controller 110 and a camera 120. The controller 110 is electrically connected to the camera 120.
The controller 110 may be provided with a plurality of output channels, each connected to one light source. The controller 110 adjusts the brightness value of the light source connected to each output channel through each output channel to provide a suitable imaging environment for the camera 120.
The controller 110 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the image capturing method described below may be performed by integrated logic circuits of hardware or instructions in the form of software in the controller 110. The controller 110 may be a Central Processing Unit (CPU), a Network Processor (NP), or the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The camera 120 may be a single channel camera. The interface pins of the camera 120 may include a camera power supply positive, a camera power supply negative, an optical coupling isolation input, an optical coupling isolation output, an optical coupling isolation signal ground, etc., wherein the optical coupling isolation output is electrically connected with a common terminal of the controller 110 (as shown in fig. 4).
Referring to fig. 5, fig. 5 is a flowchart illustrating an image capturing method according to an embodiment of the present invention, where the image capturing method includes steps S101 to S103.
And S101, receiving a trigger signal sent by the camera.
When the PCB image is acquired, the PCB may be divided into a plurality of sub-regions according to the viewing area of the camera 120, and the camera 120 sequentially moves to each sub-region for imaging (as shown in fig. 6). Each time the camera 120 moves to a sub-region, it sends a trigger signal to the controller 110 to inform the controller 110 that it will image the sub-region.
And S102, adjusting the brightness value according to a preset mode based on the trigger signal.
Wherein, the object of brightness value adjustment is the light source connected with all output channels. The preset mode comprises the number of times of brightness value adjustment and the target brightness value of the light source connected with each output channel during each adjustment. The preset modes are multiple, the number of times of brightness value adjustment of each preset mode is different, and the target brightness value of the light source connected with each output channel is different during each adjustment. The controller 110 switches the preset mode before receiving the trigger signal each time, and directly adjusts the brightness values of the light sources connected to all the output channels at least once according to the preset mode that is currently set when receiving the trigger signal sent by the camera 120.
And S103, controlling the camera to collect the image of the object to be detected every time the brightness value adjustment is completed.
The object to be detected refers to a welding spot and/or a component (capacitor, resistor, diode, triode, packaged chip and the like) in each PCB sub-area. After adjusting the brightness values of the light sources connected to all the output channels once, the controller 110 sends an instruction to the camera 120 to instruct the camera 120 to perform at least one image capturing operation in the current imaging environment.
The method provided by the embodiment of the invention has the advantages that the controller adjusts the brightness values of the light sources connected with all the output channels at least once based on the trigger signals sent by the camera, and controls the camera to acquire the image of the object to be detected every time the brightness value adjustment is completed, so that characters on welding spots and components can be clearly imaged, further the detection of all defect types is realized, and the comprehensiveness and the accuracy of the detection result are improved.
Step S102 will be described in detail below.
The preset mode on the controller 110 is various and can be switched. When the preset mode on the controller 110 is set to the first preset mode, it means that only clear images of the characters on the surface of the component on each sub-area of the PCB are required to be obtained, and the characters on the surface of the component can be clearly imaged under the imaging environment formed by the white light source. In this regard, an embodiment of the present invention provides an implementation manner of step S102.
Referring to fig. 7, fig. 7 is a flowchart illustrating an implementation manner of step S102 according to an embodiment of the present invention, where step S102 includes sub-steps S102-1 and S102-2.
S102-1, adjusting the brightness value of the white light source to be the maximum brightness value.
The light source comprises a white light source and a non-white light source, and the brightness value range of the light source can be set to be 0-255, wherein 0 is the minimum brightness value, and 255 is the maximum brightness value. The number of times of adjusting the brightness value of the first preset mode is one, that is, only the brightness value of the light source connected to all the output channels needs to be adjusted once. Since characters on components are required to be clearly imaged under an imaging environment formed by white light sources, the brightness values of all the white light sources are adjusted to be 255 at the maximum brightness value by connecting all the white light sources with output channels.
S102-2, adjusting the brightness value of the non-white light source to be the minimum brightness value.
The brightness values of all the white light sources are adjusted to be 255 at the maximum brightness value, meanwhile, the output channels are connected through all the non-white light sources, the brightness values of all the non-white light sources are adjusted to be 0 at the minimum brightness value, and the imaging environment at the moment meets the image acquisition requirements of characters on components.
When the preset mode on the controller 110 is set to the second preset mode, it means that only a clear image of the solder joint on each sub-area of the PCB board needs to be acquired, and the solder joint can be clearly imaged under the imaging environment formed by the AOI light source. In this regard, the embodiment of the present invention provides another implementation manner of step S102.
Referring to fig. 8, fig. 8 is another flow chart illustrating an implementation manner of step S102 according to an embodiment of the present invention, where step S102 includes sub-steps S102-3 and S102-4.
And S102-3, adjusting the brightness value of the white light source to be the minimum brightness value.
The brightness value adjustment times of the second preset mode are once, that is, only the brightness values of the light sources connected to all the output channels need to be adjusted once. Since the welding spots are required to be clearly imaged under the imaging environment formed by the AOI light source, the brightness values of all the white light sources are adjusted to the minimum brightness value of 0 by connecting all the white light sources to the output channel.
And S102-4, adjusting the brightness value of the non-white light source to be a preset brightness value.
The AOI light source is obtained by mixing a plurality of non-white light sources (including a red light source, a green light source, a blue light source and the like), and the preset brightness value of each non-white light source is different. For any one output channel, the brightness value of the light source connected to the output channel is adjusted to a preset brightness value according to the color characteristics of the non-white light source connected to the output channel, for example, the brightness value of all the red light sources is adjusted to 50 through the output channel connected to the red light source, the brightness value of all the green light sources is adjusted to 100 through the output channel connected to the green light source, and the brightness value of all the blue light sources is adjusted to 200 through the output channel connected to the blue light source.
When the preset mode on the controller 110 is set to the third preset mode, it means that not only a sharp image of the solder joint on each sub-area of the PCB but also a sharp image of the characters on the surface of the component on each sub-area of the PCB need to be acquired. In this regard, the embodiment of the present invention provides another implementation manner of step S102.
Referring to fig. 9, fig. 9 is a schematic flow chart illustrating an implementation manner of step S102 according to an embodiment of the present invention, where step S102 includes sub-steps S102-5 and S102-6.
And S102-5, determining an adjusting period according to the preset times and the preset acquisition time of the camera.
The preset acquisition time refers to the residence time of the camera at each sub-area on the PCB. The brightness value of the third preset mode is adjusted for a plurality of times, the adjustment period is a time difference between every two adjustment operations, division operation can be performed on the preset acquisition time and the preset times, and the operation result is used as the adjustment period.
And S102-6, adjusting the brightness value of the light source connected with each output channel for preset times according to the adjusting period.
And in each preset period, the brightness values of the light sources connected with all the output channels are regulated once.
The sub-step S102-6 is implemented as follows:
first, for a target output channel of the plurality of output channels, a target preset sequence is determined from the plurality of preset sequences according to a color of a light source connected to the target output channel.
Then, the brightness value of the light source connected to the target output channel is adjusted to each preset brightness value in the target preset sequence one by one according to the adjustment period.
The light source has various colors, such as a white light source, a red light source, and a green light source. The light sources of each color correspond to a preset sequence, and each preset sequence comprises preset brightness values of preset times. For example, the predetermined number of times is 3, the predetermined sequence corresponding to the red light source is {50, 0, 100}, the predetermined sequence corresponding to the white light source is {0, 255, 0}, and the predetermined sequence corresponding to the blue light source is {200, 0, 50 }.
The target output channel is any one of the plurality of output channels, and the preset sequence corresponding to the color of the light source is taken as the target preset sequence based on the color of the light source connected to the target output channel, for example, the preset sequence corresponding to the red light source is {50, 0, 100}, and the preset sequence corresponding to the red light source is {50, 0, 100}, if the light source connected to the target output channel is red.
After the above operation is performed on each output channel, the brightness value of the light source connected to each output channel is adjusted to each preset brightness value in the target preset sequence according to the adjustment period.
For example, the preset sequence corresponding to the red light source is {50, 0, 100}, the preset sequence corresponding to the white light source is {0, 255, 0}, the preset sequence corresponding to the blue light source is {200, 0, 50}, the light source connected to the output channel 1 is red, the target preset sequence of the output channel 1 is {50, 0, 100}, the light source connected to the output channel 2 is blue, the target preset sequence of the output channel 2 is {200, 0, 50}, the light source connected to the output channel 3 is white, and the target preset sequence of the output channel 3 is {0, 255, 0 }; the brightness value adjusting process of the light source connected with the output channel 1, the output channel 2 and the output channel 3 is as follows: in the first adjusting period, the brightness value of the light source connected with the output channel 1 is adjusted to 50, the brightness value of the light source connected with the output channel 2 is adjusted to 200, and the brightness value of the light source connected with the output channel 3 is adjusted to 0; in the second adjustment period, the brightness value of the light source connected with the output channel 1 is adjusted to 0, the brightness value of the light source connected with the output channel 2 is adjusted to 0, and the brightness value of the light source connected with the output channel 3 is adjusted to 255; in the third adjustment period, the luminance value of the light source connected to the output channel 1 is adjusted to 100, the luminance value of the light source connected to the output channel 2 is adjusted to 50, and the luminance value of the light source connected to the output channel 3 is adjusted to 0.
When the controller 110 adjusts the brightness values of the light sources connected to all the output channels according to the first preset mode, an imaging environment formed by the white light sources is provided, clear images of characters on the surfaces of the components on each sub-area of the PCB can be collected, and whether the components on the PCB are subjected to mispasting, reverse pasting and other pasting errors can be detected according to the obtained images. With reference to fig. 10, fig. 10 is a schematic flow chart of an image capturing method according to an embodiment of the present invention, and the image capturing method further includes steps S104 to S106.
And S104, controlling the camera to acquire the image of the character according to the first preset mode.
The controller 110 adjusts the brightness value of the white light source to the maximum brightness value through the output channel connected to the white light source according to a preset first preset mode, adjusts the brightness value of the non-white light source to the minimum brightness value through the output channel connected to the non-white light source, and controls the camera 120 to acquire an image containing clear characters on the surface of the component in the imaging environment.
And S105, if the character in the character image is not the preset character, judging that the component has a chip mounting error.
The mounting error includes "mounting error", for example, a diode is mounted at a position on the PCB where the transistor is to be mounted. The preset characters refer to characters on the surface of a component to be attached to the PCB. When the characters on the surfaces of the components in the collected images are not preset characters, the fact that the components on the current PCB are wrongly pasted can be determined.
S106, if the character in the image of the character is a preset character and the position of the character in the image of the character is inconsistent with the preset position, judging that the component has a chip mounting error.
The pasting error also includes "pasting reversely", for example, a resistor pasted on the PCB board, the positive pole of which should be on the left, the negative pole of which should be on the right, but pasted with the positive pole on the right, and the negative pole of which is on the left. The preset position refers to the orientation of characters on the surface of the component under the condition that the component is not pasted reversely. When the position of the character on the surface of the component in the acquired image does not meet the preset position, the component can be determined to be reversely pasted.
When the controller 110 adjusts the brightness values of the light sources connected to all the output channels according to the second preset mode, an imaging environment formed by the AOI light sources is provided, a clear image of a welding spot on each sub-area of the PCB can be collected, and whether the welding spot on the PCB has solder missing, more tin (pin missing, insufficient solder) and less tin (pin hole, copper exposure) can be detected according to the obtained image. With reference to fig. 11, fig. 11 is a schematic flow chart illustrating an image capturing method according to another embodiment of the present invention, where the image capturing method further includes steps S107 to S109.
And S107, controlling the camera to acquire the image of the welding spot according to a second preset mode.
The controller 110 adjusts the brightness value of the white light source to the minimum brightness value through the output channel connected to the white light source according to a preset second preset mode, adjusts the brightness value of the non-white light source to the corresponding preset brightness value through the output channel connected to the non-white light source, and controls the camera 120 to obtain an image containing a clear welding spot in the imaging environment.
And S108, analyzing the gradient and the saturation of the welding spot according to the image of the welding spot.
The color tone of the welding point on the acquired image reflects the gradient of the welding point, and the saturation of the welding point refers to the full degree of the color of the welding point in the image.
And S109, judging whether the welding error occurs in the welding spot according to the gradient and the saturation of the welding spot.
And judging whether the welding spot has welding errors such as missing welding, excessive tin (pins are not out and insufficient welding), less tin (pinholes and copper exposure) and the like according to the tone and the full degree of the color of the welding spot on the image.
When the controller 110 adjusts the brightness values of the light sources connected to all the output channels according to the third preset mode, not only is an imaging environment formed by the white light source provided to collect clear images of characters on the surfaces of the components on each sub-area of the PCB, but also an imaging environment formed by the AOI light source is provided to collect clear images of welding spots on each sub-area of the PCB, and whether the components on the PCB are mistakenly and reversely pasted and the like can be detected according to the obtained images, and/or whether the welding spots are missed, have more tin (pins are not out, or have insufficient solder), and have less tin (pinholes and copper exposure). With reference to fig. 12, fig. 12 is a schematic flow chart of an image capturing method according to an embodiment of the present invention, and the image capturing method further includes steps S110 to S112.
And S110, controlling the camera to acquire the first image and the second image of the object to be detected according to a third preset mode.
The first image is acquired by the camera when the brightness value of the white light source is the maximum brightness value and the brightness value of the non-white light source is the minimum brightness value, and the second image is acquired by the camera when the brightness value of the white light source is the minimum brightness value and the brightness value of the non-white light source is the preset brightness value. The first image contains clear characters on the surface of the component, and the second image contains clear welding spots.
And S111, judging whether the component is subjected to component mounting errors or not according to the first image.
And judging whether the component is pasted wrongly according to whether the position of the character in the first image meets the preset position or not.
And S112, judging whether the welding spot has welding errors or not according to the second image.
And judging whether the welding spot has welding errors such as missing welding, more tin (pins are not out and insufficient welding), less tin (pinholes and copper exposure) and the like according to the tone of the welding spot on the second image and the fullness degree of the color.
To sum up, the image acquisition method, the controller and the automatic optical detection device provided by the embodiment of the invention firstly receive a trigger signal sent by a camera; then, based on the trigger signal, adjusting the brightness value according to a preset mode, wherein the brightness value is adjusted by all light sources connected with the output channels; and controlling the camera to acquire the image of the object to be detected every time the brightness value adjustment is completed. In the embodiment of the invention, the controller performs at least one adjustment on the brightness values of the light sources connected with all the output channels based on the trigger signal sent by the camera, and controls the camera to perform image acquisition on the object to be detected every time the brightness value adjustment is completed, so that characters on welding spots and components can be clearly imaged, further the detection on all defect types is realized, and the comprehensiveness and the accuracy of the detection result are improved.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are also within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. An image acquisition method is applied to a controller in an automatic optical detection device, wherein the controller is provided with a plurality of output channels, each output channel is connected with a light source, the controller adjusts the brightness value of the light source connected with each output channel through each output channel, the automatic optical detection device further comprises a camera, and the controller is electrically connected with the camera, and the method comprises the following steps:
receiving a trigger signal sent by the camera;
based on the trigger signal, adjusting the brightness value according to a preset mode, wherein the brightness value is adjusted by all light sources connected with the output channel;
and controlling the camera to acquire the image of the object to be detected every time the brightness value adjustment is completed.
2. The method of claim 1, wherein the light sources include a white light source and a non-white light source, the preset pattern includes a first preset pattern, and the adjusting the brightness value according to the preset pattern includes:
adjusting the brightness value of the white light source to a maximum brightness value;
adjusting the brightness value of the non-white light source to a minimum brightness value.
3. The method of claim 1, wherein the light source comprises a white light source and a non-white light source, the preset pattern comprises a second preset pattern, and the adjusting the brightness value according to the preset pattern comprises:
adjusting the brightness value of the white light source to a minimum brightness value;
and adjusting the brightness value of the non-white light source to be a preset brightness value.
4. The method of claim 1, wherein the predetermined pattern comprises a third predetermined pattern, and wherein the step of adjusting the brightness value according to the predetermined pattern comprises:
determining an adjusting period according to the preset times and the preset acquisition time of the camera;
and adjusting the brightness value of the light source connected with each output channel for the preset times according to the adjusting period.
5. The method as claimed in claim 4, wherein the light sources are in a plurality of colors, each color of light source corresponds to a predetermined sequence, each of the predetermined sequences includes a predetermined number of predetermined brightness values, and the step of adjusting the brightness value of each light source connected to each of the output channels for the predetermined number of times according to the adjustment period comprises:
aiming at a target output channel in the plurality of output channels, determining a target preset sequence from the plurality of preset sequences according to the color of a light source connected with the target output channel;
and gradually adjusting the brightness value of the light source connected with the target output channel to each preset brightness value in the target preset sequence according to the adjusting period.
6. The method of claim 1, wherein a component is attached to the object to be detected, characters are printed on the surface of the component, the preset mode comprises a first preset mode, and the method further comprises:
controlling the camera to acquire an image of the character according to the first preset mode;
if the character in the image of the character is not a preset character, judging that the component has a chip mounting error;
and if the characters in the character image are preset characters and the positions of the characters in the character image are inconsistent with the preset positions, judging that the components are subjected to the surface mounting error.
7. The method of claim 1, wherein the object to be detected comprises a solder joint, the preset pattern comprises a second preset pattern, and the method further comprises:
controlling the camera to acquire images of the welding spots according to the second preset mode;
analyzing the gradient and the saturation of the welding spot according to the image of the welding spot;
and judging whether the welding spot has welding errors or not according to the gradient and the saturation of the welding spot.
8. The method of claim 1, wherein the light source includes a white light source and a non-white light source, the object to be inspected has components attached thereto and includes solder joints, the preset mode includes a third preset mode, and the method further includes:
controlling a camera to acquire a first image and a second image of the object to be detected according to the third preset mode; wherein the first image is acquired by the camera when a brightness value of the white light source is a maximum brightness value and a brightness value of the non-white light source is a minimum brightness value, and the second image is acquired by the camera when the brightness value of the white light source is the minimum brightness value and the brightness value of the non-white light source is a preset brightness value;
judging whether the component is subjected to a component mounting error according to the first image;
and judging whether the welding spot has welding errors or not according to the second image.
9. A controller, comprising: a memory for machine executable instructions; the machine executable instructions when invoked perform a method as claimed in any one of claims 1 to 8.
10. An automated optical inspection apparatus comprising the controller of claim 9 and a camera.
CN202210441616.7A 2022-04-25 2022-04-25 Image acquisition method, controller and automatic optical detection equipment Pending CN114813786A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210441616.7A CN114813786A (en) 2022-04-25 2022-04-25 Image acquisition method, controller and automatic optical detection equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210441616.7A CN114813786A (en) 2022-04-25 2022-04-25 Image acquisition method, controller and automatic optical detection equipment

Publications (1)

Publication Number Publication Date
CN114813786A true CN114813786A (en) 2022-07-29

Family

ID=82507445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210441616.7A Pending CN114813786A (en) 2022-04-25 2022-04-25 Image acquisition method, controller and automatic optical detection equipment

Country Status (1)

Country Link
CN (1) CN114813786A (en)

Similar Documents

Publication Publication Date Title
KR101438157B1 (en) Board inspection method
JPH04120403A (en) Soldered joint locator
US7181058B2 (en) Method and system for inspecting electronic components mounted on printed circuit boards
US20050196996A1 (en) Component mounting board inspecting apparatus
CN114022436B (en) Detection method, device and detection equipment for printed circuit board
Elian et al. Implementation of computer vision algorithms for position correction of chip-mounter machine
CN114813786A (en) Image acquisition method, controller and automatic optical detection equipment
JP3243385B2 (en) Object shape inspection device
JP2782759B2 (en) Solder appearance inspection device
CN115239684A (en) Welding spot detection method and device and storage medium
CN113933309B (en) Method for retesting blind hole Kong Nabu of AOI machine
JP6202739B2 (en) Method for inspecting scattered solder balls on boards
JPH08152412A (en) Appearance inspection device
JP6762614B2 (en) Board inspection equipment
JP2775411B2 (en) Lighting equipment for printed wiring board inspection equipment
JP3468643B2 (en) Appearance inspection method for printed wiring boards
JP3280720B2 (en) Substrate inspection device and substrate inspection method
JPH04104044A (en) Apparatus for inspecting printed state of soldering paste
JPH06174444A (en) Soldered state inspection method for discrete type electronic component
JPH0645799A (en) Check device of printed board
CN215297180U (en) Optical detection system
JPS61243304A (en) Visual inspection system for mounted substrate
CN117686500A (en) Welding detection mechanism, detection method and system for triplet sensor
CN111505020A (en) Circuit board detection method, circuit board detection device and computer readable storage medium
KR100292343B1 (en) Inspection method of cream solder position appearance on the board

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