Light source, light source system, image processing method and device, electronic equipment and medium

By using the driver circuit board to control the brightness of the lamp beads in the light source system, it generates a cosine stripe spot, combined with the visual detection algorithm, and solves the problem of unrecognizable product surface defects, improving product quality and detection efficiency.

CN118980684APending Publication Date: 2024-11-19HANGZHOU HIKROBOT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411048248.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

During multi-process processing, defects such as cracks, scratches, depressions, protrusions, and dirt on the surface of the product cannot be identified by human eyes or conventional visual inspection methods, resulting in low product quality and high factory defect rate.

Method used

A light source system is designed, including a lamp board, a diffusion board and a driving circuit board. The brightness of multiple rows and rows of lamp beads is controlled by the driving circuit board to generate striped spots that conform to the law of cosine change, and combined with visual detection algorithms to make the defects appear clearly. .

Benefits of technology

Accurately identifying and eliminating defective products improves product quality and reduces factory defect rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118980684A_ABST
    Figure CN118980684A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a light source, a light source system, an image processing method and device, electronic equipment and a medium, and relates to the technical field of machine vision. The light source comprises a lamp panel, a diffusion plate, a driving circuit board and a structural member; the driving circuit board is electrically connected with the lamp panel, the driving circuit board and the lamp panel are located on the first side of the diffusion plate, and the structural part is used for fixedly installing the lamp panel, the diffusion plate and the driving circuit board; a plurality of rows and columns of lamp beads are arranged on the surface of the second side of the lamp panel, and the lamp beads are used for emitting light; the diffusion plate is used for diffusing a light source emitted by the lamp beads; and the driving circuit board is used for controlling the brightness of lightening the multi-row and multi-column lamp beads according to at least one pre-configured stripe light spot. According to the scheme, the problem that defects cannot be identified can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine vision technology, and in particular to a light source, a light source system, an image processing method and device, an electronic device and a medium. Background Art

[0002] Finished products require multiple processing steps, and finished products need to pass quality tests before they can be put on the market. However, during the multi-process processing of products, cracks, scratches, dents, protrusions, dirt and other defects that cannot be identified by human eyes or conventional visual inspection methods will appear on the surface of the product, which seriously affects the product quality and the defective rate of products leaving the factory is high. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a light source, a light source system, an image processing method and device, an electronic device and a medium to solve the problem that defects cannot be identified. The specific technical solution is as follows:

[0004] In a first aspect, an embodiment of the present application provides a light source, comprising a lamp board, a diffuser plate, a driving circuit board and a structural member; the driving circuit board is electrically connected to the lamp board, the driving circuit board and the lamp board are located on a first side of the diffuser plate, and the structural member is used to fix and install the lamp board, the diffuser plate and the driving circuit board;

[0005] A plurality of rows and columns of lamp beads are arranged on the surface of the second side of the lamp board, and the lamp beads are used to emit light;

[0006] The diffusion plate is used to diffuse the light source emitted by the lamp beads;

[0007] The driving circuit board is used to control the brightness of the multiple rows and columns of lamp beads according to at least one pre-configured stripe light spot.

[0008] In some embodiments, the driving circuit board is specifically used to traverse at least one pre-configured striped light spot; and control the brightness of the multiple rows and columns of lamp beads according to the traversed striped light spots and the irradiation time corresponding to the striped light spots.

[0009] In some embodiments, each row and column of lamp beads are individually controlled to turn on and off;

[0010] The driving circuit board is specifically used for: using pulse width modulation to determine the duty cycle of the high level corresponding to the brightness of each row or column of lamp beads; and providing power to the corresponding row or column of lamp beads according to the duty cycle of the high level corresponding to each row or column of lamp beads.

[0011] In some embodiments, the striped light spot conforms to a sine-cosine characteristic.

[0012] In some embodiments, the light source further includes a first interface and a second interface disposed on the driving circuit board; the first interface is used for electrically connecting to a controller, and the second interface is used for communication connection with the controller.

[0013] In some embodiments, the multiple rows and columns of lamp beads include multiple rows and columns of first lamp beads distributed at equal intervals and multiple rows and columns of second lamp beads distributed at equal intervals;

[0014] The distance between the first lamp bead and the second lamp bead in adjacent rows is greater than 0, and the distance between the first lamp bead and the second lamp bead in adjacent columns is greater than or equal to a first size, and the first size is half of the sum of the sizes of the first lamp bead and the second lamp bead in the column direction; or,

[0015] The distance between the first lamp bead and the second lamp bead in adjacent rows is greater than or equal to a second size, and the distance between the first lamp bead and the second lamp bead in adjacent columns is greater than 0, and the second size is half of the size and value of the first lamp bead and the second lamp bead in the row direction.

[0016] In some embodiments, the first lamp beads and the second lamp beads have the same size in the row direction and the same size in the column direction.

[0017] In some embodiments, the ratio of the first distance to the second distance is a preset ratio, so that the striped light spot emitted by the light source has no bright spots and dark spots, the first distance is the spacing between adjacent first lamp beads in a row of first lamp beads, and the second distance is the distance between the diffuser plate and the light board.

[0018] In some embodiments, the color temperature of the lamp beads is 6500K~7000K.

[0019] In some embodiments, the optical parameter of the diffuser plate is a preset haze value, and the light source transmittance of the diffuser plate is greater than or equal to a preset transmittance threshold.

[0020] In some embodiments, the surface of the first side of the diffuser plate is a smooth surface, and the surface of the second side of the diffuser plate is a finely frosted surface; the thickness of the diffuser plate is 2 mm, and the preset haze value is 97.

[0021] In some embodiments, the diffusion plate is made of polycarbonate or polymethyl methacrylate.

[0022] In some embodiments, the light source further includes a thermal pad; the thermal pad is fixedly mounted on the driving circuit board and the first side of the light board through the structural member; the thermal pad is used to conduct heat to the driving circuit board and the light board.

[0023] In some embodiments, the light source further includes a heat dissipation component, which is fixedly mounted on the driving circuit board and the first side of the lamp board through the structural member; the heat dissipation component is used to transfer heat to the air.

[0024] In some embodiments, the heat dissipation assembly includes a heat dissipation fan and a housing; the housing is installed on the outside of the structural member, and the heat dissipation fan is arranged between the housing and the structural member.

[0025] In a second aspect, an embodiment of the present application provides a light source system, comprising any of the light sources provided in the first aspect and a controller; the controller is electrically connected to a driving circuit board of the light source;

[0026] The controller is used to provide a constant power supply to the driving circuit board.

[0027] In some embodiments, the light source system further includes an image acquisition device; the controller is connected to the image acquisition device; an irradiation area of ​​the light source and an image acquisition area of ​​the image acquisition device have an overlapping area;

[0028] The controller is also used to control the image acquisition device to acquire images.

[0029] In some embodiments, the controller is specifically configured to:

[0030] Providing a constant power supply to the driving circuit board according to a preset interval, and controlling the image acquisition device to acquire images; and / or

[0031] Receive a trigger signal; after receiving the trigger signal, provide a constant power supply to the driving circuit board and control the image acquisition device to acquire an image.

[0032] In some embodiments, the light source system further includes a signal sensor disposed in the overlapping area;

[0033] The signal sensor is used to send the trigger signal to the controller when detecting that there is an object in the overlapping area.

[0034] In some embodiments, the light source system further includes a laser locator disposed on the image acquisition device, and the direction in which the laser locator emits laser light is parallel to the irradiation direction of the optical axis of the image acquisition device.

[0035] In some embodiments, the controller is communicatively connected to a driving circuit board of the light source;

[0036] The controller is further used to configure light source stripe parameters for the driving circuit board, wherein the light source stripe parameters include at least one stripe light spot and an irradiation time duration corresponding to the stripe light spot.

[0037] In a third aspect, an embodiment of the present application provides an image processing method, the method comprising:

[0038] Acquire at least one original image including the object to be measured, wherein the at least one original image is an image acquired by an image acquisition device after a controller included in any light source system provided in the second aspect provides a constant power supply to a driving circuit board included in any light source provided in the first aspect;

[0039] The at least one original image is processed to obtain a three-dimensional visual effect image.

[0040] In a fourth aspect, an embodiment of the present application provides an image processing device, the device comprising:

[0041] An acquisition module, used to acquire at least one original image including the object to be measured, wherein the at least one original image is an image acquired by the image acquisition device after the controller included in any light source system provided by the second aspect provides a constant power supply to the driving circuit board included in any light source provided by the first aspect;

[0042] The processing module is used to process the at least one original image to obtain a three-dimensional visual effect image.

[0043] In a fifth aspect, an embodiment of the present application provides an electronic device, including:

[0044] Memory, used to store computer programs;

[0045] The processor is used to implement the above-mentioned image processing method when executing the program stored in the memory.

[0046] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above-mentioned image processing method when executed by a processor.

[0047] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the above-mentioned image processing method.

[0048] Beneficial effects of the embodiments of the present application:

[0049] In the technical solution provided by the embodiment of the present application, a driving circuit board is provided in the light source. The driving circuit board is a logic control circuit. The pattern of the striped light spot emitted by the light source can be adjusted according to the defects that need to be observed, that is, the brightness of the multiple rows and columns of lamp beads can be controlled to present horizontal stripes or vertical stripes of various brightnesses, and obtain striped light spots that conform to the sine and cosine variation law or other variation laws. Under the illumination of such striped light spots, combined with relevant visual inspection algorithms, the defects on the surface of the product can be clearly presented. This can accurately eliminate defective products, improve product quality, and reduce the defective rate of products leaving the factory.

[0050] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0052] Figure 1a A schematic diagram of binary stripes;

[0053] Figure 1b A schematic diagram of cosine fringes;

[0054] Figure 2 A schematic diagram of a 2.5D light source;

[0055] Figure 3a is a first schematic diagram of a light source system;

[0056] Figure 3b is a second schematic diagram of the light source system;

[0057] Figure 4 A first schematic diagram of a light source provided in an embodiment of the present application;

[0058] Figure 5a A first schematic diagram of a light board provided in an embodiment of the present application;

[0059] Figure 5b A second schematic diagram of a light board provided in an embodiment of the present application;

[0060] Figure 5c A third schematic diagram of a light board provided in an embodiment of the present application;

[0061] Figure 6a A first schematic diagram of a stripe light spot provided in an embodiment of the present application;

[0062] Figure 6b A second schematic diagram of a stripe light spot provided in an embodiment of the present application;

[0063] Figure 6c A third schematic diagram of the stripe light spot provided in the embodiment of the present application;

[0064] Figure 6d A fourth schematic diagram of a stripe light spot provided in an embodiment of the present application;

[0065] Figure 7a A first schematic diagram of a striped light spot formed after the light board provided in an embodiment of the present application emits light;

[0066] Figure 7b A second schematic diagram of a striped light spot formed after the light board provided in an embodiment of the present application emits light;

[0067] Figure 8a A fifth schematic diagram of a stripe light spot provided in an embodiment of the present application;

[0068] Figure 8b A sixth schematic diagram of a stripe light spot provided in an embodiment of the present application;

[0069] Figure 8c A seventh schematic diagram of a stripe light spot provided in an embodiment of the present application;

[0070] Figure 8d An eighth schematic diagram of a stripe light spot provided in an embodiment of the present application;

[0071] Figure 9a A third schematic diagram of a striped light spot formed after the light board provided in an embodiment of the present application emits light;

[0072] Figure 9b A fourth schematic diagram of a striped light spot formed after the light board provided in an embodiment of the present application emits light;

[0073] Fig.10 A second schematic diagram of a light source provided in an embodiment of the present application;

[0074] Fig.11 A first schematic diagram of a light source system provided in an embodiment of the present application;

[0075] Fig.12 A second schematic diagram of a light source system provided in an embodiment of the present application;

[0076] Fig.13a A first schematic diagram of an irradiation area and an image acquisition area provided in an embodiment of the present application;

[0077] Fig.13bA second schematic diagram of the irradiation area and the image acquisition area provided in an embodiment of the present application;

[0078] Fig.13c A third schematic diagram of the irradiation area and the image acquisition area provided in the embodiment of the present application;

[0079] Fig.14 A third schematic diagram of a light source system provided in an embodiment of the present application;

[0080] Fig.15 A schematic diagram of an image processing method provided in an embodiment of the present application;

[0081] Fig.16 A schematic diagram of an image processing device provided in an embodiment of the present application;

[0082] Fig.17 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0084] To facilitate understanding, the terms appearing in the embodiments of the present application are explained below.

[0085] Diffuser plate: 1) It has micro beads inside. The light emitted by the lamp beads is refracted, reflected and scattered by the micro beads inside the diffuser plate, which can achieve high light transmittance and excellent light dispersion effect; 2) The convex frosted structure on the surface can reduce product scratches and help diffuse the light source.

[0086] Binary stripes: Texture images composed of black and white grayscale, such as Figure 1a The binary stripes shown have clear boundaries between black and white stripes.

[0087] Cosine stripes: The grayscale between white and black is divided into multiple grayscales, and the texture image is composed of multiple grayscales from white to black and then to white with grayscale changes similar to cosine, such as Figure 1b The binary fringes shown in the figure. The cosine fringes vary in the phase range of 0 to 2π, and the edges of the grayscale fringes are fuzzy and have no clear boundaries.

[0088] 2.5-dimensional (D) light source: A light source used for machine vision inspection that can emit a light spot similar to a cosine fringe. It can be used in conjunction with a linear array camera and a translation stage to collect high-resolution images. The collected images are processed by a special visual inspection algorithm to obtain images with 3D visual effects. Since the specific three-dimensional data of the image with 3D visual effects cannot be calculated, this light source is called a 2.5D light source.

[0089] Distance-to-height ratio: the ratio between the distance between the lamp beads inside the light source and the distance from the lamp board to the diffuser. Figure 2 In the light source shown, the upper plate is a diffuser plate, the lower plate is a lamp plate, and each diamond on the lamp plate represents a lamp bead. The lamp bead spacing d represents the distance between the centers of two adjacent lamp beads, and the distance h from the lamp bead plate to the diffuser plate represents the distance from the upper surface of the lamp plate (i.e., the upper surface of the lamp bead) to the lower surface of the diffuser plate. The distance-to-height ratio is d / h.

[0090] LED: light emitting diode, provides brightness. The lamp beads can be LED lamp beads, that is, lamp beads implemented by light emitting diodes.

[0091] During the multi-step processing of products, cracks, scratches, dents, bumps, dirt and other defects that cannot be identified by human eyes or conventional visual inspection methods will appear on the surface of the products, which seriously affects the product quality and the defective rate of products leaving the factory is high.

[0092] In order to detect defective products, a 2.5D light source is used in conjunction with a linear array camera and a translation stage, such as Figure 3a and Figure 3b In the light source system shown, the optical axis of the linear array camera intersects the center line of the 2.5D light source at position p. The 2.5D light source emits a cosine-like stripe light spot. The object to be measured (i.e., the product) is placed on the translation stage. When the translation stage moves to Figure 3a and Figure 3b When the camera is at the position p shown, the linear array camera captures an image containing the object to be tested. The captured image is then processed by a preset visual inspection algorithm to obtain an image with a 3D visual effect. Defects on the object to be tested that are not recognizable to the human eye can be clearly presented in the image with a 3D visual effect.

[0093] The current 2.5D light source is composed of a lamp board and a diffuser, etc., with multiple rows and columns of lamp beads arranged on the lamp board. The 2.5D light source is driven by a constant power source such as a constant current or constant voltage. The light on and off of each row and column on the lamp board achieves a light and dark stripe effect; combined with a diffuser, the entire light and dark stripe looks more uniform. However, due to the constant power drive, the stripe spot formed by the 2.5D light source can only be a binary stripe spot, and the stripe light source effect is poor. In addition, since the stripe boundaries of the binary stripe spot are clear and distinct, the stripe grayscale change is quite different from the cosine change law, which results in a poor 3D visual effect of the image processed by a special algorithm, which in turn leads to low accuracy and efficiency in defect recognition, and poor overall visual inspection effect.

[0094] In order to solve the problem that defects cannot be identified, the embodiment of the present application provides a light source, such as Figure 4 As shown, it includes a lamp board 41, a diffuser plate 42, a driving circuit board 43 and a structural member 44. The driving circuit board 43 is electrically connected to the lamp board 41, and the driving circuit board 43 and the lamp board 41 are located on the first side of the diffuser plate 42. The structural member 44 is used to fix and install the lamp board 41, the diffuser plate 42 and the driving circuit board 43; a plurality of rows and columns of lamp beads are arranged on the surface of the second side of the lamp board 41, and the lamp beads are used to emit light; the diffuser plate 42 is used to diffuse the light source emitted by the lamp beads; the driving circuit board 43 is used to control the brightness of the lamp beads in the plurality of rows and columns according to at least one pre-configured stripe light spot.

[0095] In the technical solution provided by the embodiment of the present application, a driving circuit board is provided in the light source. The driving circuit board is a logic control circuit. The pattern of the striped light spot emitted by the light source can be adjusted according to the defects that need to be observed, that is, the brightness of the multiple rows and columns of lamp beads can be controlled to present horizontal stripes or vertical stripes of various brightnesses, and obtain striped light spots that conform to the sine and cosine variation law or other variation laws. Under the illumination of such striped light spots, combined with relevant visual inspection algorithms, the defects on the surface of the product can be clearly presented. This can accurately eliminate defective products, improve product quality, and reduce the defective rate of products leaving the factory.

[0096] In the embodiment of the present application, the driving circuit board 43 and the light board 41 can be located on the same substrate. Figure 4 As shown. The driving circuit board 43 and the light board 41 may also be located on different substrates, as long as the driving circuit board 43 and the light board 41 are electrically connected. The substrate may be a printed circuit board (PCB) or other plate material on which a circuit may be deployed. The driving circuit board 43 and the light board 41 may be fixedly connected to the structural member 44 by screws or bolts, so that the driving circuit board 43 and the light board 41 are located on the first side of the diffuser 42. Figure 4In the embodiment, the first side is the upper side and the second side is the lower side. The first side and the second side are opposite sides and do not play a limiting role.

[0097] The multiple rows and columns of lamp beads on the lamp board 41 can be arranged in a checkerboard form. The lamp beads can be LED lamp beads or other types of lamp beads. To ensure the visual detection effect, the color temperature of the lamp beads can be 6500K to 7000K, that is, the lamp beads are cold white lamp beads.

[0098] In order to make the emitted stripe light spot conform to the sine and cosine characteristics, the lamp beads are arranged as densely as possible, such as Figure 5a shown. Figure 5a In the light board shown, each small rectangular box represents a lamp bead. Each row and column of lamp beads can be controlled to light up or light down individually, so that the light-emitting surface of the light source can be divided according to the sine and cosine characteristic period to form a striped light spot; each lamp bead can also be controlled to light up or light down individually, so that the light-emitting surface of the light source can be divided according to the specified characteristic period to form a grid-like striped light spot.

[0099] In order to reduce the number of lamp beads and reduce costs, while ensuring that the emitted striped light spots meet the sine and cosine characteristics or specified characteristics, the multiple rows and columns of lamp beads on the lamp board 41 may include multiple rows and columns of first lamp beads distributed at equal intervals and multiple rows and columns of second lamp beads distributed at equal intervals. The first lamp beads and the second lamp beads are arranged in rows and columns in an alternating manner. Specifically, the first lamp beads and the second lamp beads may be arranged in any of the following ways.

[0100] Method 1: The distance between the first lamp bead and the second lamp bead in adjacent rows is greater than 0, and the distance between the first lamp bead and the second lamp bead in adjacent columns is greater than or equal to a first size, and the first size is half of the sum of the sizes of the first lamp bead and the second lamp bead in the column direction. Figure 5b In the light board shown, each rectangular box represents a lamp bead, the lamp beads in odd-numbered rows are first lamp beads, and the lamp beads in even-numbered rows are second lamp beads. In the column direction, the size of the first lamp bead is d1, the size of the second lamp bead is d2, and the distance between the first lamp bead and the second lamp bead in adjacent columns is (d1+d2) / 2.

[0101] Method 2: The distance between the first lamp bead and the second lamp bead in adjacent rows is greater than or equal to the second size, the distance between the first lamp bead and the second lamp bead in adjacent columns is greater than 0, and the second size is half of the sum of the sizes of the first lamp bead and the second lamp bead in the row direction. Figure 5c In the light board shown, each rectangular box represents a lamp bead, the lamp beads in odd-numbered rows are first lamp beads, and the lamp beads in even-numbered rows are second lamp beads. In the row direction, the size of the first lamp bead is L1, the size of the second lamp bead is L2, and the distance between the first lamp bead and the second lamp bead in adjacent columns is (L1+L2) / 2.

[0102] To ensure that the light emitted by the first lamp bead and the second lamp bead is consistent and to facilitate subsequent defect detection, the first lamp bead and the second lamp bead have the same size in the row direction and the same size in the column direction.

[0103] In one example, the first lamp bead and the second lamp bead have the same size in the row and column directions. The package size of the lamp bead is 2.8×3.5mm, and the size of the silk screen frame is 3.05×3.75mm. That is, the first lamp bead and the second lamp bead are both 3.05×3.75mm. At this time, the above-mentioned first dimension is 3.05mm, that is, the distance between the first lamp beads in two adjacent rows is 3.05×2=6.1mm, and the distance between the second lamp beads in two adjacent rows is 3.05×2=6.1mm; the above-mentioned second dimension is 3.75mm, that is, the distance between the first lamp beads in two adjacent rows is 3.75×2=7.5mm, and the distance between the second lamp beads in two adjacent rows is 3.75×2=7.5mm.

[0104] According to the principle of making the lamp beads as dense as possible, the lamp board 41 can arrange the first lamp beads and the second lamp beads using a first size of 3.05 mm, a distance of 6.1 mm between two adjacent rows of first lamp beads, and a distance of 6.1 mm between two adjacent rows of second lamp beads.

[0105] According to the difference in size of lamp beads of different models, within the maximum limit allowed by the hardware driver, the lamp board 41 is overall arranged in a fixed row and a plurality of columns of lamp beads, for example, the lamp beads are arranged in 16 rows and a plurality of columns.

[0106] In the embodiment of the present application, the material of the diffuser 42 is polycarbonate (PC) or polymethyl methacrylate (PMMA). Considering the requirements of transmittance, anti-aging and weather resistance, the diffuser 42 can be made of PMMA (i.e., acrylic). The diffuser 42 can be fixedly connected to the structural member 44 by screws or bolts.

[0107] In order to take into account both the light source transmittance and the uniformity of the stripe light spot, the optical parameter of the diffuser 42 is a preset haze value, and the light source transmittance of the diffuser 42 is greater than or equal to the preset transmittance threshold. Among them, the uniformity of the stripe light spot formed through the diffuser 42 is greater than the preset uniformity threshold, and the specific uniformity can be controlled by the distance-to-height ratio. The preset haze value can be a value such as haze 97 or 98. The preset haze value, the preset transmittance threshold, and the preset uniformity threshold can be set according to actual needs.

[0108] To achieve the above-mentioned design that takes into account both the light source transmittance and the uniformity of the stripe light spot, in one example, the surface of the first side of the diffuser 42 is a smooth surface, and the surface of the second side of the diffuser 42 is a finely frosted surface; the thickness of the diffuser is 2 mm, and the preset haze value is 97.

[0109] In order to improve the visual detection effect, the distance-to-height ratio can be designed according to a preset ratio, taking the first distance as the spacing between adjacent first lamp beads in a row of first lamp beads, and the second distance as the distance between the diffuser 42 and the lamp board 41 as an example. The ratio of the first distance to the second distance is a preset ratio, so that the striped light spots emitted by the light source do not have bright spots (the lamp beads are bright) and dark spots (the lamp beads are not bright). The bright spots and dark spots in the striped light spots are eliminated, making the entire light-emitting surface more uniform, and the striped light spots are more in line with the sine-cosine characteristics or specified characteristics, reducing the interference of the light source itself on the 2.5D visual detection algorithm.

[0110] The above-mentioned preset ratio can be calculated in real time by simulation. The mapping relationship between the first distance and the second distance (i.e., the preset ratio) can also be pre-stored; when determining the first distance, the second distance is determined according to the pre-stored mapping relationship, and then the distance between the diffuser plate 42 and the light board 41 is adjusted to the second distance. The embodiment of the present application does not specifically limit the method for obtaining the above-mentioned preset ratio.

[0111] In the embodiment of the present application, one or more stripe light spots are pre-configured in the driving circuit board 43. The driving circuit board 43 controls the brightness of the lamp beads through a logic program, such as controlling the brightness of a specific number of consecutive rows or columns of lamp beads according to a specific ratio, so that the surface of the object (product) under test presents a stable stripe light spot that conforms to the sine-cosine characteristic or the specified characteristic.

[0112] For example, the driving circuit board 43 can select a stripe light spot from a plurality of stripe light spots, and control the light board to emit light according to the brightness required by the stripe light spot. The driving circuit board 43 can also periodically control the light board to emit light according to the brightness required by each stripe light spot, specifically by traversing at least one pre-configured stripe light spot; and controlling the brightness of the multiple rows and columns of lamp beads according to the traversed stripe light spots and the corresponding irradiation time of the stripe light spots.

[0113] Take the example of controlling the on and off of each row and column of lamp beads individually. For example, the driver circuit board 43 is pre-configured with 4 kinds of stripe spots, such as Figure 6a to Figure 6d As shown. Figure 6a For example, a sine-cosine characteristic period of the stripe light spot is 12 columns, including 9 columns of light beads and 3 columns of off lamp beads. The brightness of each of the 9 columns of light beads is different. They are displayed in the order of the brightest in the middle and the brightness decreases to both sides. The highest brightness is set to 100%. The brightness differences of the 9 columns of lamp beads are 15%, 30%, 70%, 95%, 100%, 95%, 70%, 30%, and 15%, respectively. Together with 3 columns of lamp beads with a brightness of 0, a cosine characteristic period is formed. Similarly, Figure 6a The cosine fringes shown in the figure are shifted by π / 2 to form Figure 6b The sinusoidal fringes shown in Figure 6bThe cosine fringes shown in the figure are shifted by π / 2 to form Figure 6c The cosine fringes shown will Figure 6c The cosine fringes shown in the figure are shifted by π / 2 to form Figure 6d The sine stripes shown. By shifting the sine and cosine stripes at equal intervals, a total of 4 vertical stripe light spots are obtained.

[0114] In one example, the driving circuit board 43 can be Figure 6a to Figure 6d Among the four types of stripe spots shown, select one stripe spot, such as Figure 6a The driving circuit board 43 controls the corresponding columns of lamp beads on the lamp board according to Figure 6a Taking a light source with a size of 300×100 mm, where the lamp board includes 16 rows and 48 columns of lamp beads as an example, the striped light spot formed after the lamp board 41 emits light is as follows: Figure 7a shown. Figure 7a In the chart, H stands for column and V stands for row. The checked row means that the lamp beads in that column are lit. The darker the color, the higher the brightness.

[0115] In another example, the driving circuit board 43 is Figure 6a , Figure 6b , Figure 6c and Figure 6d The stripe light spot is traversed in the order of 1 second. The driving circuit board 43 controls the corresponding column lamp beads on the lamp board according to Figure 6a The stripe light spot shown in the figure emits light for 1 second. Figure 7b As shown in (1); then, the driving circuit board 43 controls the corresponding column of lamp beads on the lamp board according to Figure 6b The stripe light spot shown in the figure emits light for 1 second. Figure 7b As shown in (2); then, the driving circuit board 43 controls the corresponding column of lamp beads on the lamp board according to Figure 6c The stripe light spot shown in the figure emits light for 1 second. Figure 7b Afterwards, the driving circuit board 43 controls the corresponding columns of lamp beads on the lamp board according to Figure 6d The stripe light spot shown in the figure emits light for 1 second. Figure 7b As shown in (4).

[0116] Still taking the example of controlling the on and off of each row and column of lamp beads individually. For example, the driver circuit board 43 is pre-configured with 4 kinds of stripe spots, such as Figure 8a to Figure 8d As shown. Figure 8aFor example, a sine-cosine characteristic period of the stripe light spot is 12 columns, including 9 columns of light beads and 3 columns of off lamp beads. The brightness of each of the 9 columns of light beads is different. They are displayed in the order of the brightest in the middle and the brightness decreases to both sides. The highest brightness is set to 100%. The brightness differences of the 9 columns of lamp beads are 15%, 30%, 70%, 95%, 100%, 95%, 70%, 30%, and 15%, respectively. Together with 3 columns of lamp beads with a brightness of 0, a cosine characteristic period is formed. Similarly, Figure 6a The cosine fringes shown in the figure are shifted by π / 2 to form Figure 8b The sinusoidal fringes shown in Figure 8b The cosine fringes shown in the figure are shifted by π / 2 to form Figure 8c The cosine fringes shown will Figure 8c The cosine fringes shown in the figure are shifted by π / 2 to form Figure 8d The sine stripes shown. By shifting the sine and cosine stripes at equal intervals, a total of 4 types of horizontal stripe spots are obtained.

[0117] In one example, the driving circuit board 43 can be Figure 8a to Figure 8d Among the four types of stripe spots shown, select one stripe spot, such as Figure 8a The driving circuit board 43 controls the corresponding columns of lamp beads on the lamp board according to Figure 8a Taking a light source with a size of 300×100 mm, where the lamp board includes 16 rows and 48 columns of lamp beads as an example, the striped light spot formed after the lamp board 41 emits light is as follows: Figure 9a shown. Figure 9a In the chart, H stands for column and V stands for row. The checked row means that the lamp beads in that row are lit. The darker the color, the higher the brightness.

[0118] In another example, the driving circuit board 43 is Figure 8a , Figure 8b , Figure 8c and Figure 8d The stripe light spot is traversed in the order of 1 second. The driving circuit board 43 controls the corresponding column lamp beads on the lamp board according to Figure 8a The stripe light spot shown in the figure emits light for 1 second. Figure 9b As shown in (1); then, the driving circuit board 43 controls the corresponding column of lamp beads on the lamp board according to Figure 8b The stripe light spot shown in the figure emits light for 1 second. Figure 9b As shown in (2); then, the driving circuit board 43 controls the corresponding column of lamp beads on the lamp board according to Figure 8c The stripe light spot shown in the figure emits light for 1 second. Figure 9b Afterwards, the driving circuit board 43 controls the corresponding columns of lamp beads on the lamp board according to Figure 8d The stripe light spot shown in the figure emits light for 1 second. Figure 9bAs shown in (4).

[0119] The brightness control of the lamp beads by the driving circuit board 43 can be achieved by adjusting the current or voltage. For example, if the constant current value of the input light source is 10A (ampere), then the above Figure 6a and Figure 8a The current values ​​corresponding to the brightness of the 9 columns of lamp beads are 15%×10=1.5A, 30%×10=3A, 70%×10=7A, 95%×10=9.5A, 100%×10=10, 95%×10=9.5A, 70%×10=7A, 30%×10=3A, 15%×10=1.5A, and the driving circuit board 43 provides the current of the corresponding current value for each row or column of lamp beads to realize the corresponding striped light spot. The principle realized by voltage is the same as that realized by current, which will not be repeated here.

[0120] In the embodiment of the present application, the driving circuit board 43 can also use pulse width modulation (PWM) to control the brightness of the lamp beads. Specifically, the driving circuit board 43 uses PWM to determine the duty cycle of the high level corresponding to the brightness of each row or column of lamp beads; according to the duty cycle of the high level corresponding to each row or column of lamp beads, power is provided to the corresponding row or column of lamp beads. The higher the brightness of the lamp beads, the greater the duty cycle of the high level, and the lower the brightness of the lamp beads, the smaller the duty cycle of the high level. Brightness control can be achieved accurately and conveniently through the duty cycle of the high level. Here, brightness control only needs to change the software program logic without changing the hardware drive circuit. In some scenes where the brightness is low and the exposure gain of the image acquisition device cannot meet the requirements, the high-level duty cycle of the light source can be adjusted to continue to increase the brightness, thereby improving the scene compatibility of the light source.

[0121] In the embodiment of the present application, the light source can provide a stripe light spot with sine and cosine characteristics, and the light source is a 2.5D light source. In addition, the light source has the feature of editable stripe light spots, which has good adaptability to different defect detection scenarios. According to the needs of users, the sine and cosine characteristics of the stripe light spots can be adjusted in real time, which is more flexible in application compared with conventional stripe light sources.

[0122] In some embodiments, Fig.10 The light source shown may also include a first interface 45 and a second interface 46 provided on a driver circuit board 43; the first interface 45 is used to be electrically connected to the controller, and the second interface 46 is used to communicate with the controller. In this way, the controller sends the required light source stripe parameters to the driver circuit board 43 through the second interface 46, so that the driver circuit board 43 can control the brightness of the lamp beads according to the light source stripe parameters. The light source stripe parameters may include but are not limited to stripe spot, lighting duration, stripe brightness value, stripe width, sine-cosine characteristic period, etc.

[0123] In the embodiment of the present application, in order to ensure the flexibility of the light source outputting stripes, the number of stripe spots that can be output by the driving circuit board 43 is greater than the number of configured stripe spots. For example, the number of stripe spots that can be output by the driving circuit board 43 is 32, and the number of configured stripe spots is 8, 8<32. In this way, the corresponding stripe spots can be added, modified or deleted according to actual needs, such as the stripe spots when all the lamp beads on the lamp board are lit, and the light source is used as a surface light source. This greatly improves the flexibility of light source application.

[0124] In some embodiments, Fig.10 The light source shown may also include a heat-conducting pad 47; the heat-conducting pad 47 is fixedly mounted on the first side of the driving circuit board 43 and the light board 41 through the structural member 44; the heat-conducting pad 47 is used to conduct heat to the driving circuit board 43 and the light board 41. This can speed up the heat dissipation of the driving circuit board 43 and the light board 41, and increase the service life of the light source.

[0125] In some embodiments, Fig.10 The light source shown may also include a heat dissipation component 48, which is fixedly mounted on the first side of the driving circuit board 43 and the light board 41 through the structural member 44; the heat dissipation component 48 is used to transfer heat to the air. This can further accelerate the heat dissipation of the driving circuit board 43 and the light board 41, and increase the service life of the light source.

[0126] In the embodiment of the present application, the heat dissipation assembly 48 may include a heat dissipation fan 481 and a housing 482; the housing 482 is installed outside the structure 44, and the heat dissipation fan 481 is arranged between the housing 482 and the structure 44. When the light source is working, the heat dissipation fan 481 rotates and is in working state.

[0127] The structural member 44 can be made of metal. When the light source is in use, the heat generated by the lamp board 41 is conducted to the outer surface of the light source through the metal structural member 44, and the heat is transferred to the air by the cooling fan 481. Through a specific height-to-height ratio design, the light emitted by the lamp board 41 is emitted through the diffuser 42, and a uniform stripe of light can be formed on the surface of the object to be measured. By adjusting the brightness of the neatly arranged lamp beads on the lamp board 41 through the driving circuit board 43 of the light source itself, a stripe of light output with sine and cosine characteristics can be achieved.

[0128] Based on the above light source, the embodiment of the present application also provides a light source system, such as Fig.11 As shown, the light source 111 includes a light source 111 and a controller 112. The controller 112 is electrically connected to the driving circuit board of the light source 111. For example, the controller 112 is electrically connected to the driving circuit board of the light source 111 through the first interface. Figures 4 to 10The controller is used to provide a constant power supply to the driving circuit board.

[0129] In the technical solution provided by the embodiment of the present application, a driving circuit board is provided in the light source. The driving circuit board is a logic control circuit. The pattern of the striped light spot emitted by the light source can be adjusted according to the defects that need to be observed, that is, the brightness of the multiple rows and columns of lamp beads can be controlled to present horizontal stripes or vertical stripes of various brightnesses, and obtain striped light spots that conform to the sine and cosine variation law or other variation laws. Under the illumination of such striped light spots, combined with relevant visual inspection algorithms, the defects on the surface of the product can be clearly presented. This can accurately eliminate defective products, improve product quality, and reduce the defective rate of products leaving the factory.

[0130] In some embodiments, the controller 112 is in communication connection with the driving circuit board of the light source 111. For example, the controller 112 is electrically connected with the driving circuit board of the light source 111 via the second interface. The controller 112 may also be used to configure light source stripe parameters to the driving circuit board, and the light source stripe parameters may include at least one stripe light spot and the irradiation time corresponding to the stripe light spot.

[0131] In the embodiment of the present application, the light source system is composed of a light source 111 of a driving circuit board and a controller 112. Fig.11 As shown, the light source 111 and the controller 112 are connected via a power line (first interface) and a signal line (second interface). In addition to providing stable current and voltage to the light source 111, the controller 112 also exchanges signals with the light source 111. The external industrial control host can set the required light source stripe parameters through the client software. After the light source stripe parameters are set, the controller 112 sends a specific digital signal indicating the light source stripe parameters to the driver circuit board of the light source 111 through the signal line.

[0132] In some embodiments, Fig.12 As shown, the light source system may further include an image acquisition device 113; the controller 112 is connected to the image acquisition device 113, and the connection between the controller 112 and the image acquisition device 113 may be an electrical connection, or a communication connection, or may include an electrical connection and a communication connection. The specific connection method may be determined according to the working mode of the image acquisition device 113, as long as the controller 112 can control the image acquisition of the image acquisition device 113. The relationship between the specific connection method and the working mode of the image acquisition device 113 will be described in detail later and will not be elaborated here.

[0133] The image acquisition device 113 may be a linear array camera, an area array camera, or other cameras that can execute special visual detection algorithms to obtain images with 3D visual effects, and this is not limited. The illumination area of ​​the light source overlaps with the image acquisition area of ​​the image acquisition device. The relationship between the illumination area of ​​the light source and the image acquisition area of ​​the image acquisition device may be: the illumination area is located within the image acquisition area, such as Fig.13a As shown; the image acquisition area is located within the irradiation area, such as Fig.13b As shown; the irradiation area partially overlaps with the image acquisition area, as shown Fig.13c shown.

[0134] At this time, the controller 112 can also be used to control the image acquisition device 113 to acquire images.

[0135] In the embodiment of the present application, one end of the controller 112 is electrically and communicatively connected to the light source 111, and the other end of the controller 112 is connected to the image acquisition device 113. Through the control of the controller, the light source 111 and the image acquisition device 113 can cooperate with each other to acquire the surface image of the object to be measured, thereby improving the efficiency and accuracy of defect detection.

[0136] In the embodiment of the present application, the controller 112 may control the light source 111 and the image acquisition device 113 in any of the following ways.

[0137] Method 1: According to the preset interval length, a constant power supply is provided to the driving circuit board of the light source 111, and the image acquisition device 113 is controlled to acquire images. The preset interval length can be based on the actual production process of the product reaching the specified position (such as Figure 3a The interval of the position p) in the image can be set, such as 5s, 10s, etc.

[0138] When the working mode of the image acquisition device 113 is to continuously acquire images, the image acquisition device 113 will work when powered on and continuously acquire images. In this case, the controller 112 is electrically connected to the image acquisition device 113. In the following manner, the controller 112 can provide a constant power supply to the driving circuit board of the light source 111 and the image acquisition device 113 at each preset interval, so as to achieve the purpose of controlling the light source 111 to provide striped light and controlling the image acquisition device 113 to acquire images. In the embodiment of the present application, the lighting of the light source 111 is coordinated with the time when the image acquisition device 113 acquires images, so as to achieve higher brightness in a short time. When the image acquisition ends, the light source 111 ends the fill light and the image acquisition device 113 stops working, which not only improves the fill light utilization rate of the light source 111, but also makes the power consumption of the entire light source system lower.

[0139] When the working mode of the image acquisition device 113 is to capture an image when receiving a shooting signal, the image acquisition device 113 will not capture an image when powered on, and will only capture an image when receiving a shooting signal. In this case, the image acquisition device 113 can be connected to a constant power supply, and the controller 112 is in communication connection with the image acquisition device 113. In the following method, the controller 112 can provide a constant power supply to the driving circuit board of the light source 111 at each preset interval, and send a shooting signal to the image acquisition device 113, so as to achieve the purpose of controlling the light source 111 to provide stripe light and controlling the image acquisition device 113 to capture an image. In the embodiment of the present application, the light source 111 is lit in coordination with the time when the image acquisition device 113 captures an image, so as to achieve higher brightness in a short time, and the light source 111 ends the fill light at the same time as the image acquisition ends, which not only improves the fill light utilization rate of the light source 111, but also makes the power consumption of the entire light source system lower. In addition, the image acquisition device 113 is continuously powered on, and can quickly capture images when receiving a shooting signal, without waiting for the device to start, thereby improving the image acquisition efficiency.

[0140] When the working mode of the image acquisition device 113 is to capture an image upon receiving a shooting signal, the image acquisition device 113 will not capture an image when powered on, and will only capture an image upon receiving a shooting signal. In this case, the controller 112 is electrically and communicatively connected to the image acquisition device 113. In the following manner, the controller 112 can provide a constant power supply to the driving circuit board of the light source 111 and the image acquisition device 113 at each preset interval, and send a shooting signal to the image acquisition device 113, so as to achieve the purpose of controlling the light source 111 to provide stripe light and controlling the image acquisition device 113 to capture an image. In the embodiment of the present application, the lighting of the light source 111 is coordinated with the time when the image acquisition device 113 captures an image, so as to achieve higher brightness in a short time. When the image capture ends, the light source 111 ends the fill light and the image acquisition device 113 stops working, which not only improves the fill light utilization rate of the light source 111, but also makes the power consumption of the entire light source system lower.

[0141] Mode 2, receiving a trigger signal; after receiving the trigger signal, providing a constant power supply to the driving circuit board of the light source 111, and controlling the image acquisition device 113 to acquire an image.

[0142] The trigger signal may be a signal input to the controller 112 by a user through the client software or through the human-computer interaction interface of the controller 112. The trigger signal may also be a signal sent by a sensor for detecting a product. In one example, the light source system may further include a signal sensor disposed in the overlapping area. The signal sensor is configured to send a trigger signal to the controller 112 when an object is detected in the overlapping area between the irradiation area and the image acquisition area.

[0143] In the embodiment of the present application, the signal sensor may be a position sensor or a pressure sensor, etc. Taking the pressure sensor as an example, the pressure sensor is arranged in the overlapping area between the irradiation area and the image acquisition area. When the pressure sensor detects a pressure value, it indicates that the translation stage has moved with the product into the overlapping area, and the pressure sensor sends a trigger signal to the controller 112. Then the controller 112 receives the trigger signal, provides a constant power supply to the driving circuit board of the light source 111, and controls the image acquisition device 113 to acquire images.

[0144] When the working mode of the image acquisition device 113 is to continuously acquire images, the controller 112 is electrically connected to the image acquisition device 113. In the second mode, the controller 112 can provide a constant power supply to the driving circuit board of the light source 111 and the image acquisition device 113 after receiving the trigger signal, so as to achieve the purpose of controlling the light source 111 to provide stripe light and controlling the image acquisition device 113 to acquire images.

[0145] When the working mode of the image acquisition device 113 is to acquire an image upon receiving a shooting signal, the image acquisition device 113 may be connected to a constant power supply, and the controller 112 may be in communication connection with the image acquisition device 113. In the second mode, after receiving a trigger signal, the controller 112 may provide a constant power supply to the driving circuit board of the light source 111, and send a shooting signal to the image acquisition device 113, so as to achieve the purpose of controlling the light source 111 to provide stripe light and controlling the image acquisition device 113 to acquire an image.

[0146] When the working mode of the image acquisition device 113 is to acquire an image upon receiving a shooting signal, the controller 112 is electrically and communicatively connected to the image acquisition device 113. In the second mode, after receiving a trigger signal, the controller 112 can provide a constant power supply to the driving circuit board of the light source 111 and the image acquisition device 113, and send a shooting signal to the image acquisition device 113, so as to achieve the purpose of controlling the light source 111 to provide stripe light and controlling the image acquisition device 113 to acquire an image.

[0147] In some embodiments, Fig.14 As shown, the light source system may further include a laser locator 114 disposed on the image acquisition device 113, and the direction in which the laser locator 114 emits laser light is parallel to the irradiation direction of the optical axis of the image acquisition device 113. In this way, the user can adjust the field of view of the image acquisition device 113 according to the emitting direction of the laser light, so that the center of the irradiated area coincides with the center of the image acquisition area, thereby improving the quality of the acquired image and improving the efficiency and accuracy of defect detection.

[0148] In the embodiment of the present application, the laser locator 114 can also be used as a signal sensor. The laser locator 114 emits laser light, and the surface of the product can reflect the laser locator 114. When the laser locator 114 detects the reflected laser light, the laser locator 114 sends a trigger signal to the controller 112, and the controller 112 provides a constant power supply to the driving circuit board of the light source 111, and controls the image acquisition device 113 to acquire images.

[0149] In the embodiment of the present application, the light source system may further include equipment such as a translation stage, which is not limited thereto.

[0150] The light source provided in the embodiment of the present application is a program-controlled stripe light source, referred to as a program-controlled stripe light source, which can quickly generate horizontal and vertical stripe light spot patterns, or grid light spot patterns in the same workstation. The program-controlled stripe light source projects the stripe light spot pattern onto the object to be measured, and the image acquisition device uses mirror reflection to collect the mirror image features of the object to be measured, which is suitable for the detection of small defects on glossy workpieces, such as scratches, bumps, dirt and other defects.

[0151] The programmable stripe light source can be designed in a special way, specially optimized for area array cameras, and equipped with a special controller and a pair of external linear laser locators. The controller, in conjunction with a special client software program, has the function of freely editing the stripe spot pattern, supports internal trigger mode (triggering at preset interval lengths at each interval), external trigger mode (triggering by sensor sending trigger signals), and third-party software communication control (client software inputs trigger signals). The linear laser locator is installed on the image acquisition device to quickly locate the best matching angle between the image acquisition device and the light source, which is simple and easy to use.

[0152] The technical solution provided in the embodiments of the present application is applicable to industries such as the battery industry, glass industry, mobile phone industry and metal processing industry. For example, in the battery industry, the programmable stripe light source can be used for battery appearance inspection, including the inspection of surface scratches, bumps, dirt and other defects; in the glass industry, the programmable stripe light source can be used for the inspection of fine scratches, bubbles and local deformation and other defects on glass products; in the mobile phone industry, the programmable stripe light source can be used for the inspection of defects on components such as mobile phone casings, screens and lenses; in the metal processing industry, the programmable stripe light source can be used for the inspection of scratches, dents and dirt and other defects on metal parts.

[0153] Based on the above light source system, the embodiment of the present application also provides an image processing method, such as Fig.15 As shown, the method comprises the following steps:

[0154] Step S151, acquiring at least one original image including the object to be measured, wherein the at least one original image is an image captured by an image acquisition device after the controller included in the light source system provides a constant power supply to the driving circuit board included in the light source;

[0155] Step S152, processing at least one original image to obtain a three-dimensional visual effect image.

[0156] In the technical solution provided by the embodiment of the present application, a driving circuit board is provided in the light source. The driving circuit board is a logic control circuit. The pattern of the striped light spot emitted by the light source can be adjusted according to the defects that need to be observed, that is, the brightness of the multiple rows and columns of lamp beads can be controlled to present horizontal stripes or vertical stripes of various brightnesses, and obtain striped light spots that conform to the sine and cosine variation law or other variation laws. Under the illumination of such striped light spots, combined with relevant visual inspection algorithms, the defects on the surface of the product can be clearly presented. This can accurately eliminate defective products, improve product quality, and reduce the defective rate of products leaving the factory.

[0157] The above image processing method can be applied to an image acquisition device, or a device connected to the image acquisition device in communication, such as a controller. For ease of description and understanding, the following description is based on an electronic device as the execution subject, which is not limiting.

[0158] In the above step S151, the number of original images acquired by the electronic device is greater than or equal to the number of stripe spots emitted by the light source. In the embodiment of the present application, the number of original images acquired by the electronic device can be equal to the number of stripe spots emitted by the light source, that is, each time a stripe spot is emitted by the light source, the electronic device acquires an original image acquired by the image acquisition device when the stripe spot is irradiated. In this way, the electronic device can acquire the original image corresponding to each stripe spot, ensuring the effect of the 3D visual effect image acquired subsequently, while reducing the load of the electronic device.

[0159] In the embodiment of the present application, the number of original images acquired by the electronic device is greater than the number of stripe spots emitted by the light source. For example, each time a stripe spot is emitted by the light source, the electronic device acquires multiple original images acquired by the image acquisition device when the stripe spot is irradiated. In this way, for multiple original images corresponding to each stripe spot, the electronic device can select an original image with the best image quality from the multiple original images corresponding to the stripe spot for subsequent image processing, so as to further improve the effect of the 3D visual effect image acquired subsequently.

[0160] In the above step S152, the electronic device can process the acquired original image using a preset visual detection algorithm to obtain a 3D visual effect image, so that defects on the object under test that are not recognizable to the human eye can be clearly presented in the image with 3D visual effects, effectively reducing the defective rate of the object under test before leaving the factory.

[0161] Corresponding to the above-mentioned image processing method, the embodiment of the present application also provides an image processing device, such as Fig.16 As shown, the device comprises:

[0162] An acquisition module 161 is used to acquire at least one original image including the object to be measured, wherein the at least one original image is an image acquired by an image acquisition device after the controller included in the light source system provides a constant power supply to the driving circuit board included in the light source;

[0163] The processing module 162 is used to process at least one original image to obtain a three-dimensional visual effect image.

[0164] In the technical solution provided by the embodiment of the present application, a driving circuit board is provided in the light source. The driving circuit board is a logic control circuit. The pattern of the striped light spot emitted by the light source can be adjusted according to the defects that need to be observed, that is, the brightness of the multiple rows and columns of lamp beads can be controlled to present horizontal stripes or vertical stripes of various brightnesses, and obtain striped light spots that conform to the sine and cosine variation law or other variation laws. Under the illumination of such striped light spots, combined with relevant visual inspection algorithms, the defects on the surface of the product can be clearly presented. This can accurately eliminate defective products, improve product quality, and reduce the defective rate of products leaving the factory.

[0165] In the technical solution provided in the embodiments of the present application, operations such as acquisition, storage, use, processing, transmission, provision and disclosure of user personal information are all performed with the user's authorization.

[0166] The present application also provides an electronic device, such as Fig.17 As shown, including:

[0167] A memory 171, for storing computer programs;

[0168] The processor 172 is used to execute the program stored in the memory 171 to implement the following steps: obtaining at least one original image including the object to be measured, wherein the at least one original image is an image captured by the image acquisition device after the controller included in the above-mentioned light source system provides a constant power supply to the driving circuit board included in the above-mentioned light source; processing the at least one original image to obtain a three-dimensional visual effect image.

[0169] In the technical solution provided by the embodiment of the present application, a driving circuit board is provided in the light source. The driving circuit board is a logic control circuit. The pattern of the striped light spot emitted by the light source can be adjusted according to the defects that need to be observed, that is, the brightness of the multiple rows and columns of lamp beads can be controlled to present horizontal stripes or vertical stripes of various brightnesses, and obtain striped light spots that conform to the sine and cosine variation law or other variation laws. Under the illumination of such striped light spots, combined with relevant visual inspection algorithms, the defects on the surface of the product can be clearly presented. This can accurately eliminate defective products, improve product quality, and reduce the defective rate of products leaving the factory.

[0170] In addition, the electronic device may further include a communication bus and / or a communication interface, and the processor 172, the communication interface, and the memory 171 communicate with each other via the communication bus.

[0171] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0172] The communication interface is used for communication between the above electronic device and other devices.

[0173] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0174] The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0175] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned image processing methods is implemented.

[0176] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any image processing method in the above embodiments.

[0177] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.

[0178] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0179] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the light source system, method, device, electronic device, storage medium and program product embodiments, since they are basically similar to the light source embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the light source embodiment.

[0180] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A light source, characterized in that: It includes a lamp board, a diffuser plate, a driving circuit board and a structural member; the driving circuit board is electrically connected to the lamp board, the driving circuit board and the lamp board are located on a first side of the diffuser plate, and the structural member is used to fix and install the lamp board, the diffuser plate and the driving circuit board; A plurality of rows and columns of lamp beads are arranged on the surface of the second side of the lamp board, and the lamp beads are used to emit light; The diffusion plate is used to diffuse the light source emitted by the lamp beads; The driving circuit board is used to control the brightness of the multiple rows and columns of lamp beads according to at least one pre-configured stripe light spot.

2. The light source according to claim 1, characterized in that The driving circuit board is specifically used to traverse at least one pre-configured stripe light spot; according to the traversed stripe light spot and the irradiation time corresponding to the stripe light spot, control the brightness of the multiple rows and columns of lamp beads.

3. The light source according to claim 1 or 2, characterized in that: Each row and column of lamp beads can be turned on and off individually; The driving circuit board is specifically used for: using pulse width modulation to determine the duty cycle of the high level corresponding to the brightness of each row or column of lamp beads; and providing power to the corresponding row or column of lamp beads according to the duty cycle of the high level corresponding to each row or column of lamp beads.

4. The light source according to claim 1 or 2, characterized in that: The striped light spot complies with the sine-cosine characteristic.

5. The light source according to claim 1, characterized in that The light source further includes a first interface and a second interface disposed on the driving circuit board; the first interface is used for electrically connecting to a controller, and the second interface is used for communicating with the controller.

6. The light source according to claim 1, characterized in that The multiple rows and columns of lamp beads include multiple rows and columns of first lamp beads distributed at equal intervals and multiple rows and columns of second lamp beads distributed at equal intervals; The distance between the first lamp bead and the second lamp bead in adjacent rows is greater than 0, and the distance between the first lamp bead and the second lamp bead in adjacent columns is greater than or equal to a first size, and the first size is half of the sum of the sizes of the first lamp bead and the second lamp bead in the column direction; or, The distance between the first lamp bead and the second lamp bead in adjacent rows is greater than or equal to a second size, and the distance between the first lamp bead and the second lamp bead in adjacent columns is greater than 0, and the second size is half of the size and value of the first lamp bead and the second lamp bead in the row direction.

7. The light source according to claim 6, characterized in that The first lamp beads and the second lamp beads have the same size in the row direction and the same size in the column direction.

8. The light source according to claim 6 or 7, characterized in that: The ratio of the first distance to the second distance is a preset ratio, so that the striped light spot emitted by the light source has no bright spots and dark spots, the first distance is the spacing between adjacent first lamp beads in a row of first lamp beads, and the second distance is the distance between the diffuser plate and the lamp board.

9. The light source according to any one of claims 1-2 and 5-7, characterized in that: The color temperature of the lamp beads is 6500K-7000K.

10. The light source according to claim 1, characterized in that The optical parameter of the diffuser plate is a preset haze value, and the light source transmittance of the diffuser plate is greater than or equal to a preset transmittance threshold.

11. The light source according to claim 10, characterized in that The surface of the first side of the diffuser plate is a smooth surface, and the surface of the second side of the diffuser plate is a finely frosted surface; the thickness of the diffuser plate is 2 mm, and the preset haze value is 97.

12. The light source according to claim 10 or 11, characterized in that: The material of the diffusion plate is polycarbonate or polymethyl methacrylate.

13. The light source according to claim 1, characterized in that The light source further comprises a thermal pad; the thermal pad is fixedly mounted on the first side of the driving circuit board and the lamp board through the structural member; the thermal pad is used for conducting heat between the driving circuit board and the lamp board.

14. The light source according to claim 1 or 13, characterized in that: The light source further comprises a heat dissipation component, which is fixedly mounted on the driving circuit board and the first side of the lamp board through the structural member; the heat dissipation component is used to transfer heat to the air.

15. The light source according to claim 14, characterized in that The heat dissipation assembly comprises a heat dissipation fan and a shell; the shell is installed on the outside of the structural member, and the heat dissipation fan is arranged between the shell and the structural member.

16. A light source system, characterized in that: A light source and a controller according to any one of claims 1 to 15; wherein the controller is electrically connected to a driving circuit board of the light source; The controller is used to provide a constant power supply to the driving circuit board.

17. The light source system according to claim 16, characterized in that: The light source system further includes an image acquisition device; the controller is connected to the image acquisition device; an irradiation area of ​​the light source and an image acquisition area of ​​the image acquisition device have an overlapping area; The controller is also used to control the image acquisition device to acquire images.

18. The light source system according to claim 17, characterized in that: The controller is specifically used for: Providing a constant power supply to the driving circuit board according to a preset interval, and controlling the image acquisition device to acquire images; and / or Receive a trigger signal; after receiving the trigger signal, provide a constant power supply to the driving circuit board and control the image acquisition device to acquire an image.

19. The light source system according to claim 18, characterized in that: The light source system further includes a signal sensor disposed in the overlapping area; The signal sensor is used to send the trigger signal to the controller when detecting that there is an object in the overlapping area.

20. The light source system according to any one of claims 17 to 19, characterized in that: The light source system further comprises a laser locator arranged on the image acquisition device, and the direction in which the laser locator emits laser light is parallel to the irradiation direction of the optical axis of the image acquisition device.

21. The light source system according to any one of claims 16 to 19, characterized in that: The controller is communicatively connected with a driving circuit board of the light source; The controller is further used to configure light source stripe parameters for the driving circuit board, wherein the light source stripe parameters include at least one stripe light spot and an irradiation time duration corresponding to the stripe light spot.

22. An image processing method, characterized in that: The method comprises: Acquire at least one original image including the object to be measured, wherein the at least one original image is an image acquired by an image acquisition device after a controller included in the light source system of any one of claims 16 to 21 provides a constant power supply to a driving circuit board included in the light source of any one of claims 1 to 15; The at least one original image is processed to obtain a three-dimensional visual effect image.

23. An image processing device, characterized in that: The device comprises: An acquisition module, used to acquire at least one original image including the object to be measured, wherein the at least one original image is an image acquired by an image acquisition device after the controller included in the light source system of any one of claims 16 to 21 provides a constant power supply to the driving circuit board included in the light source of any one of claims 1 to 15; The processing module is used to process the at least one original image to obtain a three-dimensional visual effect image.

24. An electronic device, characterized in that: include: Memory, used to store computer programs; The processor is used to implement the method described in claim 22 when executing the program stored in the memory.

25. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to claim 22 is implemented.

Citation Information

Cited By

  • Free surface type visual device based on LED light bar array and microstructure diffusion film

    CN121275637A

  • Freeform visual device based on LED strip array and microstructure diffusion film

    CN121275637B