Light source control method and device, camera, light supplementing equipment and machine vision system

By adjusting the driving signal, color and lighting angle of the fill light source of the industrial camera, the problem of insufficient image quality and recognition rate in the high-light source demand scenarios is solved, and higher image quality and recognition rate are achieved. It is suitable for Various scenarios.

CN119233099AActive Publication Date: 2024-12-31HANGZHOU HIKROBOT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310783631.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2024-12-31
Estimated Expiration
2043-06-28

AI Technical Summary

Technical Problem

The prior art is difficult to improve the image quality and recognition rate collected by industrial cameras in scenarios that meet the needs of high light sources. Especially when the object to be detected is small in size or is arranged tightly, the way of adjusting the light source exposure time or driving current is insufficient.

Method used

By adjusting the driving signal, light source color and light angle of the fill light source, including increasing the frequency of the PWM drive signal, switching to an analog signal, adjusting the color and light angle, to meet the light source needs of different scenarios.

Benefits of technology

It improves the image quality and recognition rate of industrial cameras, is suitable for scenarios with high requirements for light source quality, expands the application range, and meets higher fill light needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233099A_ABST
    Figure CN119233099A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a light source control method and device, a camera, light supplementing equipment and a machine vision system.The light source control method is used for controlling a light supplementing light source for supplementing light for an industrial camera and comprises the steps that the current image recognition rate and image quality of the industrial camera are obtained; under the condition that the image quality does not reach a preset image quality target, a driving signal of a light supplementing light source is adjusted; and under the condition that the image recognition rate does not reach a preset recognition rate target, adjusting the light source color of a light supplementing light source and / or adjusting the lighting angle of the light supplementing light source. By applying the technical scheme of the invention, the higher light supplement requirement of the industrial camera can be met, the quality of the image acquired by the industrial camera and the image recognition rate can be improved, and the method is suitable for scenes where the industrial camera has higher requirements on the quality of the light source and the color or lighting angle of the light source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of fill light for industrial cameras, and in particular to a light source control method, device, camera, fill light equipment and machine vision system. Background Art

[0002] At present, in the field of machine vision, in order to detect objects, we must first use an industrial camera to capture images of the objects to be detected, that is, to capture images of the objects to be detected, and then perform image recognition based on the captured images to obtain detection results. It can be seen that capturing high-quality images is one of the most important conditions for obtaining accurate recognition results. Among them, the lighting of the shooting scene is an important factor affecting the image quality, which directly affects the effect of image recognition. Therefore, when the external light is insufficient, a light source is usually used for fill light processing.

[0003] In the related art, in order to improve the quality of the images collected by the industrial camera, the light source is adjusted. Specifically, the exposure time of the light source can be adjusted according to the moving speed of the object to be detected or the sampling frequency of the industrial camera, or the driving current of the light source can be adjusted according to the intensity of the light, that is, the period of the light source lighting up and the brightness of the light source are adjusted. Usually, when it is determined that the moving speed of the camera detection object is fast or the sampling frequency of the industrial camera is high, the exposure time of the light source is increased to extend the period of the light source lighting up; or when the light is weak, the driving current of the light source is increased to increase the brightness of the light source.

[0004] However, for scenes with more stringent requirements on the light source on site, for example, when the objects to be detected are relatively small or arranged very closely, adjusting the light source by adjusting the exposure time of the light source or adjusting the driving current of the light source still cannot meet the fill light requirements. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a light source control method, device, camera, fill light equipment and machine vision system to meet higher fill light requirements. The specific technical solutions are as follows:

[0006] In a first aspect, an embodiment of the present application provides a light source control method for controlling a fill light source for an industrial camera, the method comprising:

[0007] Obtain the current image recognition rate and image quality of the industrial camera;

[0008] When the image quality does not reach a preset image quality target, adjusting a driving signal of the fill light source;

[0009] When the image recognition rate does not reach a preset recognition rate target, the light source color of the fill light source is adjusted and / or the lighting angle of the fill light source is adjusted.

[0010] In a possible implementation, the supplemental light source includes: a light source driving circuit and a light emitting device;

[0011] The step of adjusting the driving signal of the fill light source comprises:

[0012] The frequency of the PWM driving signal sent by the light source driving circuit to the light emitting device is increased.

[0013] In a possible implementation manner, the step of adjusting the driving signal of the fill light source further includes:

[0014] After increasing the frequency of the PWM driving signal sent by the light source driving circuit to the light-emitting device, if the current image quality of the industrial camera still does not reach the preset image quality target, the PWM driving signal sent by the light source driving circuit to the light-emitting device is switched to an analog driving signal.

[0015] In a possible implementation, the supplementary light source includes: a light source driving circuit and a light emitting device with variable color;

[0016] The step of adjusting the light source color of the fill light source comprises:

[0017] respectively taking the preset adjustable colors as candidate colors, and controlling the light source driving circuit to send a driving signal for turning on the candidate colors to the color-variable light-emitting device;

[0018] A plurality of first image recognition rates of the industrial camera when the fill light source emits each candidate color are obtained respectively, the candidate color corresponding to the highest first image recognition rate is used as the target color, and the light source driving circuit is controlled to send a driving signal to the color-variable light-emitting device to turn on the target color.

[0019] In a possible implementation, the fill light source includes: a coaxial light source coaxial with the industrial camera and at least one circle of light sources arranged around the coaxial light source; there is a preset interval between each circle of light sources; wherein the plane where each circle of light sources is located has a different preset angle with the plane where the light emitting surface of the coaxial light source is located; each preset angle is an acute angle; and the preset angles of each circle of light sources increase from the inside to the outside;

[0020] The step of adjusting the lighting angle of the fill light source includes: adjusting the lighting angle by controlling the coaxial light source and each circle of light sources to be turned on or off.

[0021] In a possible implementation, the step of adjusting the lighting angle of the fill light source includes:

[0022] According to each of the preset multiple lighting angle schemes, the light source driving circuit of the light source to be turned on in the scheme is controlled to send a turning-on driving signal to its light-emitting device; wherein each lighting angle scheme is: a scheme for indicating that the light-emitting devices in the coaxial light source and each circle of light sources are turned on;

[0023] A plurality of second image recognition rates of the industrial camera after lighting according to each scheme are obtained respectively, and the scheme corresponding to the highest second image recognition rate is taken as the target scheme, and the light source driving circuit of the light source to be turned on in the target scheme is controlled to send a turning-on driving signal to its light-emitting device.

[0024] In a possible implementation, the step of adjusting the light source color of the fill light source and adjusting the lighting angle of the fill light source includes:

[0025] Adjust the light source color of the fill light source to obtain the third image recognition rate of the industrial camera after adjusting the light source color of the fill light source; if the third image recognition rate does not reach a preset recognition rate target, adjust the lighting angle of the fill light source; or,

[0026] Adjust the lighting angle of the fill light source to obtain a fourth image recognition rate of the industrial camera after adjusting the lighting angle of the fill light source; if the fourth image recognition rate does not reach a preset recognition rate target, adjust the light source color of the fill light source.

[0027] In a possible implementation, the fill light source is arranged in a fill light device, and the fill light device further includes: a control module;

[0028] The step of adjusting the driving signal of the fill light source when the image quality does not reach a preset image quality target comprises:

[0029] In the case that the image quality does not reach the preset image quality target, a first parameter for controlling the driving signal of the fill light source is generated and sent to the control module of the fill light device, so that the control module adjusts the driving signal of the fill light source according to the first parameter; the first parameter includes: the frequency of the PWM driving signal, or switching information, and the switching information is used to switch the PWM driving signal to an analog driving signal;

[0030] When the image recognition rate does not reach a preset recognition rate target, the step of adjusting the light source color of the fill light source and / or adjusting the lighting angle of the fill light source comprises:

[0031] When the image recognition rate fails to reach a preset recognition rate target, a second parameter for adjusting the light source color of the fill light source and / or a third parameter for adjusting the lighting angle of the fill light source are generated and sent to a control module of the fill light device, so that the control module adjusts the light source color of the fill light source according to the second parameter and / or adjusts the lighting angle of the fill light source according to the third parameter; the second parameter includes: a driving signal for turning on the target color; the third parameter includes: a driving signal for turning on or off the fill light source located at different angles.

[0032] In a second aspect, an embodiment of the present application provides a light source control device for controlling a fill light source for an industrial camera, the device comprising:

[0033] An acquisition module, used to acquire the current image recognition rate and image quality of the industrial camera;

[0034] A first adjustment module, configured to adjust a driving signal of a fill light source when the image quality does not reach a preset image quality target;

[0035] The second adjustment module is used to adjust the light source color of the fill light source and / or adjust the lighting angle of the fill light source when the image recognition rate does not reach a preset recognition rate target.

[0036] In a third aspect, an embodiment of the present application provides an industrial camera, including:

[0037] Camera lens;

[0038] Memory, used to store computer programs;

[0039] The processor is electrically connected to the external fill light source and is used to implement any of the above-mentioned light source control methods when executing the program stored in the memory.

[0040] In a fourth aspect, an embodiment of the present application provides a fill light device for providing fill light to the industrial camera described above; it includes a fill light source.

[0041] In a possible implementation, the fill light device further includes a control module; the fill light source includes: a light source driving circuit and a light emitting device; the control module communicates with a processor in the industrial camera;

[0042] The control module is used to receive a first parameter of a driving signal for controlling a fill light source generated by the industrial camera when the current image quality does not reach a preset image quality target, and adjust the driving signal of the fill light source according to the first parameter; and is used to receive a second parameter for adjusting a light source color of the fill light source and / or a third parameter for adjusting a lighting angle of the fill light source generated by the industrial camera when the current image recognition rate does not reach a preset recognition rate target, and adjust the light source color of the fill light source according to the second parameter and / or adjust the lighting angle of the fill light source according to the third parameter;

[0043] Among them, the first parameter includes: the frequency of the PWM drive signal, or switching information, and the switching information is used to switch the PWM drive signal to an analog drive signal; the second parameter includes: the drive signal for turning on the target color sent by the light source drive circuit to the light-emitting device; the third parameter includes: the drive signal for turning on or off sent by the light source drive circuit of the light source to be turned on to its light-emitting device.

[0044] In a possible implementation, the fill light source includes: a coaxial light source coaxial with the industrial camera and at least one circle of light sources arranged around the coaxial light source; there is a preset interval between each circle of light sources; wherein the plane where each circle of light sources is located has a different preset angle with the plane where the light emitting surface of the coaxial light source is located; each preset angle is an acute angle; and the preset angles of each circle of light sources increase from the inside to the outside;

[0045] The control module is used to adjust the lighting angle by controlling the coaxial light source and the respective circles of light sources to turn on or off.

[0046] In a fifth aspect, an embodiment of the present application provides a machine vision system, comprising: the industrial camera described above and any of the fill light devices described above.

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

[0048] The light source control method, device, camera, fill light equipment and machine vision system provided in the embodiments of the present application can adjust the driving signal of the fill light source to adjust the signal quality of the light source when the current image quality of the industrial camera does not reach the preset image quality target, thereby meeting the higher fill light requirements of the industrial camera, improving the quality of the image collected by the industrial camera and the image recognition rate, and can be adapted to the scene where the industrial camera has high requirements for light source quality. And when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, adjust the light source color of the fill light source and / or adjust the lighting angle of the fill light source, by adjusting the color of the light source and / or the lighting angle to better identify the content captured by the industrial camera, thereby meeting the higher fill light requirements of the industrial camera, improving the quality of the image collected by the industrial camera, and the image recognition rate and recognition accuracy, and can be applied to the scene where the industrial camera has high requirements for the light source color or lighting angle, and has a wider range of applications.

[0049] 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

[0050] 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, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0051] Figure 1 This is a schematic diagram of the light source control method according to an embodiment of the present application;

[0052] Figure 2 A schematic diagram of a flow chart of a light source control method provided in an embodiment of the present application;

[0053] Figure 3 Another schematic diagram of a flow chart of a light source control method provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of a circuit principle for adjusting a driving signal of a fill light source in an embodiment of the present application;

[0055] Figure 5 A schematic diagram of a circuit principle for adjusting the light source color of a fill light source in an embodiment of the present application;

[0056] Figure 6 Another schematic diagram of a circuit principle for adjusting the light source color of a fill light source in an embodiment of the present application;

[0057] Figure 7 A schematic diagram of a specific circuit principle for adjusting the light source color of the fill light source in the embodiment of the present application;

[0058] Figure 8 Another specific schematic diagram of a circuit principle for adjusting the light source color of a fill light source in an embodiment of the present application;

[0059] Fig. 9 Schematic diagram of the distribution of fill light sources in the embodiment of the present application;

[0060] Fig.10 A schematic diagram of the principle of a coaxial light source in an embodiment of the present application;

[0061] Fig.11 for Fig. 9 A schematic diagram of a circuit principle for adjusting the lighting angle of a fill light source under the distribution of fill light sources;

[0062] Fig.12 for Fig. 9 A schematic diagram of a specific circuit principle for adjusting the lighting angle of a fill light source under the distribution of the fill light source;

[0063] Fig.13 A schematic diagram of the structure of a light source control device in an embodiment of the present application;

[0064] Fig.14 A schematic diagram of the structure of an industrial camera in an embodiment of the present application;

[0065] Fig.15 A structural schematic diagram of a fill light device in an embodiment of the present application;

[0066] Fig.16 A structural diagram of a machine vision system in an embodiment of the present application. DETAILED DESCRIPTION

[0067] 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.

[0068] In the related art, the quality of images captured by industrial cameras is improved by adjusting the exposure time of the light source or adjusting the driving current of the light source, but this method can only be applied to scenes that have requirements on the exposure time or brightness of the light source, and cannot be applied to scenes that have higher requirements on the quality of the light source. In order to solve the problem of how to improve the quality of images captured by industrial cameras and the image recognition rate in the field of machine vision to meet higher fill light requirements, the embodiments of the present application provide a light source control method, device, camera, fill light equipment and machine vision system.

[0069] See also Figure 1 , Figure 1 This is a schematic diagram of the principle structure of the light source control method of the embodiment of the present application. Figure 1 As shown, the embodiment of the present application is directed to an industrial camera 100, by adjusting the light source quality 1, specifically by increasing the control frequency of the light source driving circuit of the fill light source or adjusting the output control method of the light source driving circuit to reduce ripple; and / or adjusting the light source color 2, that is, adjusting the wavelength of the light source; and / or adjusting the lighting angle 3, that is, controlling the switching of light sources at different angles, to cope with various demanding light source requirements for different objects to be detected, different detection contents, and different detection environments, to meet the acquisition of high-quality images in different scenarios, with a wider range of application scenarios, so that the types of objects and contents to be detected are richer and the application prospects are better.

[0070] The light source control method provided in the present application is described in detail below through specific embodiments.

[0071] In one embodiment, see Figure 2 , Figure 2 A flow chart of a light source control method provided in an embodiment of the present application, which is used to control a fill light source for fill light of an industrial camera, includes:

[0072] S201, obtaining the current image recognition rate and image quality of the industrial camera.

[0073] When the image quality does not reach the preset image quality target, S202 is executed to adjust the driving signal of the fill light source.

[0074] When the image recognition rate does not reach the preset recognition rate target, S203 is executed to adjust the light source color of the fill light source and / or S204 is executed to adjust the lighting angle of the fill light source.

[0075] In a specific embodiment, the light source colors may include: red, blue, green, white and a combination of these four colors; the lighting angle may be preset in advance according to the on-site application scenario, for example, it may include: 90°, 30°, 45° and 60°, or 20°, 40°, 65°, etc.; the preset recognition rate target may be set according to actual needs.

[0076] By applying the light source control method provided in the embodiment of the present application, when the current image quality of the industrial camera does not reach the preset image quality target, the driving signal of the fill light source can be adjusted to adjust the signal quality of the light source; and when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, the light source color of the fill light source and / or the lighting angle of the fill light source can be adjusted. By adjusting the color of the light source and / or the lighting angle, the content captured by the industrial camera can be better identified, thereby meeting the higher fill light requirements of the industrial camera, improving the quality of the image collected by the industrial camera, as well as the image recognition rate and recognition accuracy. It can be suitable for scenes where the industrial camera has high requirements on the light source quality, light source color or lighting angle, and has a wider range of applications, and can cope with various stringent requirements on the light source under different objects to be detected, different detection contents and different detection environments, so that the types of objects and contents to be detected are richer and the application prospects are better.

[0077] Figure 2 The light source control method shown can be applied to an industrial camera, which is electrically connected to the fill light source to achieve control of the fill light source.

[0078] In another embodiment, see Figure 3 , Figure 3 Another flow chart of a light source control method provided in an embodiment of the present application, the method is applied to an industrial camera, and includes the following steps:

[0079] S301, obtaining the current image recognition rate and image quality of the industrial camera.

[0080] The recognition rate indicates the percentage of correctly recognized inputs to the total number of all recognized inputs. In the embodiment of the present application, the image recognition rate indicates the percentage of images captured by the industrial camera that can be recognized to all captured images, which can be used to measure the performance of the industrial camera. The higher the image recognition rate, the better the performance of the industrial camera. Image quality is used to indicate the quality of the image, or the degree of distortion of the image. It can be evaluated by a variety of indicators, such as resolution, clarity, peak signal-to-noise ratio (PSNR) and mean square error (MSE). It can also be evaluated by indicators such as whether the image is clear and noise-free, whether there are water ripples, etc.

[0081] In the embodiment of the present application, the industrial camera can obtain the current image recognition rate and image quality in real time to achieve dynamic light source control. Specifically, the current image recognition rate and image quality can be the image recognition rate and image quality of the industrial camera without fill light operation, or the image recognition rate and image quality of the industrial camera with fill light operation.

[0082] For example, in this embodiment, the image recognition rate can be expressed as a percentage, and the image quality can be expressed as a clarity value, whether the image has noise or water ripples, etc.

[0083] S302, determining whether the image quality reaches a preset image quality target, and determining whether the image recognition rate reaches a preset recognition rate target.

[0084] Some application scenarios have more stringent requirements on the on-site light source. The preset recognition rate target may be as high as 95% or more, and the preset image quality target requires that the image be free of noise and water ripples.

[0085] If the image quality does not reach the preset image quality target, step S303 is executed; if the image recognition rate does not reach the preset recognition rate target, step S305 and / or step S307 is executed.

[0086] S303, increasing the frequency of the PWM driving signal sent by the light source driving circuit to the light emitting device.

[0087] Usually, the fill light source includes: a light source driving circuit and a light emitting device. The light emitting device can be a light emitting diode (LED), an LED digital tube, etc. There are two modes for the light source driving circuit to drive the light emitting device to emit light: PWM (pulse) digital signal driving or analog signal driving.

[0088] The inventor of the present application has found that the lower the frequency of the PWM driving signal, the more likely the image will have water ripples. Therefore, in this step, the quality of the light source can be improved by increasing the frequency of the PWM driving signal sent by the light source driving circuit to the light emitting device.

[0089] In this embodiment, the frequency of the PWM driving signal can be increased gradually or according to a preset step size, etc. For example, if the current image quality of the industrial camera is noise or water ripples on the image, and the preset image quality target is not reached, such as if the image is noise-free or water ripples, the frequency of the PWM driving signal of the digital light source controller of the light source driving circuit of the fill light source is increased, for example, from the original 20KHZ to 40KHZ or higher, so as to adjust the control frequency of the fill light source and eliminate the noise or water ripples of the collected image.

[0090] S304, after increasing the frequency of the PWM driving signal sent by the light source driving circuit to the light-emitting device, if the current image quality of the industrial camera still does not reach the preset image quality target, the PWM driving signal sent by the light source driving circuit to the light-emitting device is switched to an analog driving signal.

[0091] After fill light is performed by increasing the frequency of the PWM drive signal sent by the light source driving circuit to the light-emitting device, if the image quality of the image captured by the industrial camera still does not reach the preset image quality target, that is, when the image quality of the captured image cannot be met by adjusting the control frequency, the PWM drive signal sent by the light source driving circuit to the light-emitting device is switched to an analog drive signal, that is, the mode in which the light source driving circuit drives the light-emitting device to emit light is switched from digital signal drive to analog signal drive, so as to ensure the signal quality of the light source and eliminate noise or water ripples in the captured image. It is suitable for scenes with high requirements on light source quality.

[0092] S305: taking the preset adjustable colors as candidate colors respectively, and controlling the light source driving circuit to send a driving signal for turning on the candidate colors to the color-variable light-emitting devices.

[0093] S306, respectively obtain multiple first image recognition rates of the industrial camera when the fill light source emits each candidate color, take the candidate color corresponding to the highest first image recognition rate as the target color, and control the light source driving circuit to send a driving signal to turn on the target color to the color-variable light-emitting device.

[0094] In a possible implementation, the above-mentioned fill light source includes: a light source driving circuit and a color-variable light-emitting device. Exemplarily, the preset adjustable colors of the color-variable light-emitting device are red, blue, green, and white. If the current image recognition rate of the industrial camera is lower than 90%, and the preset recognition rate target is not lower than 95%, then the current image recognition rate of the industrial camera does not reach the preset recognition rate target.

[0095] At this time, red, blue, green and white are respectively taken as candidate colors, and the light source driving circuit is controlled to send a driving signal to the color-variable light-emitting device to turn on the candidate colors, so as to obtain a first image recognition rate of 99% for the industrial camera when the fill light source emits red light, a first image recognition rate of 95% for the industrial camera when the fill light source emits blue light, a first image recognition rate of 80% for the industrial camera when the fill light source emits green light, and a first image recognition rate of 85% for the industrial camera when the fill light source emits white light. The candidate color corresponding to the highest first image recognition rate of 99%, i.e. red, is taken as the target color, and the light source driving circuit is controlled to send a driving signal to turn on the red light source to the color-variable light-emitting device.

[0096] In one example, controlling the light source driving circuit to send a driving signal to turn on a candidate color to the color-variable light-emitting device may also include: the duration of the turn-on, the frequency of the turn-on, etc. The output control mode of controlling the light source driving circuit to send a driving signal to turn on a target color to the color-variable light-emitting device may be a preset frequency of a PWM driving signal or an analog driving signal, or may be a frequency of a PWM driving signal or an analog driving signal adjusted in step S303 or step S304.

[0097] In an embodiment of the present application, when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, fill light is performed on the industrial camera by adjusting the color of the fill light source, that is, adjusting the wavelength of the light source, so as to select the light source color corresponding to the highest image recognition rate after fill light as the recognition light source for the object to be recognized or the content to be recognized, thereby achieving better matching of the object to be recognized or the content to be recognized, thereby improving the image recognition rate and recognition accuracy of the industrial camera while improving the quality of the images collected by the industrial camera.

[0098] S307, according to each of the preset multiple lighting angle schemes, respectively control the light source driving circuit of the light source to be turned on in the scheme to send a turning-on driving signal to its light-emitting device.

[0099] In a possible implementation, the above-mentioned fill light source includes: a coaxial light source coaxial with the industrial camera and at least one circle of light sources arranged around the coaxial light source; there is a preset interval between each circle of light sources. There are different preset angles between the plane where each circle of light sources is located and the plane where the light emitting surface of the coaxial light source is located; each preset angle is an acute angle; and the preset angles of each circle of light sources increase from the inside to the outside.

[0100] In this case, the industrial camera adjusts the lighting angle by controlling the coaxial light source and the opening or closing of each circle of light sources. Accordingly, each lighting angle scheme is a scheme for indicating that the coaxial light source and the light-emitting devices in each circle of light sources are turned on.

[0101] In one example, the preset multiple lighting angle schemes include the setting of turning on or off the light emitting devices in the coaxial light source, the first circle of light sources, the second circle of light sources, and the third circle of light sources. In this embodiment, each circle of light sources may include light sources in four directions: up, down, left, and right. Exemplarily, some of the preset multiple lighting angle schemes are shown in Table 1 below:

[0102] Table 1 Examples of preset lighting angle solutions

[0103] plan Lighting Angle (Open) Solution 1 Coaxial light source Solution 2 Coaxial light source, first circle light source (above) Solution 3 Coaxial light source, second circle light source (above) Solution 4 Coaxial light source, third circle light source (above) Solution 5 Coaxial light source, first circle light source (below) Solution 6 Coaxial light source, second circle light source (below) Solution 7 Coaxial light source, third circle light source (below) Solution 8 Coaxial light source, first circle light source (left) Solution 9 Coaxial light source, second circle light source (left) Solution 10 Coaxial light source, third circle light source (left) Solution 11 Coaxial light source, first circle light source (right) Solution 12 Coaxial light source, second circle light source (right) Solution 13 Coaxial light source, third circle light source (right) Solution 14 Coaxial light source, first circle light source (upper, lower, left, right) Solution 15 Coaxial light source, second circle light source (upper, lower, left, right) Scheme 16 Coaxial light source, third circle light source (upper, lower, left, right)

[0104] S308, respectively obtain multiple second image recognition rates of the industrial camera after being illuminated according to each scheme, take the scheme corresponding to the highest second image recognition rate as the target scheme, and control the light source driving circuit of the light source to be turned on in the target scheme to send a turn-on driving signal to its light-emitting device.

[0105] In an example, when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, the light source driving circuits of the light sources to be turned on in different schemes are controlled to send a turn-on driving signal to their light-emitting devices. For example, the second image recognition rate of the industrial camera after lighting according to Scheme 1 is 98%, the second image recognition rate of the industrial camera after lighting according to Scheme 2 is 70%, the second image recognition rate of the industrial camera after lighting according to Scheme 3 is 80%, the second image recognition rate of the industrial camera after lighting according to Scheme 4 is 90%, ..., the scheme corresponding to the highest second image recognition rate of 98% is taken as the target scheme, and the light source driving circuit of the light source to be turned on in the target scheme is controlled to send a turn-on driving signal to its light-emitting device.

[0106] In an embodiment of the present application, when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, the light source driving circuits of the light sources to be turned on in different schemes are respectively controlled to send turn-on driving signals to their light-emitting devices, that is, light sources at different angles are switched to achieve fill light for the industrial camera, so as to better match the placement positions of different objects to be identified and the installation positions of different cameras, thereby improving the image recognition rate and recognition accuracy of the camera while improving the quality of images captured by the industrial camera.

[0107] Figure 3 In the illustrated embodiment, after controlling the light source driving circuit to send a driving signal of turning on the target color to the color-variable light-emitting device to fill in the industrial camera in step S306, the current image recognition rate of the industrial camera can be further obtained, and it can be determined whether the currently obtained image recognition rate reaches the preset recognition rate target. When the current image recognition rate reaches the preset recognition rate target, the adjustment of the light source is terminated, and when the current image recognition rate does not reach the preset recognition rate target, step S307 is executed. That is, when the image recognition rate of the industrial camera does not reach the preset recognition rate target, the light source control is performed by first adjusting the light source color of the fill light source and then adjusting the lighting angle. In other words, the light source color of the fill light source can be adjusted first to obtain the third image recognition rate of the industrial camera after adjusting the light source color of the fill light source; then, when the third image recognition rate does not reach the preset recognition rate target, the light source control is performed by adjusting the lighting angle of the fill light source.

[0108] Those skilled in the art can understand that, in other embodiments, after the light source driving circuit of the light source to be turned on in the control target scheme of step S308 sends a driving signal of turning on to its light-emitting device to fill light for the industrial camera, the current image recognition rate of the industrial camera can be further obtained, and it is determined whether the currently obtained image recognition rate reaches the preset recognition rate target. When the current image recognition rate reaches the preset recognition rate target, the adjustment of the light source is terminated, and when the current image recognition rate does not reach the preset recognition rate target, step S305 is executed. That is, when the image recognition rate of the industrial camera does not reach the preset recognition rate target, the light source control can be performed by first adjusting the lighting angle of the fill light source and then adjusting the light source color. That is to say, the lighting angle of the fill light source can be adjusted first to obtain the fourth image recognition rate of the industrial camera after adjusting the lighting angle of the fill light source; then, when the fourth image recognition rate does not reach the preset recognition rate target, the light source color of the fill light source is adjusted.

[0109] It should be noted that Figure 3 In the illustrated embodiment, although the step of adjusting the driving signal quality is written in the front, in actual applications, there is no necessary order of execution among the three adjustment methods of adjusting the driving signal quality of the fill light source, adjusting the light source color of the fill light source, and adjusting the lighting angle of the fill light source, and they can even be processed in parallel; or, according to the actual scene requirements, only one or two of the methods are executed to adjust the fill light source.

[0110] For example: for application scenarios where the requirements for light source quality are not very high, there may be only two adjustment methods: light source color adjustment and lighting angle adjustment; or, for application scenarios where the requirements for light source color are not very high, only the driving signal quality and the lighting angle can be adjusted; or, in application scenarios where the requirements for lighting angle are not high, only the driving signal quality and the light source color can be adjusted; or, for application scenarios, only one adjustment method can be performed, all of which can be flexibly set according to the actual situation of the application scenario.

[0111] By applying the light source control method provided in the embodiment of the present application, when the current image quality of the industrial camera does not reach the preset image quality target, the driving signal of the fill light source can be adjusted to adjust the signal quality of the light source; and when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, the light source color of the fill light source and / or the lighting angle of the fill light source can be adjusted. By adjusting the color of the light source and / or the lighting angle, the content captured by the industrial camera can be better identified, thereby meeting the higher fill light requirements of the industrial camera, improving the quality of the image collected by the industrial camera, as well as the image recognition rate and recognition accuracy. It can be suitable for scenes where the industrial camera has high requirements on the light source quality, light source color or lighting angle, and has a wider range of applications, and can cope with various stringent requirements on the light source under different objects to be detected, different detection contents and different detection environments, so that the types of objects and contents to be detected are richer and the application prospects are better.

[0112] The following describes in detail how to adjust the driving signal of the fill light source, how to adjust the light source color of the fill light source, and how to adjust the lighting angle of the fill light source in the embodiments of the present application from the perspective of hardware circuits.

[0113] First, how to adjust the driving signal of the fill light source is explained in detail from the perspective of hardware circuit.

[0114] See also Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a circuit principle for adjusting a driving signal of a fill light source in an embodiment of the present application. Figure 4 As shown, the fill light source 220 is arranged in the fill light device 200, and the fill light device 200 is also provided with a control module 210. The fill light source 220 includes: a light source driving circuit 221 and a light emitting device 222. The industrial camera 100 can communicate with the control module 210 of the fill light device 200 through a universal asynchronous receiver / transmitter (UART) communication or a general-purpose input / output (GPIO) triggering method.

[0115] In this embodiment, when the industrial camera 100 determines that the image quality does not reach the preset image quality target, it generates a first parameter for controlling the driving signal of the fill light source 220, and sends it to the control module 210 of the fill light device 200. The control module 210 of the fill light device 200 adjusts the driving signal of the fill light source 220 according to the first parameter. The first parameter here may include: the frequency of the PWM driving signal, or switching information, and the switching information is used to switch the PWM driving signal to an analog driving signal.

[0116] Specifically, the control module 210 may be, for example, a microcontroller unit (MCU). Figure 4 The light source driving circuit 221 in the middle fill light source 220 is powered by a 24V (volt), 12V or 5V power supply. When the industrial camera 100 determines that the current image quality does not reach the preset image quality target, the industrial camera 100 receives the image quality of the image through the UART interface ( Figure 4 UART communication) or GPIO interface ( Figure 4 GPIO trigger), sends a signal to the control module 210 of the fill light device 200 to increase the frequency of the PWM drive signal sent by the light source drive circuit 221 to the light emitting device 222 ( Figure 4 The control parameters of PWM control in the light source driving circuit 221 are used to adjust the frequency ( Figure 4 Mid-frequency adjustment) is used to achieve fill light for the industrial camera 100 by adjusting the quality of the light source.

[0117] Further, after the industrial camera 100 determines to increase the frequency of the PWM driving signal sent by the light source driving circuit 221 to the light emitting device 222, if the current image quality still does not reach the preset image quality target, the industrial camera 100 sends a signal to the control module 210 of the fill light device 200 through the UART interface or the GPIO interface to switch the PWM driving signal sent by the light source driving circuit 221 to the light emitting device 222 to an analog driving signal ( Figure 4 The control parameters of the digital to analog converter (DAC) are used to adjust the driving signal sent by the light source driving circuit 221 to the light emitting device 222 to an analog driving signal ( Figure 4 mid-linear output), to achieve fill light for the industrial camera 100 by adjusting the quality of the light source.

[0118] Secondly, how to adjust the light source color of the fill light source is explained in detail from the perspective of hardware circuit.

[0119] See also Figure 5 , Figure 5 This is a schematic diagram of a circuit principle for adjusting the light source color of the fill light source in the embodiment of the present application. In order to achieve adjustable light source color, Figure 5 The light emitting device 222 in the fill light source 220 is a light emitting device with variable color.

[0120] In this embodiment, when the industrial camera 100 determines that the current image recognition rate does not reach the preset recognition rate target, it can generate a second parameter for adjusting the light source color of the fill light source 220, and send it to the control module 210 of the fill light device 200. The control module 210 of the fill light device 200 adjusts the light source color of the fill light source according to the second parameter, and the second parameter may include: turning on a drive signal of a target color.

[0121] The color-variable light emitting device 222 refers to a light emitting device that can emit light of different colors, and the preset adjustable colors can be, for example, red, blue, green, white, and a combination of these four colors. Figure 5 As shown, when the industrial camera 100 determines that the current image recognition rate does not reach the preset recognition rate target, it sends a configuration parameter to the control module 210 of the fill light device 200 through the UART interface or the GPIO interface. The configuration parameter is to control the light source driving circuit 221 to send a driving signal to turn on the candidate color to the color-variable light-emitting device 222 ( Figure 5 Specifically, the light source driving circuit 221 uses a preset PWM driving signal frequency or the above-adjusted PWM driving signal frequency ( Figure 5 The intermediate frequency is fixed), and a driving signal for turning on the candidate color is sent to the color-variable light-emitting device 222, or the light source driving circuit 221 uses an analog driving signal ( Figure 5 The industrial camera 100 determines the candidate color corresponding to the highest image recognition rate of the industrial camera 100 when the fill light source 220 emits each candidate color as the target color, and then sends a drive signal to turn on the target color to the control module 210 of the fill light device 200 through the UART interface or the GPIO interface, so as to realize fill light for the industrial camera 100 by adjusting the wavelength of the light source.

[0122] See also Figure 6 , Figure 6 FIG. 1 is another schematic diagram of a circuit principle for adjusting the light source color of the fill light source in the embodiment of the present application. In a possible implementation manner, Figure 6 As shown, the fill light source 220 includes: multiple light source driving circuits 221 and multiple single-color light-emitting devices 222; the multiple single-color light-emitting devices 222 include: red light-emitting device 2221, blue light-emitting device 2222, green light-emitting device 2223, and white light-emitting device 2224. Each color of the light-emitting device 222 is driven by a light source driving circuit 221.

[0123] In this embodiment, when the industrial camera 100 determines that the current image recognition rate does not reach the preset recognition rate target, it can generate a second parameter for adjusting the light source color of the fill light source 220, and send it to the control module 210 of the fill light device 200 through the UART interface or the GPIO interface. The control module 210 of the fill light device 200 adjusts the light source color of the fill light source according to the second parameter, and the second parameter may include: a driving signal for turning on the light emitting device 222 of the target color.

[0124] Specifically, when the industrial camera 100 determines that the current image recognition rate has not reached the preset recognition rate target, it sends a driving signal to the control module 210 of the fill light device 200 through the UART interface or the GPIO interface, and controls the light source driving circuit 221 to send a turn-on driving signal to its single-color light-emitting device 222. Then, it obtains multiple fifth image recognition rates of the industrial camera 100 when the fill light source 220 emits different colors, and takes the color corresponding to the highest fifth image recognition rate as the target color. Then, it sends a driving signal to the control module 210 of the fill light device 200 through the UART interface or the GPIO interface, and controls the light source driving circuit 221 to send a turn-on driving signal to the single-color light-emitting device 222 corresponding to the target color.

[0125] Among them, the single-color light-emitting device 222 can be an LED lamp bead that can emit light of different colors, such as red, blue, green, white, etc.

[0126] For example, Figure 6 As shown, when the industrial camera 100 determines that the current image recognition rate does not reach the preset recognition rate target, the configuration parameter is sent to the control module 210 of the fill light device 200 through the UART interface or the GPIO interface. The configuration parameter is to control the light source driving circuit 221 to send an on driving signal to each single-color light emitting device 222 ( Figure 6 Each light source driving circuit 221 drives the light source at a preset PWM driving signal frequency or the above-adjusted PWM driving signal frequency ( Figure 6 The intermediate frequency is fixed), to the single color light emitting device 222 ( Figure 6 The red light emitting device 2221, the blue light emitting device 2222, the green light emitting device 2223, and the white light emitting device 2224) send a driving signal to turn on, or the light source driving circuit 221 uses an analog driving signal ( Figure 6 A linear output is generated in the middle), and a driving signal for turning on is sent to the light emitting device 222 of a single color, so as to achieve fill light for the industrial camera 100 by adjusting the wavelength of the light source.

[0127] See also Figure 7 , Figure 7This is a schematic diagram of a specific circuit principle for adjusting the light source color of the fill light source in the embodiment of the present application. Figure 7 As shown, when the industrial camera 100 determines that the current image recognition rate does not reach the preset recognition rate target, the industrial camera 100 uses the RS232 interface ( Figure 7 RS232_camera, a serial communication interface connecting the industrial camera 100 and the interface converter 300) sends configuration parameters to the interface converter 300. The configuration parameters are used to control the light source driving circuit 221 to send a start driving signal to each single-color light-emitting device 222. The interface converter 300 transmits the configuration parameters through the UART interface ( Figure 7 The MCU 210 of the fill light device 200 controls the light source driving circuit 221 to emit light to each single color light emitting device 222 ( Figure 7 GPO green, GPO red, GPO white, GPO blue) send the start drive signal, MCU210 then through the UART interface ( Figure 7 UART_232) feeds back the feedback information to the industrial camera 100 through the interface converter 300.

[0128] Or, if Figure 7 As shown, when the industrial camera 100 determines that the current image recognition rate does not reach the preset recognition rate target, the industrial camera 100 receives the image through the input interface ( Figure 7 MCU_IN0, MCU_IN1, MCU_IN2) sends the configuration parameters to the MCU210 of the fill light device 200, and then the MCU210 of the fill light device 200 controls the light source driving circuit 221 to send a start driving signal to each single color light emitting device 222, and the MCU210 then outputs the light source driving signal to the MCU210 through the output interface ( Figure 7 MCU_OUT0, MCU_OUT1, MCU_OUT2) sends feedback information to the industrial camera 100.

[0129] In actual applications, some scenarios require that the fill light device 200 be controlled by the customer's host computer (referred to as the client in this embodiment) to achieve fill light for the industrial camera 100. At this time, a corresponding interface is added to the client, namely a Switch converter, and the fill light device 200 is connected to the client or the industrial camera 100 through the Switch converter.

[0130] For details, see Figure 8 , Figure 8 Another specific circuit schematic diagram for adjusting the light source color of the fill light source in the embodiment of the present application. Figure 7 The difference is that the client 400 uses the RS232 interface ( Figure 8 RS232_OUT) sends the configuration parameters to the interface converter 300, and the interface converter 300 transmits the configuration parameters to the interface converter 300 through the UART interface ( Figure 8 Alternatively, the industrial camera 100 sends configuration parameters to the interface converter 300 through the RS232 interface, and the interface converter 300 first sends the configuration parameters to the Switch converter 500 through the UART interface, and then the Switch converter 500 sends the configuration parameters through the UART interface ( Figure 8 UART_MCU) is sent to the MCU210 of the fill light device 200, and the MCU210 of the fill light device 200 is transmitted through the UART interface ( Figure 8 UART_Switch) sends the feedback information to the Switch converter 500, and then forwards it to the client or industrial camera 100.

[0131] And, in the case of communicating through the input and output interface, the industrial camera 100 communicates through the universal output interface ( Figure 8 The camera_OUT0, camera_OUT1, and camera_OUT2) in the fill light device 200 send configuration parameters to the Switch converter 500, and the Switch converter 500 then transmits the configuration parameters through the input interface ( Figure 8 MCU_IN0, MCU_IN1, MCU_IN2) are sent to the MCU210 of the fill light device 200, and the MCU210 of the fill light device 200 uses the output interface ( Figure 8 MCU_OUT0, MCU_OUT1, MCU_OUT2, or OUT_Switch) sends the feedback information to the Switch converter 500, and the Switch converter 500 receives the feedback information through the output interface ( Figure 8 OUT0, OUT1, OUT2) are sent to the client 400, and the industrial camera 100 receives the data through the input interface ( Figure 8 Camera_IN0, camera_IN1, camera_IN2) sends the image to the client 400.

[0132] in, Figure 7 and Figure 8 The number of input interfaces and output interfaces can be set according to actual needs.

[0133] Finally, how to adjust the lighting angle of the fill light source is explained in detail from the perspective of hardware circuit.

[0134] In order to adjust the lighting angle, in the specific implementation, an angle adjustment mechanism can be set for each light source in the fill light device, which will make the structure of the fill light device complicated. A relatively simple implementation method is to set light sources at different angles, and adjust the lighting angle by turning on or off the light sources at different angles. In a possible implementation, the above-mentioned fill light source includes: a coaxial light source coaxial with the industrial camera and at least one circle of light sources arranged around the coaxial light source; there is a preset interval between each circle of light sources. Among them, there are different preset angles between the plane where each circle of light sources is located and the plane where the light emitting surface of the coaxial light source is located; each preset angle is an acute angle; and the preset angles of each circle of light sources increase successively from the inside to the outside. Furthermore, the adjustment of the lighting angle is achieved by controlling the opening or closing of the coaxial light source and each circle of light sources.

[0135] For details, see Fig. 9 , Fig. 9 Schematic diagram of the distribution of fill light sources in the embodiment of the present application. Fig. 9 As shown, the fill light source 220 includes a 90° coaxial light source coaxial with the industrial camera 100, a first ring of light sources ( Fig. 9 6 LEDs (30°) in the middle), and a second circle of light sources ( Fig. 9 6 LEDs (45°) in the middle), and a third circle of light sources ( Fig. 9 6 LEDs (60°)). Accordingly, the first preset angle α between the plane where the first circle of light sources is located and the plane where the light exit surface of the 90° coaxial light source is located is 30°, the second preset angle β between the plane where the second circle of light sources is located and the plane where the light exit surface of the 90° coaxial light source is located is 45°, and the third preset angle γ between the plane where the third circle of light sources is located and the plane where the light exit surface of the 90° coaxial light source is located is 60°.

[0136] like Fig.10 As shown, Fig.10 It is a schematic diagram of the principle of a coaxial light source in an embodiment of the present application, a 90° coaxial light source 4 coaxial with a camera lens 110 of an industrial camera 100 , and the camera lens 110 photographs an object 5 to be detected.

[0137] In this way, the coaxial light source, the first circle light source, the second circle light source, and the third circle light source correspond to different lighting angles. When the current image recognition rate of the industrial camera 100 does not reach the preset recognition rate target, the lighting angle of the fill light source is adjusted by controlling the coaxial light source, the first circle light source, the second circle light source, and the third circle light source to be turned on or off. In the embodiment of the present application, the coaxial light source, the first circle light source, the second circle light source, and the third circle light source are used as examples for explanation, and are not limited to the coaxial light source, the first circle light source, the second circle light source, and the third circle light source in actual applications.

[0138] See also Fig.11 , Fig.11 for Fig. 9 A schematic diagram of a circuit principle for adjusting the lighting angle of the fill light source under the distribution of the fill light source. When the industrial camera 100 determines that the current image recognition rate does not reach the preset recognition rate target, it can generate a third parameter for adjusting the lighting angle of the fill light source 220 and send it to the control module 210 of the fill light device 200. The control module 210 of the fill light device 200 adjusts the lighting angle of the fill light source according to the third parameter, and the third parameter may include: turning on or off the driving signal of the fill light source located at different angles.

[0139] For example, Fig.11 As shown, when the industrial camera 100 determines that the current image recognition rate does not reach the preset recognition rate target, it sends configuration parameters to the control module 210 of the fill light device 200 through the UART interface or the GPIO interface. The configuration parameters are to control the light source driving circuit 221 of the light source to be turned on in different schemes to send a driving signal to its light-emitting device to turn on ( Fig.11 Each light source driving circuit 221 drives the light source at a preset PWM driving signal frequency or the above-adjusted PWM driving signal frequency ( Fig.11 The medium frequency is fixed), and the light emitting device ( Fig.11 The first circle of light sources 2225, the second circle of light sources 2226, the third circle of light sources 2227 and the coaxial light source 2228) send a start driving signal, or the light source driving circuit 221 sends an analog driving signal ( Fig.11 A linear output is generated in the middle of the light source, and a driving signal for turning on is sent to the light emitting device of the light source to be turned on, so as to achieve fill light for the industrial camera 100 by adjusting the lighting angle of the light source.

[0140] See also Fig.12 , Fig.12 for Fig. 9 A schematic diagram of a specific circuit principle for adjusting the lighting angle of a fill light source under the distribution of the fill light source. Fig.12 The following description will be made by taking the case where the signal sent from the light source driving circuit 221 to the light emitting device 222 is a PWM driving signal. Fig. 9 As shown, the first circle of light sources, the second circle of light sources and the third circle of light sources all contain LED lamp beads in four directions: up, down, left and right. Fig.12 The light source driving circuit 221 for controlling each circle of light sources includes 4 constant current controls to control the LED lamp beads in four directions in each circle of light sources ( Fig.12PWM×4, and the light source driving circuit 221 points to each circle of light sources with 4 lines) to turn on or off, and the light source driving circuit 221 that controls the coaxial light source 2228 controls the coaxial light source 2228 to turn on or off through a digital constant voltage control circuit, wherein the input and output interface ( Fig.12 The specific data of IO_IN×2, IO_OUT×2) can be set according to actual needs.

[0141] See also Fig.13 , Fig.13 This is a structural schematic diagram of a light source control device in an embodiment of the present application. The light source control device provided in an embodiment of the present application is used to control a fill light source for fill light of an industrial camera. The device may include:

[0142] An acquisition module 1301 is used to acquire the current image recognition rate and image quality of the industrial camera;

[0143] A first adjustment module 1302, configured to adjust a driving signal of a fill light source when the image quality does not reach a preset image quality target;

[0144] The second adjustment module 1303 is used to adjust the light source color of the fill light source and / or adjust the lighting angle of the fill light source when the image recognition rate does not reach a preset recognition rate target.

[0145] By using the light source control device provided in the embodiment of the present application, when the current image quality of the industrial camera does not reach the preset image quality target, the driving signal of the fill light source can be adjusted to adjust the signal quality of the light source; and when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, the light source color of the fill light source and / or the lighting angle of the fill light source can be adjusted. By adjusting the color of the light source and / or the lighting angle, the content captured by the industrial camera can be better identified, thereby meeting the higher fill light requirements of the industrial camera, improving the quality of the image collected by the industrial camera, as well as the image recognition rate and recognition accuracy. It can be suitable for scenes where the industrial camera has high requirements on the light source quality, light source color or lighting angle, and has a wider range of applications, and can cope with various stringent requirements on the light source under different objects to be detected, different detection contents and different detection environments, so that the types of objects and contents to be detected are richer and the application prospects are better.

[0146] In a possible implementation manner, the above-mentioned supplementary light source includes: a light source driving circuit and a light emitting device;

[0147] The first adjustment module 1302 is specifically configured to increase the frequency of the PWM driving signal sent by the light source driving circuit to the light emitting device when the image quality does not reach a preset image quality target.

[0148] In a possible implementation, the first adjustment module 1302 is also used to switch the PWM drive signal sent by the light source driving circuit to the light-emitting device to an analog drive signal when the current image quality of the industrial camera still does not reach a preset image quality target after increasing the frequency of the PWM drive signal sent by the light source driving circuit to the light-emitting device.

[0149] In a possible implementation, the above-mentioned supplementary light source includes: a light source driving circuit and a color-variable light-emitting device;

[0150] The second adjustment module 1303 is specifically used to, when the image recognition rate does not reach the preset recognition rate target, respectively use the preset adjustable colors as candidate colors, and control the light source driving circuit to send a driving signal to turn on the candidate color to the color-variable light-emitting device;

[0151] A plurality of first image recognition rates of the industrial camera when the fill light source emits each candidate color are obtained respectively, the candidate color corresponding to the highest first image recognition rate is used as the target color, and the light source driving circuit is controlled to send a driving signal to turn on the target color to the color-variable light-emitting device.

[0152] In a possible implementation, the fill light source includes: a coaxial light source coaxial with the industrial camera and at least one circle of light sources arranged around the coaxial light source; there is a preset interval between the circles of light sources; wherein the planes where the circles of light sources are located have different preset angles with the plane where the light emitting surface of the coaxial light source is located; each preset angle is an acute angle; and the preset angles of the circles of light sources increase from the inside to the outside.

[0153] The second adjustment module 1303 is specifically used to adjust the lighting angle by controlling the coaxial light source and each circle of light sources to turn on or off when the image recognition rate does not reach the preset recognition rate target.

[0154] In a possible embodiment, the at least one circle of light sources includes: a first circle of light sources arranged around the light-emitting surface of the coaxial light source, a second circle of light sources arranged at intervals from the first circle of light sources, and a third circle of light sources arranged at intervals from the second circle of light sources; wherein a first preset angle between a plane where the first circle of light sources is located and a plane where the light-emitting surface of the coaxial light source is located is 30 degrees, a second preset angle between a plane where the second circle of light sources is located and a plane where the light-emitting surface of the coaxial light source is located is 45 degrees, and a third preset angle between a plane where the third circle of light sources is located and a plane where the light-emitting surface of the coaxial light source is located is 60 degrees.

[0155] In a possible implementation manner, the second adjustment module 1303 is specifically used to control the light source driving circuit of the light source to be turned on in the scheme to send a turn-on driving signal to its light-emitting device according to each of the preset multiple lighting angle schemes when the image recognition rate does not reach the preset recognition rate target; wherein each lighting angle scheme is: a scheme for indicating that the light-emitting devices in the coaxial light source and each circle of light sources are turned on;

[0156] A plurality of second image recognition rates of the industrial camera after being illuminated according to each lighting scheme are obtained respectively, and the scheme corresponding to the highest second image recognition rate is taken as the target scheme, and the light source driving circuit of the light source to be turned on in the target scheme is controlled to send a turning-on driving signal to its light-emitting device.

[0157] In a possible implementation, the second adjustment module 1303 is specifically used to adjust the light source color of the fill light source when the image recognition rate does not reach the preset recognition rate target, and obtain the third image recognition rate of the industrial camera after adjusting the light source color of the fill light source; when the third image recognition rate does not reach the preset recognition rate target, adjust the lighting angle of the fill light source; or,

[0158] The lighting angle of the fill light source is adjusted to obtain a fourth image recognition rate of the industrial camera after the lighting angle of the fill light source is adjusted; when the fourth image recognition rate does not reach a preset recognition rate target, the light source color of the fill light source is adjusted.

[0159] In a possible implementation, the fill light source is arranged in a fill light device, and the fill light device further includes: a control module;

[0160] The first adjustment module 1302 is specifically used to generate a first parameter for controlling the driving signal of the fill light source when the image quality does not reach a preset image quality target, and send the first parameter to the control module of the fill light device so that the control module adjusts the driving signal of the fill light source according to the first parameter; the first parameter includes: the frequency of the PWM driving signal, or switching information, and the switching information is used to switch the PWM driving signal to an analog driving signal;

[0161] The above-mentioned second adjustment module 1303 is specifically used to generate a second parameter for adjusting the light source color of the fill light source and / or a third parameter for adjusting the lighting angle of the fill light source when the image recognition rate does not reach a preset recognition rate target, and send them to the control module of the fill light device, so that the control module adjusts the light source color of the fill light source according to the second parameter and / or adjusts the lighting angle of the fill light source according to the third parameter; the second parameter includes: a driving signal for turning on the target color; the third parameter includes: a driving signal for turning on or off the fill light source located at different angles.

[0162] The present application also provides an industrial camera. Fig.14 , the industrial camera 100 includes:

[0163] Camera lens 110;

[0164] A memory 120, for storing computer programs;

[0165] The processor 130 is electrically connected to the external fill light source and is used to implement any of the above-mentioned light source control methods when executing the program stored in the memory to achieve the same technical effect.

[0166] In addition, the industrial camera may further include a communication bus and / or a communication interface, and the processor 130 , the communication interface, and the memory 120 communicate with each other via the communication bus.

[0167] The communication bus mentioned in the above industrial camera can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. 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.

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

[0169] 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.

[0170] The above-mentioned 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.

[0171] The present application also provides a fill light device for filling light for the industrial camera 100. Fig.15 The fill light device 200 includes: a fill light source 220 .

[0172] In one possible implementation, see Fig.15 The above-mentioned fill light device 200 further includes: a control module 210; the above-mentioned fill light source 220 includes: a light source driving circuit and a light emitting device; the above-mentioned control module 210 communicates with the processor 130 in the above-mentioned industrial camera 100;

[0173] The control module 210 is used to receive a first parameter of a driving signal for controlling a fill light source generated by the industrial camera when the current image quality does not reach a preset image quality target, and adjust the driving signal of the fill light source according to the first parameter; and to receive a second parameter for adjusting the light source color of the fill light source and / or a third parameter for adjusting the lighting angle of the fill light source generated by the industrial camera when the current image recognition rate does not reach a preset recognition rate target, and adjust the light source color of the fill light source according to the second parameter and / or adjust the lighting angle of the fill light source according to the third parameter;

[0174] Among them, the first parameter includes: the frequency of the PWM drive signal, or switching information, the switching information is used to switch the PWM drive signal to an analog drive signal; the second parameter includes: the drive signal for turning on the target color sent by the light source drive circuit to the light-emitting device; the third parameter includes: the drive signal for turning on or off sent by the light source drive circuit of the light source to be turned on to its light-emitting device.

[0175] In a possible implementation, the fill light source 220 includes: a coaxial light source coaxial with the industrial camera 100 and at least one circle of light sources arranged around the coaxial light source; there is a preset interval between each circle of light sources; wherein the plane where each circle of light sources is located has a different preset angle with the plane where the light emitting surface of the coaxial light source is located; each preset angle is an acute angle; and the preset angles of each circle of light sources increase from the inside to the outside.

[0176] The control module 210 is used to adjust the lighting angle by controlling the coaxial light source and each circle of light sources to turn on or off.

[0177] In a possible embodiment, the at least one circle of light sources includes: a first circle of light sources arranged around the light-emitting surface of the coaxial light source, a second circle of light sources arranged at intervals from the first circle of light sources, and a third circle of light sources arranged at intervals from the second circle of light sources; wherein a first preset angle between a plane where the first circle of light sources is located and a plane where the light-emitting surface of the coaxial light source is located is 30 degrees, a second preset angle between a plane where the second circle of light sources is located and a plane where the light-emitting surface of the coaxial light source is located is 45 degrees, and a third preset angle between a plane where the third circle of light sources is located and a plane where the light-emitting surface of the coaxial light source is located is 60 degrees.

[0178] The present application also provides a machine vision system. Fig.16 The machine vision system 600 includes: the above-mentioned industrial camera 100 and any one of the above-mentioned fill light devices 200 .

[0179] 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, the steps of any of the above light source control methods are implemented.

[0180] 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 of the light source control methods in the above embodiments.

[0181] 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 integrated. 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.

[0182] 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.

[0183] 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 device / industrial camera / fill light device / machine vision system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0184] 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 control method, characterized in that: The method is used to control a fill light source for fill light of an industrial camera, and the method comprises: Obtain the current image recognition rate and image quality of the industrial camera; When the image quality does not reach a preset image quality target, adjusting a driving signal of the fill light source; When the image recognition rate does not reach a preset recognition rate target, the light source color of the fill light source is adjusted and / or the lighting angle of the fill light source is adjusted.

2. The method according to claim 1, characterized in that The fill light source comprises: a light source driving circuit and a light emitting device; The step of adjusting the driving signal of the fill light source comprises: The frequency of the PWM driving signal sent by the light source driving circuit to the light emitting device is increased.

3. The method according to claim 2, characterized in that The step of adjusting the driving signal of the fill light source further includes: After increasing the frequency of the PWM driving signal sent by the light source driving circuit to the light-emitting device, if the current image quality of the industrial camera still does not reach the preset image quality target, the PWM driving signal sent by the light source driving circuit to the light-emitting device is switched to an analog driving signal.

4. The method according to claim 1, characterized in that: The fill light source comprises: a light source driving circuit and a light emitting device with variable color; The step of adjusting the light source color of the fill light source comprises: respectively taking the preset adjustable colors as candidate colors, and controlling the light source driving circuit to send a driving signal for turning on the candidate colors to the color-variable light-emitting device; A plurality of first image recognition rates of the industrial camera when the fill light source emits each candidate color are obtained respectively, the candidate color corresponding to the highest first image recognition rate is used as the target color, and the light source driving circuit is controlled to send a driving signal to the color-variable light-emitting device to turn on the target color.

5. The method according to claim 1, characterized in that The fill light source includes: a coaxial light source coaxial with the industrial camera and at least one circle of light sources arranged around the coaxial light source; there is a preset interval between the circles of light sources; wherein the planes where the circles of light sources are located have different preset angles with the plane where the light emitting surface of the coaxial light source is located; each preset angle is an acute angle; and the preset angles of the circles of light sources increase from the inside to the outside. The step of adjusting the lighting angle of the fill light source includes: adjusting the lighting angle by controlling the coaxial light source and each circle of light sources to be turned on or off.

6. The method according to claim 5, characterized in that The step of adjusting the lighting angle of the fill light source includes: According to each of the preset multiple lighting angle schemes, the light source driving circuit of the light source to be turned on in the scheme is controlled to send a turning-on driving signal to its light-emitting device; wherein each lighting angle scheme is: a scheme for indicating that the light-emitting devices in the coaxial light source and each circle of light sources are turned on; A plurality of second image recognition rates of the industrial camera after lighting according to each scheme are obtained respectively, and the scheme corresponding to the highest second image recognition rate is taken as the target scheme, and the light source driving circuit of the light source to be turned on in the target scheme is controlled to send a turning-on driving signal to its light-emitting device.

7. The method according to claim 1, characterized in that The steps of adjusting the light source color of the fill light source and adjusting the lighting angle of the fill light source include: Adjust the light source color of the fill light source to obtain the third image recognition rate of the industrial camera after adjusting the light source color of the fill light source; if the third image recognition rate does not reach a preset recognition rate target, adjust the lighting angle of the fill light source; or, Adjust the lighting angle of the fill light source to obtain a fourth image recognition rate of the industrial camera after adjusting the lighting angle of the fill light source; if the fourth image recognition rate does not reach a preset recognition rate target, adjust the light source color of the fill light source.

8. The method according to claim 1, characterized in that The fill light source is arranged in a fill light device, and the fill light device further comprises: a control module; The step of adjusting the driving signal of the fill light source when the image quality does not reach a preset image quality target comprises: In the case that the image quality does not reach the preset image quality target, a first parameter for controlling the driving signal of the fill light source is generated and sent to the control module of the fill light device, so that the control module adjusts the driving signal of the fill light source according to the first parameter; the first parameter includes: the frequency of the PWM driving signal, or switching information, and the switching information is used to switch the PWM driving signal to an analog driving signal; When the image recognition rate does not reach a preset recognition rate target, the step of adjusting the light source color of the fill light source and / or adjusting the lighting angle of the fill light source comprises: When the image recognition rate fails to reach a preset recognition rate target, a second parameter for adjusting the light source color of the fill light source and / or a third parameter for adjusting the lighting angle of the fill light source are generated and sent to a control module of the fill light device, so that the control module adjusts the light source color of the fill light source according to the second parameter and / or adjusts the lighting angle of the fill light source according to the third parameter; the second parameter includes: a driving signal for turning on the target color; the third parameter includes: a driving signal for turning on or off the fill light source located at different angles.

9. A light source control device, characterized in that: The device is used to control a fill light source for filling light for an industrial camera, and the device comprises: An acquisition module, used to acquire the current image recognition rate and image quality of the industrial camera; A first adjustment module, configured to adjust a driving signal of a fill light source when the image quality does not reach a preset image quality target; The second adjustment module is used to adjust the light source color of the fill light source and / or adjust the lighting angle of the fill light source when the image recognition rate does not reach a preset recognition rate target.

10. An industrial camera, characterized in that: include: Camera lens; Memory, used to store computer programs; A processor is electrically connected to an external fill light source; When used to execute a program stored in a memory, the method described in any one of claims 1 to 8 is implemented.

11. A fill light device, characterized in that: Used to provide fill light for the industrial camera described in claim 10; comprising a fill light source.

12. The fill light device according to claim 11, characterized in that: The fill light device further includes a control module; the fill light source includes: a light source driving circuit and a light emitting device; the control module communicates with a processor in the industrial camera; The control module is used to receive a first parameter of a driving signal for controlling a fill light source generated by the industrial camera when the current image quality does not reach a preset image quality target, and adjust the driving signal of the fill light source according to the first parameter; and is used to receive a second parameter for adjusting a light source color of the fill light source and / or a third parameter for adjusting a lighting angle of the fill light source generated by the industrial camera when the current image recognition rate does not reach a preset recognition rate target, and adjust the light source color of the fill light source according to the second parameter and / or adjust the lighting angle of the fill light source according to the third parameter; Among them, the first parameter includes: the frequency of the PWM drive signal, or switching information, and the switching information is used to switch the PWM drive signal to an analog drive signal; the second parameter includes: the drive signal for turning on the target color sent by the light source drive circuit to the light-emitting device; the third parameter includes: the drive signal for turning on or off sent by the light source drive circuit of the light source to be turned on to its light-emitting device.

13. The fill light device according to claim 12, characterized in that: The fill light source includes: a coaxial light source coaxial with the industrial camera and at least one circle of light sources arranged around the coaxial light source; there is a preset interval between each circle of light sources; wherein the plane where each circle of light sources is located has a different preset angle with the plane where the light emitting surface of the coaxial light source is located; each preset angle is an acute angle; and the preset angles of each circle of light sources increase from the inside to the outside; The control module is used to adjust the lighting angle by controlling the coaxial light source and the respective circles of light sources to turn on or off.

14. A machine vision system comprising: The industrial camera according to claim 10 and the fill light device according to any one of claims 11 to 13.

Citation Information

Patent Citations

  • Information acquisition device and method, inspection robot and storage medium

    CN110460782A

  • Light supplement control method, light supplement control module and unmanned aerial vehicle

    CN113141472A

  • Light supplementing method, light supplementing device and scanning pen

    CN116152811A

  • Printed circuit board detection positioning method and device, electronic equipment and storage medium

    CN116188447A

  • Self-adapting lighting source apparatus based on machine vision system feature model

    CN201145154Y