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

By adjusting the driving signal frequency, light source color, and illumination angle of the supplementary light source, the problem that the existing light source adjustment methods cannot meet the needs of demanding scenarios is solved, achieving high-quality images and improved recognition rates, and making it suitable for various detection environments.

CN121728358APending Publication Date: 2026-03-24HANGZHOU HIKROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-28
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies, in terms of light source adjustment, cannot meet the requirements of scenarios with demanding light source requirements, such as when the objects to be detected are small or densely packed, and cannot meet the supplementary lighting needs, resulting in insufficient image quality and recognition rate.

Method used

By adjusting the drive signal frequency, light source color, and illumination angle of the supplementary light source, including increasing the PWM drive signal frequency, switching to an analog drive signal, selecting the optimal light source color, and adjusting the light source angle, the requirements for high-quality images and recognition rates can be met.

Benefits of technology

It improves the image quality and recognition rate of industrial cameras in scenarios with high requirements for light source quality, adapts to the demanding requirements of different objects and environments, and expands the scope of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121728358A_ABST
    Figure CN121728358A_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

[0001] This application is a divisional application of Chinese Patent Application No. 202310783631.4, filed on June 28, 2023, entitled "Light Source Control Method, Apparatus, Camera, Lighting Equipment and Machine Vision System", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of supplementary lighting technology for industrial cameras, and in particular to a light source control method, device, camera, supplementary lighting equipment, and machine vision system. Background Technology

[0003] Currently, in the field of machine vision, to detect objects, the first step is to use an industrial camera to acquire images of the object to be detected—that is, to take pictures of the object. Then, image recognition is performed based on the acquired images to obtain the detection results. It is evident that acquiring high-quality images is one of the most important conditions for obtaining accurate recognition results. Among these factors, the lighting of the shooting scene is a significant factor affecting image quality, directly impacting the effectiveness of image recognition. Therefore, when ambient light is insufficient, supplementary lighting is typically used.

[0004] In related technologies, the light source is adjusted to improve the image quality captured by industrial cameras. Specifically, the exposure time of the light source can be adjusted according to the moving speed of the object being 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 light source illumination and the brightness of the light source can be adjusted. Typically, when the moving speed of the object being detected by the camera is determined to be fast or the sampling frequency of the industrial camera is high, the exposure time of the light source is increased to prolong the period of light source illumination; or when the light is weak, the driving current of the light source is increased to increase the brightness of the light source.

[0005] However, for scenarios with stringent requirements for on-site lighting, such as when the object to be detected is small or the objects are arranged very closely, adjusting the light source by changing the exposure time or the driving current of the light source still cannot meet the supplementary lighting needs. Summary of the Invention

[0006] The purpose of this application is to provide a light source control method, device, camera, supplementary lighting equipment, and machine vision system to meet higher supplementary lighting requirements. The specific technical solution is as follows:

[0007] In a first aspect, embodiments of this application provide a light source control method for controlling a supplementary lighting source used to provide supplementary lighting for an industrial camera, the method comprising:

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

[0009] If the image quality does not meet the preset image quality target, adjust the driving signal of the supplementary light source;

[0010] If the image recognition rate does not reach the preset recognition rate target, adjust the color of the supplementary light source and / or adjust the illumination angle of the supplementary light source.

[0011] In one possible implementation, the supplementary light source includes: a light source driving circuit and a light-emitting device;

[0012] The step of adjusting the driving signal of the supplementary light source includes:

[0013] Increase the frequency of the PWM drive signal sent from the light source drive circuit to the light-emitting device.

[0014] In one possible implementation, the step of adjusting the driving signal of the supplementary light source further includes:

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

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

[0017] The step of adjusting the color of the supplementary light source includes:

[0018] Each preset adjustable color is used as a candidate color, and the light source driving circuit is controlled to send a driving signal to the color-variable light-emitting device to activate the candidate color.

[0019] The industrial camera obtains multiple first image recognition rates when the supplementary light source emits each candidate color. The candidate color corresponding to the highest first image recognition rate is taken 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.

[0020] In one possible implementation, the supplementary light source includes: a coaxial light source coaxial with the industrial camera and at least one ring of light sources arranged around the coaxial light source; there is a preset interval between each ring of light sources; wherein, the plane where each ring 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 ring of light sources increase sequentially from the inside to the outside.

[0021] The step of adjusting the illumination angle of the supplementary light source includes: adjusting the illumination angle by controlling the opening or closing of the coaxial light source and each ring of light sources.

[0022] In one possible implementation, the step of adjusting the illumination angle of the supplementary light source includes:

[0023] 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 an on drive signal to its light-emitting device; wherein, each lighting angle scheme is a scheme used to indicate that the light-emitting device in the coaxial light source and each ring of light sources is turned on.

[0024] Multiple second image recognition rates of the industrial camera are obtained after each lighting scheme. The scheme with the highest second image recognition rate is taken as the target scheme. The light source driving circuit of the light source to be turned on in the target scheme sends an on drive signal to its light-emitting device.

[0025] In one possible implementation, the steps of adjusting the color of the supplementary light source and adjusting the illumination angle of the supplementary light source include:

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

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

[0028] In one possible implementation, the supplementary light source is disposed in the supplementary lighting device, and the supplementary lighting device further includes: a control module;

[0029] The step of adjusting the driving signal of the supplementary light source when the image quality does not meet the preset image quality target includes:

[0030] If the image quality does not meet the preset image quality target, a first parameter is generated to control the drive signal of the supplementary light source, and sent to the control module of the supplementary light device, so that the control module adjusts the drive signal of the supplementary light source according to the first parameter; the first parameter includes: the frequency of the PWM drive signal, or switching information, the switching information being used to switch the PWM drive signal to an analog drive signal;

[0031] The step of adjusting the color of the supplementary light source and / or adjusting the illumination angle of the supplementary light source when the image recognition rate does not reach the preset recognition rate target includes:

[0032] If the image recognition rate does not reach the preset recognition rate target, a second parameter for adjusting the color of the supplementary light source and / or a third parameter for adjusting the illumination angle of the supplementary light source are generated and sent to the control module of the supplementary lighting device, so that the control module adjusts the color of the supplementary light source according to the second parameter and / or adjusts the illumination angle of the supplementary light source according to the third parameter; the second parameter includes: a drive signal to turn on the target color; the third parameter includes: a drive signal to turn on or off the supplementary light source located at different angles.

[0033] Secondly, embodiments of this application provide a light source control device for controlling a supplementary lighting source used to provide supplementary lighting for an industrial camera. The device includes:

[0034] The acquisition module is used to acquire the current image recognition rate and image quality of the industrial camera;

[0035] The first adjustment module is used to adjust the driving signal of the supplementary light source when the image quality does not meet the preset image quality target.

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

[0037] Thirdly, embodiments of this application provide an industrial camera, including:

[0038] Camera lens;

[0039] Memory, used to store computer programs;

[0040] The processor is electrically connected to an external supplementary lighting source; when executing a program stored in the memory, it implements any of the above-described light source control methods.

[0041] Fourthly, embodiments of this application provide a supplementary lighting device for supplementing the lighting of the industrial camera described above; including a supplementary lighting source.

[0042] In one possible implementation, the supplementary lighting device further includes a control module; the supplementary lighting source includes: a light source driving circuit and a light-emitting device; the control module communicates with the processor in the industrial camera;

[0043] The control module is configured to receive a first parameter generated by the industrial camera to control the drive signal of the supplementary light source when the current image quality does not reach a preset image quality target, and adjust the drive signal of the supplementary light source according to the first parameter; and to receive a second parameter and / or a third parameter generated by the industrial camera to adjust the light source color and / or the lighting angle of the supplementary light source when the current image recognition rate does not reach a preset recognition rate target, and adjust the light source color and / or the lighting angle of the supplementary light source according to the second parameter and / or the lighting angle of the supplementary light source according to the third parameter.

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

[0045] In one possible implementation, the supplementary light source includes: a coaxial light source coaxial with the industrial camera and at least one ring of light sources arranged around the coaxial light source; there is a preset interval between each ring of light sources; wherein, the plane where each ring 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; the preset angles of each ring of light sources increase sequentially from the inside to the outside.

[0046] The control module is used to adjust the lighting angle by controlling the opening or closing of the coaxial light source and each ring of light sources.

[0047] Fifthly, embodiments of this application provide a machine vision system, including: the industrial camera described above and any of the supplementary lighting devices described above.

[0048] Beneficial effects of the embodiments in this application:

[0049] This application provides a light source control method, device, camera, supplementary lighting equipment, and machine vision system. When the current image quality of an industrial camera does not meet a preset image quality target, the driving signal of the supplementary lighting source can be adjusted to improve the signal quality of the light source, thereby meeting the higher supplementary lighting requirements of the industrial camera, improving the image quality and image recognition rate. This is suitable for scenarios where industrial cameras have high requirements for light source quality. Furthermore, when the current image recognition rate of the industrial camera does not meet a preset recognition rate target, the color of the supplementary lighting source and / or the lighting angle of the supplementary lighting source can be adjusted. By adjusting the color and / or lighting angle of the light source, the content captured by the industrial camera can be better recognized, thereby meeting the higher supplementary lighting requirements of the industrial camera, improving the image quality, image recognition rate, and recognition accuracy. This is applicable to scenarios where industrial cameras have high requirements for light source color or lighting angle, and has a wider range of applications.

[0050] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0052] Figure 1 This is a schematic diagram illustrating the principle architecture of the light source control method according to an embodiment of this application;

[0053] Figure 2 This is a schematic flowchart of a light source control method provided in an embodiment of this application;

[0054] Figure 3 Another schematic flowchart of the light source control method provided in the embodiments of this application;

[0055] Figure 4 This is a schematic diagram of the circuit principle for adjusting the driving signal of the supplementary light source in an embodiment of this application;

[0056] Figure 5 This is a schematic diagram of a circuit principle for adjusting the color of the supplementary light source in an embodiment of this application;

[0057] Figure 6 This is a schematic diagram of another circuit principle for adjusting the color of the supplementary light source in an embodiment of this application;

[0058] Figure 7 This is a schematic diagram of a specific circuit principle for adjusting the color of the supplementary light source in an embodiment of this application;

[0059] Figure 8 This is a schematic diagram of another specific circuit principle for adjusting the color of the supplementary light source in the embodiments of this application;

[0060] Figure 9 This is a schematic diagram showing the distribution of supplementary lighting sources in an embodiment of this application;

[0061] Figure 10 This is a schematic diagram of a coaxial light source in one embodiment of this application;

[0062] Figure 11 for Figure 9 A schematic diagram of a circuit principle for adjusting the illumination angle of a supplementary light source under the distribution of supplementary light sources;

[0063] Figure 12 for Figure 9 A schematic diagram of a specific circuit principle for adjusting the illumination angle of the supplementary light source under the distribution of supplementary light sources;

[0064] Figure 13 This is a schematic diagram of a light source control device in one embodiment of this application;

[0065] Figure 14 This is a schematic diagram of the structure of an industrial camera in an embodiment of this application;

[0066] Figure 15 This is a schematic diagram of a supplementary lighting device in one embodiment of this application;

[0067] Figure 16 This is a schematic diagram of a machine vision system in an embodiment of this application. Detailed Implementation

[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0069] In related technologies, the quality of images captured by industrial cameras is improved by adjusting the exposure time or driving current of the light source. However, this method is only applicable to scenarios where the exposure time or brightness of the light source is critical, and cannot be applied to scenarios with higher requirements for light source quality. To address the problem of improving the quality and image recognition rate of images captured by industrial cameras in the field of machine vision to meet higher supplementary lighting needs, embodiments of this application provide a light source control method, device, camera, supplementary lighting equipment, and machine vision system.

[0070] See Figure 1 , Figure 1 This is a schematic diagram illustrating the principle architecture of the light source control method according to an embodiment of this application. Figure 1 As shown, this application embodiment targets 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 supplementary light source or adjusting the output control mode of the light source driving circuit to reduce ripple; and / or adjusting the light source color 2, i.e., adjusting the wavelength of the light source; and / or adjusting the illumination angle 3, i.e., controlling the switching of light sources at different angles, it can meet the various demanding light source requirements of different objects to be detected, different detection contents, and different detection environments, satisfy the acquisition of high-quality images in different scenarios, broaden the application scenarios, enrich the types of objects and contents to be detected, and improve the application prospects.

[0071] The light source control method provided in this application will be described in detail below through specific embodiments.

[0072] In one embodiment, see Figure 2 , Figure 2 This is a schematic flowchart of a light source control method provided in an embodiment of this application. The method is used to control a supplementary lighting source for an industrial camera, including:

[0073] S201, obtains the current image recognition rate and image quality of the industrial camera.

[0074] If the image quality does not meet the preset image quality target, execute S202 to adjust the drive signal of the supplementary light source.

[0075] If the image recognition rate does not reach the preset recognition rate target, execute S203 to adjust the light source color of the supplementary light source and / or execute S204 to adjust the lighting angle of the supplementary light source.

[0076] In one specific embodiment, the light source color may include red, blue, green, white, and combinations of these four colors; the lighting angle can be preset according to the application scenario, for example, it may include 90°, 30°, 45°, and 60°, or 20°, 40°, and 65°; the preset recognition rate target can be set according to actual needs.

[0077] The light source control method provided in this application can adjust the driving signal of the supplementary light source to adjust the signal quality of the light source when the current image quality of the industrial camera does not meet the preset image quality target; and adjust the light source color and / or the illumination angle of the supplementary light source when the current image recognition rate of the industrial camera does not meet the preset recognition rate target. By adjusting the color and / or illumination angle of the light source, the content captured by the industrial camera can be better identified, thereby meeting the higher supplementary lighting requirements of the industrial camera, improving the quality of the images acquired by the industrial camera, as well as the image recognition rate and recognition accuracy. It can be applied to scenarios where industrial cameras have high requirements for light source quality, light source color, or illumination angle, and has a wider range of applications. It can also cope with various demanding requirements for light sources for different objects to be detected, different detection contents, and different detection environments, making the types of objects and contents to be detected more diverse and the application prospects better.

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

[0079] In another embodiment, see Figure 3 , Figure 3 This is another schematic flowchart illustrating the light source control method provided in this application embodiment. The method is applied to an industrial camera and includes the following steps:

[0080] S301 obtains the current image recognition rate and image quality of the industrial camera.

[0081] The recognition rate represents the percentage of correctly recognized inputs out of the total number of recognized inputs. In this embodiment, the image recognition rate represents the percentage of images captured by an industrial camera that can be recognized out of all captured images. It can be used to measure the performance of an industrial camera; a higher image recognition rate indicates better performance. Image quality indicates the quality of an image or the degree of image distortion. It can be evaluated using various metrics such as resolution, sharpness, peak signal-to-noise ratio (PSNR), and mean square error (MSE). It can also be evaluated using metrics such as whether the image is clear and free of noise, or whether it has water ripples.

[0082] In this embodiment, the industrial camera can acquire 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 without supplementary lighting operation, or the image recognition rate and image quality with supplementary lighting operation.

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

[0084] S302, determine whether the image quality meets the preset image quality target, and determine whether the image recognition rate meets the preset recognition rate target.

[0085] Some application scenarios have stringent requirements for on-site light sources, with preset recognition rate targets potentially reaching over 95%, and preset image quality targets requiring images to be free of noise and water ripples.

[0086] If the image quality does not meet the preset image quality target, proceed to step S303; if the image recognition rate does not meet the preset recognition rate target, proceed to step S305 and / or proceed to step S307.

[0087] S303 increases the frequency of the PWM drive signal sent from the light source drive circuit to the light-emitting device.

[0088] A typical supplementary lighting source includes a light source driver 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 in which the light source driver circuit drives the light-emitting device to emit light: PWM (pulse pulse) digital signal drive or analog signal drive.

[0089] The inventors of this application have discovered that the lower the frequency of the PWM drive signal, the more prone the image is to showing water ripples. Therefore, in this step, the quality of the light source can be improved by increasing the frequency of the PWM drive signal sent from the light source drive circuit to the light-emitting device.

[0090] In this embodiment, increasing the frequency of the PWM drive signal can be done gradually or by adjusting it according to a preset step size, etc. For example, if the current image quality of the industrial camera is noisy or has water ripples, failing to meet the preset image quality target, then the frequency of the PWM drive signal of the digital light source controller in the light source drive circuit of the supplementary light source is increased, for example, from the original 20kHz to 40kHz or higher, to adjust the control frequency of the supplementary light source and eliminate noise or water ripples in the acquired image.

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

[0092] After supplementing light by increasing the frequency of the PWM drive signal sent from the light source driver circuit to the light-emitting device, the image quality of the image captured by the industrial camera still does not meet the preset image quality target. In other words, if adjusting the control frequency cannot meet the image quality requirements of the captured image, the PWM drive signal sent from the light source driver circuit to the light-emitting device is switched to an analog drive signal. That is, the mode in which the light source driver circuit drives the light-emitting device to emit light is switched from digital signal drive to analog signal drive. This ensures the signal quality of the light source and eliminates noise or water ripples in the captured image. It is suitable for scenarios with high requirements for light source quality.

[0093] S305 uses preset adjustable colors as candidate colors and controls the light source driving circuit to send a driving signal to the color-variable light-emitting device to activate the candidate colors.

[0094] S306: Obtain multiple first image recognition rates of the industrial camera when each candidate color is emitted by the supplementary light source, 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 the color-variable light-emitting device to turn on the target color.

[0095] In one possible implementation, the aforementioned supplementary lighting source includes: a light source driving circuit and a color-variable light-emitting device. For example, 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 below 90%, while the preset recognition rate target is not less than 95%, then the current image recognition rate of the industrial camera has not reached the preset recognition rate target.

[0096] At this point, red, blue, green, and white are selected as candidate colors, and the light source driving circuit is controlled to send a driving signal to the color-variable light-emitting device to activate the candidate colors. The first image recognition rate of the industrial camera is 99% when the supplementary light source emits red light, 95% when the supplementary light source emits blue light, 80% when the supplementary light source emits green light, and 85% when the supplementary light source emits white light. The candidate color corresponding to the highest first image recognition rate of 99%, i.e., red, is selected 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 activate the red light source.

[0097] In one example, the control of the light source driving circuit to send a drive signal to the color-variable light-emitting device to activate a candidate color may also include: activation duration, activation frequency, etc. The output control mode of the control of the light source driving circuit to send a drive signal to the color-variable light-emitting device to activate a target color can be a pre-set frequency of the PWM drive signal or an analog drive signal, or it can be the frequency of the PWM drive signal or the analog drive signal adjusted in step S303 or step S304 above.

[0098] In this embodiment, when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, the color of the supplementary light source is adjusted, that is, the wavelength of the light source is adjusted, to supplement the industrial camera. The light source color corresponding to the highest image recognition rate after supplementary lighting is selected as the recognition light source for the object or content to be recognized, so as to achieve better matching of the object or content to be recognized, thereby improving the image recognition rate and recognition accuracy of the industrial camera while improving the quality of the images acquired by the industrial camera.

[0099] S307 controls the light source driving circuit of the light source to be turned on to send an activation driving signal to its light-emitting device according to each of the preset multiple lighting angle schemes.

[0100] In one possible implementation, the aforementioned supplementary lighting source includes: a coaxial light source coaxial with the industrial camera and at least one ring of light sources arranged around the coaxial light source; each ring of light sources has a preset interval. The plane containing each ring of light sources has a different preset angle with the plane containing the light-emitting surface of the coaxial light source; each preset angle is acute; the preset angles of each ring of light sources increase sequentially from the inside out.

[0101] In this case, the industrial camera adjusts the lighting angle by controlling the coaxial light source and the light sources in each ring to turn on or off. Accordingly, each lighting angle scheme is a scheme used to indicate that the light-emitting devices in the coaxial light source and each ring of light sources are turned on.

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

[0103] Table 1 Examples of preset lighting angle schemes

[0104] S308 obtains multiple second image recognition rates of the industrial camera after lighting according to each scheme, takes the scheme with the highest second image recognition rate as the target scheme, and controls the light source driving circuit of the light source to be turned on in the target scheme to send an on drive signal to its light-emitting device.

[0105] In one example, when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, the light source driving circuit of the light source to be turned on in different schemes is controlled to send an on drive signal to its light-emitting device. 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%, and so on. 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 an on drive signal to its light-emitting device.

[0106] In this embodiment, when the current image recognition rate of the industrial camera does not reach the preset recognition rate target, the light source driving circuit of the light source to be turned on in different schemes is controlled to send the turn-on driving signal to its light-emitting device, that is, the light source at different angles is switched to realize the supplementary lighting of the industrial camera, so as to better match the placement position of different objects to be recognized and the installation position of different cameras, thereby improving the image quality of the images acquired by the industrial camera and improving the image recognition rate and recognition accuracy of the camera.

[0107] Figure 3 In the illustrated embodiment, after step S306, where the control light source driving circuit sends a drive signal to the color-variable light-emitting device to activate the target color for supplementary lighting of the industrial camera, 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 has reached the preset recognition rate target. If the current image recognition rate reaches the preset recognition rate target, the adjustment of the light source ends; if 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 color of the supplementary light source and then adjusting the lighting angle. In other words, the color of the supplementary light source can be adjusted first to obtain the third image recognition rate of the industrial camera after adjusting the color of the supplementary light source; then, if the third image recognition rate does not reach the preset recognition rate target, the lighting angle of the supplementary light source is adjusted for light source control.

[0108] Those skilled in the art will understand that, in other embodiments, after the light source driving circuit of the light source to be turned on sends an on drive signal to its light-emitting device to provide supplementary lighting for the industrial camera in step S308, 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 has reached the preset recognition rate target. If the current image recognition rate has reached the preset recognition rate target, the adjustment of the light source ends; if the current image recognition rate has not reached the preset recognition rate target, step S305 is executed. That is, if the image recognition rate of the industrial camera has not reached the preset recognition rate target, the light source can be controlled by first adjusting the illumination angle of the supplementary light source and then adjusting the color of the light source. In other words, the illumination angle of the supplementary light source can be adjusted first to obtain the fourth image recognition rate of the industrial camera after adjusting the illumination angle of the supplementary light source; then, if the fourth image recognition rate has not reached the preset recognition rate target, the color of the supplementary light source can be adjusted.

[0109] It should be noted that, Figure 3 In the illustrated embodiment, although the step of adjusting the quality of the drive signal is written first, in actual applications, there is no necessary order of execution between the three adjustment methods: adjusting the quality of the drive signal of the supplementary light source, adjusting the color of the supplementary light source, and adjusting the illumination angle of the supplementary light source. They can even be processed in parallel. Alternatively, depending on the actual scenario requirements, only one or two of these methods can be executed to adjust the supplementary light source.

[0110] For example, in application scenarios where the light source quality requirements are not very high, only two adjustments are needed: light source color adjustment and illumination angle adjustment. Alternatively, in application scenarios where the light source color requirements are not high, only the drive signal quality and illumination angle can be adjusted. Or, in application scenarios where the illumination angle requirements are not high, only the drive signal quality and light source color can be adjusted. Or, for the specific application scenario, only one adjustment method can be performed. All of these can be flexibly set according to the actual situation of the application scenario.

[0111] The light source control method provided in this application can adjust the driving signal of the supplementary light source to adjust the signal quality of the light source when the current image quality of the industrial camera does not meet the preset image quality target; and adjust the light source color and / or the illumination angle of the supplementary light source when the current image recognition rate of the industrial camera does not meet the preset recognition rate target. By adjusting the color and / or illumination angle of the light source, the content captured by the industrial camera can be better identified, thereby meeting the higher supplementary lighting requirements of the industrial camera, improving the quality of the images acquired by the industrial camera, as well as the image recognition rate and recognition accuracy. It can be applied to scenarios where industrial cameras have high requirements for light source quality, light source color, or illumination angle, and has a wider range of applications. It can also cope with various demanding requirements for light sources for different objects to be detected, different detection contents, and different detection environments, making the types of objects and contents to be detected more diverse and the application prospects better.

[0112] The following provides a detailed explanation from a hardware circuit perspective of how to adjust the driving signal of the supplementary light source, how to adjust the color of the supplementary light source, and how to adjust the illumination angle of the supplementary light source in the embodiments of this application.

[0113] First, from the perspective of hardware circuitry, we will explain in detail how to adjust the driving signal of the supplementary light source.

[0114] See Figure 4 , Figure 4 This is a schematic diagram of the circuit principle for adjusting the driving signal of the supplementary light source in an embodiment of this application. Figure 4 As shown, a supplementary light source 220 is disposed in a supplementary lighting device 200, which also includes a control module 210. The supplementary 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 supplementary lighting device 200 via a Universal Asynchronous Receiver / Transmitter (UART) or a General-purpose Input / Output (GPIO) triggered method.

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

[0116] Specifically, the control module 210 may be a microcontroller unit (MCU). Figure 4 The light source driving circuit 221 in the supplementary lighting source 220 is powered by a 24V, 12V, or 5V power supply. When the industrial camera 100 determines that the current image quality does not meet the preset image quality target, it uses the UART interface (… Figure 4 UART communication or GPIO interface ( Figure 4 (GPIO trigger), sends a signal to the control module 210 of the supplementary lighting 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 (GPIO trigger), Figure 4 The control parameters of the PWM control are adjusted to control the frequency of the PWM drive signal sent from the light source drive circuit 221 to the light-emitting device 222. Figure 4 (Medium frequency adjustment) enables supplemental lighting of the industrial camera 100 by adjusting the quality of the light source.

[0117] Furthermore, after determining to increase the frequency of the PWM drive signal sent by the light source drive 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 supplementary lighting device 200 via the UART interface or GPIO interface to switch the PWM drive signal sent by the light source drive circuit 221 to the light-emitting device 222 to an analog drive signal. Figure 4 The control parameters of the digital-to-analog converter (DAC) are adjusted to convert the drive signal sent from the light source drive circuit 221 to the light-emitting device 222 into an analog drive signal. Figure 4 (Medium linear output) enables supplemental lighting of the industrial camera 100 by adjusting the quality of the light source.

[0118] Secondly, from the perspective of hardware circuitry, a detailed explanation is given on how to adjust the color of the supplementary light source.

[0119] See Figure 5 , Figure 5 This is a schematic diagram illustrating a circuit principle for adjusting the color of a supplementary light source in an embodiment of this application. To achieve adjustable light source color, Figure 5 The light-emitting device 222 in the supplementary light source 220 is a color-variable light-emitting device.

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

[0121] Among them, the color-variable light-emitting device 222 refers to a light-emitting device capable of emitting different colors of light, and the preset adjustable colors can be, for example, red, blue, green, white, and combinations of these four colors. For example, Figure 5 As shown, when the industrial camera 100 determines that the current image recognition rate has not reached the preset recognition rate target, it sends configuration parameters to the control module 210 of the supplementary lighting device 200 via a UART interface or a GPIO interface. These configuration parameters control the light source driving circuit 221 to send a driving signal to the color-variable light-emitting device 222 to activate the candidate color. Figure 5 (Intermediate switch control), specifically, the light source driving circuit 221 uses a preset PWM drive signal frequency or the frequency of the aforementioned adjusted PWM drive signal ( Figure 5 (with a fixed mid-frequency), a drive signal to activate candidate colors is sent to the color-variable light-emitting device 222, or the light source driving circuit 221 uses an analog drive signal ( Figure 5 The light source 222 sends a drive signal to activate the candidate color to the color-variable light-emitting device 222. Then, the industrial camera 100 determines the candidate color with the highest image recognition rate when the supplementary light source 220 emits each candidate color as the target color. Subsequently, it sends a drive signal to activate the target color to the control module 210 of the supplementary lighting device 200 via a UART or GPIO interface, thereby adjusting the wavelength of the light source to provide supplementary lighting to the industrial camera 100.

[0122] See Figure 6 , Figure 6 This is a schematic diagram of another circuit principle for adjusting the color of the supplementary light source in an embodiment of this application. In one possible implementation, such as Figure 6 As shown, the supplementary 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 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 has not reached the preset recognition rate target, it can generate a second parameter for adjusting the light source color of the supplementary light source 220, and send it to the control module 210 of the supplementary lighting device 200 via a UART interface or a GPIO interface. The control module 210 of the supplementary lighting device 200 adjusts the light source color of the supplementary light source according to the second parameter, which may include a drive signal to turn 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 drive signal to the control module 210 of the supplementary lighting device 200 via the UART interface or GPIO interface to control the light source driving circuit 221 to send an on drive signal to its single-color light-emitting device 222. Then, it acquires multiple fifth image recognition rates of the industrial camera 100 when the supplementary light source 220 emits different colors, takes the color corresponding to the highest fifth image recognition rate as the target color, and sends a drive signal to the control module 210 of the supplementary lighting device 200 via the UART interface or GPIO interface to control the light source driving circuit 221 to send an on drive 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 light bead that can emit different colors of light, such as red, blue, green, white, etc.

[0126] For example, such as Figure 6 As shown, when the industrial camera 100 determines that the current image recognition rate has not reached the preset recognition rate target, it sends configuration parameters to the control module 210 of the supplementary lighting device 200 via the UART interface or GPIO interface. These configuration parameters control the light source driving circuit 221 to send an activation drive signal to each single-color light-emitting device 222. Figure 6 (Intermediate switch control), each light source drive circuit 221 operates at a preset PWM drive signal frequency or the frequency of the aforementioned adjusted PWM drive signal ( Figure 6 (Medium frequency fixed), to a single color light-emitting device 222 ( Figure 6 The red light-emitting device 2221, blue light-emitting device 2222, green light-emitting device 2223, and white light-emitting device 2224 send an activation drive signal, or the light source driving circuit 221 sends an analog drive signal ( Figure 6 (Medium linear output) sends an on drive signal to a single-color light-emitting device 222 to achieve supplementary lighting for the industrial camera 100 by adjusting the wavelength of the light source.

[0127] See Figure 7 , Figure 7This is a schematic diagram illustrating a specific circuit principle for adjusting the color of the supplementary lighting source in an embodiment of this application. For example, as shown... Figure 7 As shown, when the industrial camera 100 determines that the current image recognition rate has not reached the preset recognition rate target, the industrial camera 100 uses the RS232 interface ( Figure 7 The RS232_camera (serial communication interface connecting industrial camera 100 and interface converter 300) sends configuration parameters to interface converter 300. These configuration parameters control the light source drive circuit 221 to send activation signals to each single-color light-emitting device 222. Interface converter 300 then transmits these configuration parameters via a UART interface. Figure 7 The UART_232 signal is sent to the MCU210 of the supplementary lighting device 200. Then, the MCU210 of the supplementary lighting device 200 controls the light source driving circuit 221 to send signals to each single-color light-emitting device 222 (…). Figure 7 The MCU210 sends an enable drive signal via the GPO_green, GPO_red, GPO_white, and GPO_blue interfaces, and then sends the signal through the UART interface. Figure 7 The UART_232 input method sends the feedback information back to the industrial camera 100 via the interface converter 300.

[0128] Or, such as Figure 7 As shown, when the industrial camera 100 determines that the current image recognition rate has not reached the preset recognition rate target, the industrial camera 100 uses the input interface of the MCU 210 of the supplementary lighting device 200 (… Figure 7 The MCU_IN0, MCU_IN1, and MCU_IN2 in the supplementary lighting device 200 send configuration parameters to the MCU210 of the supplementary lighting device 200. Then, the MCU210 of the supplementary lighting device 200 controls the light source driving circuit 221 to send an activation drive signal to each single-color light-emitting device 222. The MCU210 then outputs the signal through the interface (…). Figure 7 The MCU_OUT0, MCU_OUT1, and MCU_OUT2 will send feedback information to the industrial camera 100.

[0129] In practical applications, some scenarios require the client's host computer (referred to as the client in this embodiment) to control the supplementary lighting device 200 in order to provide supplementary lighting for the industrial camera 100. In this case, a corresponding interface, namely a switch converter, is added to the client to connect the supplementary lighting device 200 to the client or the industrial camera 100.

[0130] For details, see Figure 8 , Figure 8 This is a schematic diagram of another specific circuit principle for adjusting the color of the supplementary light source in an embodiment of this application. Figure 7 The difference is that the client 400 uses an RS232 interface ( Figure 8 The RS232_OUT interface sends the configuration parameters to the interface converter 300, which then sends the configuration parameters to the UART interface (RS232_OUT). Figure 8 The configuration parameters are sent to the Switch converter 500 via the UART_OUT interface, or the industrial camera 100 sends the configuration parameters to the interface converter 300 via the RS232 interface. The interface converter 300 then sends the configuration parameters to the Switch converter 500 via the UART interface, and the Switch converter 500 then sends the configuration parameters to the Switch converter 500 via the UART interface. Figure 8 The UART_MCU in the supplementary lighting device 200 sends the signal to the MCU210 of the supplementary lighting device 200 via the UART interface. Figure 8 The UART_Switch sends feedback information to the Switch converter 500, which then forwards it to the client or industrial camera 100.

[0131] Furthermore, when communicating via input / output interfaces, the industrial camera 100 uses a general-purpose output interface ( Figure 8 Cameras OUT0, OUT1, and OUT2 send configuration parameters to the Switch converter 500, which then transmits the configuration parameters through the input interface of the MCU 210 of the supplementary lighting device 200. Figure 8 The MCU_IN0, MCU_IN1, and MCU_IN2 of the supplementary lighting device 200 are sent to the MCU210 of the supplementary lighting device 200. The MCU210 of the supplementary lighting device 200 outputs data through its interface (…). Figure 8 The MCU_OUT0, MCU_OUT1, MCU_OUT2, or OUT_Switch interface sends feedback information to the Switch converter 500. The Switch converter 500 then outputs the feedback information through its interface (MCU_OUT0, MCU_OUT1, MCU_OUT2, or OUT_Switch). Figure 8 The industrial camera 100 sends OUT0, OUT1, and OUT2 to the client 400, and the industrial camera 100 sends the data through the input interface of the client 400. Figure 8 The cameras (IN0, IN1, IN2) send images to the client 400.

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

[0133] Finally, from the perspective of hardware circuitry, a detailed explanation is provided on how to adjust the lighting angle of the supplementary light source.

[0134] To adjust the lighting angle, angle adjustment mechanisms could be installed for each light source in the supplementary lighting device, which would complicate the device's structure. A simpler approach is to use light sources at different angles, adjusting the lighting angle by turning them on or off. In one possible implementation, the supplementary lighting source includes a coaxial light source coaxial with the industrial camera and at least one ring of light sources surrounding the coaxial light source; each ring of light sources has a preset interval. The plane containing each ring of light sources has a different preset angle with the plane containing the light-emitting surface of the coaxial light source; all preset angles are acute; the preset angles increase sequentially from the inside out for each ring of light sources. Furthermore, the lighting angle is adjusted by controlling the on / off state of the coaxial light source and each ring of light sources.

[0135] For details, see Figure 9 , Figure 9 This is a schematic diagram showing the distribution of supplementary lighting sources in an embodiment of this application. For example... Figure 9 As shown, the supplementary light source 220 includes a 90° coaxial light source coaxial with the industrial camera 100, and a first ring of light sources arranged around the light-emitting surface of the 90° coaxial light source. Figure 9 Six LEDs (30°) in the middle, and a second ring of light sources spaced apart from the first ring of light sources ( Figure 9 Six LEDs (45°) in the middle, and a third ring of light sources spaced apart from the second ring of light sources ( Figure 9 Six LEDs (60°). Correspondingly, the first preset angle between the plane containing the first ring of light sources and the plane containing the light-emitting surface of the 90° coaxial light source. The second preset angle is the angle between the plane containing the second ring of light sources (30°) and the plane containing the light-emitting surface of the 90° coaxial light source. The third preset angle is the angle between the plane containing the 45° third ring of light sources and the plane containing the light-emitting surface of the 90° coaxial light source. It is 60°.

[0136] like Figure 10 As shown, Figure 10 This is a schematic diagram of the principle of a coaxial light source in an embodiment of this application. The light source 4 is 90° coaxial with the camera lens 110 of the industrial camera 100. The camera lens 110 takes pictures of the object 5 to be detected.

[0137] In this way, the coaxial light source, the first ring light source, the second ring light source, and the third ring 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 supplementary light source can be adjusted by controlling the on or off of the coaxial light source, the first ring light source, the second ring light source, and the third ring light source. In this embodiment, only the coaxial light source, the first ring light source, the second ring light source, and the third ring light source are used as examples for illustration. In actual applications, it is not limited to the coaxial light source, the first ring light source, the second ring light source, and the third ring light source.

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

[0139] For example, such as Figure 11 As shown, when the industrial camera 100 determines that the current image recognition rate has not reached the preset recognition rate target, it sends configuration parameters to the control module 210 of the supplementary lighting device 200 via a UART interface or a GPIO interface. These configuration parameters are used to control the light source driving circuit 221 of the light source to be turned on in different schemes to send a drive signal to its light-emitting device to turn it on. Figure 11 (Intermediate switch control), each light source drive circuit 221 operates at a preset PWM drive signal frequency or the frequency of the aforementioned adjusted PWM drive signal ( Figure 11 (Medium frequency fixed), to the light-emitting device of the light source to be turned on ( Figure 11 The first ring light source 2225, the second ring light source 2226, the third ring light source 2227, and the coaxial light source 2228 send an activation drive signal, or the light source drive circuit 221 sends an analog drive signal ( Figure 11 (Medium linear output) sends an activation drive signal to the light-emitting device of the light source to be turned on, thereby realizing the supplementary lighting of the industrial camera 100 by adjusting the light-emitting angle of the light source.

[0140] See Figure 12 , Figure 12 for Figure 9 A schematic diagram of a specific circuit principle for adjusting the lighting angle of the supplementary light source under the distribution of supplementary light sources. Figure 12 The explanation will take the signal sent from the light source driving circuit 221 to the light-emitting device 222 as a PWM driving signal as an example. Figure 9 As shown, the first, second, and third rings of light sources each contain LED beads in four directions: up, down, left, and right. Correspondingly, Figure 12 The light source driving circuit 221, which controls each ring of light sources, includes four constant current controls to control the LED beads in four directions of each ring of light sources. Figure 12 The PWM×4 and the light source drive circuit 221 (with 4 lines pointing to each ring of light source) control the on or off of the coaxial light source 2228. The light source drive circuit 221 controls the on or off of the coaxial light source 2228 through a digital constant voltage control circuit. Among them, the input / output interface ( Figure 12 The specific data for IO_IN×2 and IO_OUT×2 can be set according to actual needs.

[0141] See Figure 13 , Figure 13 This is a schematic diagram of a light source control device in an embodiment of this application. The light source control device provided in this embodiment is used to control the supplementary lighting source for industrial cameras. The device may include:

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

[0143] The first adjustment module 1302 is used to adjust the driving signal of the supplementary light source when the image quality does not meet the preset image quality target.

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

[0145] The light source control device provided in this application embodiment can adjust the driving signal of the supplementary light source to adjust the signal quality of the light source when the current image quality of the industrial camera does not meet the preset image quality target; and adjust the light source color and / or the illumination angle of the supplementary light source when the current image recognition rate of the industrial camera does not meet the preset recognition rate target. By adjusting the color and / or illumination angle of the light source, the content captured by the industrial camera can be better identified, thereby meeting the higher supplementary lighting requirements of the industrial camera, improving the quality of the images acquired by the industrial camera, as well as the image recognition rate and recognition accuracy. It can be applied to scenarios where industrial cameras have high requirements for light source quality, light source color, or illumination angle, and has a wider range of applications. It can also cope with various demanding requirements for light sources for different objects to be detected, different detection contents, and different detection environments, making the types of objects and contents to be detected more diverse and the application prospects better.

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

[0147] The aforementioned first adjustment module 1302 is specifically used to increase the frequency of the PWM drive signal sent by the light source drive circuit to the light-emitting device when the image quality does not meet the preset image quality target.

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

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

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

[0151] The industrial camera obtains multiple first image recognition rates when each candidate color is emitted by the supplementary light source. The candidate color corresponding to the highest first image recognition rate is taken 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.

[0152] In one possible implementation, the above-mentioned supplementary light source includes: a coaxial light source coaxial with the industrial camera and at least one ring of light sources arranged around the coaxial light source; there is a preset interval between each ring of light sources; wherein, the plane where each ring 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 each preset angle of each ring of light sources increases sequentially from the inside to the outside.

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

[0154] In one possible implementation, the aforementioned at least one ring of light sources includes: a first ring of light sources arranged around the light-emitting surface of the coaxial light source, a second ring of light sources spaced apart from the first ring of light sources, and a third ring of light sources spaced apart from the second ring of light sources; wherein, the first preset angle between the plane containing the first ring of light sources and the plane containing the light-emitting surface of the coaxial light source is 30 degrees, the second preset angle between the plane containing the second ring of light sources and the plane containing the light-emitting surface of the coaxial light source is 45 degrees, and the third preset angle between the plane containing the third ring of light sources and the plane containing the light-emitting surface of the coaxial light source is 60 degrees.

[0155] In one possible implementation, the second adjustment module 1303 is specifically used to control the light source driving circuit of the light source to be turned on to send an on drive 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 used to indicate that the light-emitting devices in the coaxial light source and each ring of light source are turned on.

[0156] Multiple second image recognition rates of the industrial camera are obtained after lighting according to each scheme. The scheme with the highest second image recognition rate is taken as the target scheme. The light source driving circuit of the light source to be turned on in the target scheme sends an on drive signal to its light-emitting device.

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

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

[0159] In one possible implementation, the above-mentioned supplementary light source is disposed in the supplementary lighting device, which further includes a control module;

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

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

[0162] This application also provides an industrial camera, see [link / reference] Figure 14 The industrial camera 100 includes:

[0163] Camera lens 110;

[0164] Memory 120 is used to store computer programs;

[0165] The processor 130 is electrically connected to an external supplementary light source; when executing a program stored in the memory, it implements any of the above-described light source control methods to achieve the same technical effect.

[0166] Furthermore, the aforementioned industrial camera may also include a communication bus and / or a communication interface, with the processor 130, communication interface, and memory 120 communicating with each other via the communication bus.

[0167] The communication bus mentioned in the industrial camera diagram can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

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

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

[0170] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0171] This application embodiment also provides a supplementary lighting device for providing supplementary lighting to the above-mentioned industrial camera 100, see [link to relevant documentation]. Figure 15 The supplementary lighting device 200 includes: supplementary light source 220.

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

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

[0174] The first parameter includes the frequency of the PWM drive signal or switching information, which is used to switch the PWM drive signal to an analog drive signal; the second parameter includes the drive signal sent by the light source drive circuit to the light-emitting device to turn on the target color; the third parameter includes the drive signal sent by the light source drive circuit of the light source to turn on to its light-emitting device to turn on or off.

[0175] In one possible implementation, the supplementary light source 220 includes: a coaxial light source coaxial with the industrial camera 100 and at least one ring of light sources arranged around the coaxial light source; there is a preset interval between each ring of light sources; wherein, the plane where each ring 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; the preset angle of each ring of light sources increases sequentially from the inside to the outside.

[0176] The aforementioned control module 210 is used to adjust the lighting angle by controlling the opening or closing of the coaxial light source and each ring of light sources.

[0177] In one possible implementation, the aforementioned at least one ring of light sources includes: a first ring of light sources arranged around the light-emitting surface of the coaxial light source, a second ring of light sources spaced apart from the first ring of light sources, and a third ring of light sources spaced apart from the second ring of light sources; wherein, the first preset angle between the plane containing the first ring of light sources and the plane containing the light-emitting surface of the coaxial light source is 30 degrees, the second preset angle between the plane containing the second ring of light sources and the plane containing the light-emitting surface of the coaxial light source is 45 degrees, and the third preset angle between the plane containing the third ring of light sources and the plane containing the light-emitting surface of the coaxial light source is 60 degrees.

[0178] This application also provides a machine vision system, see [link to relevant documentation]. Figure 16 The machine vision system 600 includes: the industrial camera 100 and any of the above-mentioned supplementary lighting devices 200.

[0179] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of any of the above-described light source control methods.

[0180] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the light source control methods described above.

[0181] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially 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, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0182] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0183] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for the device / industrial camera / lighting equipment / machine vision system are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0184] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. A light source control method, characterized in that, The method for controlling a supplementary lighting source for providing supplementary lighting to an industrial camera includes: Obtain the current quality parameters of the industrial camera, wherein the quality parameters are image recognition rate and / or image quality; If the quality parameters do not meet the preset quality target, adjust the color of the supplementary light source, wherein the preset quality target is a preset recognition rate target and / or a preset image quality target; The system acquires the current quality parameters of the industrial camera after adjusting the light source color and determines whether the acquired quality parameters meet the preset quality target. Once the current quality parameters meet the preset quality target, the adjustment of the supplementary light source is terminated.

2. The method according to claim 1, characterized in that, The quality parameter is the image recognition rate, and the preset quality target is the preset recognition rate target; the supplementary light source includes: a light source driving circuit and a light-emitting device; When the quality parameters do not meet the preset quality target, adjusting the color of the supplementary light source includes: Determine whether the image recognition rate has reached the preset recognition rate target; If the image recognition rate does not reach the preset recognition rate target, preset adjustable colors are used as candidate colors, and the light source driving circuit is controlled to send a driving signal to the color-variable light-emitting device to activate the candidate colors. The process of acquiring the current quality parameters of the industrial camera after adjusting the light source color and determining whether the acquired quality parameters meet the preset quality target includes: After the control light source driving circuit sends a driving signal to the color-variable light-emitting device to activate the candidate color and provide supplementary light to the industrial camera, the current image recognition rate of the industrial camera is obtained, and it is determined whether the currently obtained image recognition rate has reached the preset recognition rate target. The step of ending the adjustment of the supplementary light source when the current quality parameters meet the preset quality target includes: Once the current image recognition rate reaches the preset recognition rate target, the adjustment of the supplementary light source will cease.

3. The method according to claim 2, characterized in that, The method further includes: If the current image recognition rate does not reach the preset recognition rate target, adjust the lighting angle of the supplementary light source.

4. The method according to claim 2, characterized in that, The method further includes at least one of the following: If the image quality does not meet the preset image quality target, adjust the driving signal of the supplementary light source; If the image recognition rate does not reach the preset recognition rate target, adjust the lighting angle of the supplementary light source.

5. The method according to claim 4, characterized in that, The supplementary light source includes: a light source driving circuit and a light-emitting device; The step of adjusting the driving signal of the supplementary light source includes: Increase the frequency of the PWM drive signal sent from the light source drive circuit to the light-emitting device.

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

7. The method according to claim 3 or 4, characterized in that, The supplementary light source includes: a coaxial light source coaxial with the industrial camera and at least one ring of light sources arranged around the coaxial light source; there is a preset interval between each ring of light sources; wherein, the plane where each ring 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; the preset angles of each ring of light sources increase sequentially from the inside to the outside. The step of adjusting the illumination angle of the supplementary light source includes: adjusting the illumination angle by controlling the opening or closing of the coaxial light source and each ring of light sources.

8. The method according to claim 7, characterized in that, The step of adjusting the illumination angle of the supplementary 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 an on drive signal to its light-emitting device; wherein, each lighting angle scheme is a scheme used to indicate that the light-emitting device in the coaxial light source and each ring of light sources is turned on. Multiple second image recognition rates of the industrial camera are obtained after each lighting scheme. The scheme with the highest second image recognition rate is taken as the target scheme. The light source driving circuit of the light source to be turned on in the target scheme sends an on drive signal to its light-emitting device.

9. The method according to claim 4, characterized in that, The supplementary light source is disposed in the supplementary lighting device, which further includes a control module; The step of adjusting the driving signal of the supplementary light source when the image quality does not meet the preset image quality target includes: If the image quality does not meet the preset image quality target, a first parameter is generated to control the drive signal of the supplementary light source, and sent to the control module of the supplementary light device, so that the control module adjusts the drive signal of the supplementary light source according to the first parameter; the first parameter includes: the frequency of the PWM drive signal, or switching information, the switching information being used to switch the PWM drive signal to an analog drive signal; The step of adjusting the color of the supplementary light source and / or adjusting the illumination angle of the supplementary light source when the image recognition rate does not reach the preset recognition rate target includes: If the image recognition rate does not reach the preset recognition rate target, a second parameter for adjusting the color of the supplementary light source and / or a third parameter for adjusting the illumination angle of the supplementary light source are generated and sent to the control module of the supplementary lighting device, so that the control module adjusts the color of the supplementary light source according to the second parameter and / or adjusts the illumination angle of the supplementary light source according to the third parameter; the second parameter includes: a drive signal to turn on the target color; the third parameter includes: a drive signal to turn on or off the supplementary light source located at different angles.

10. A light source control device, characterized in that, The device for controlling a supplementary lighting source for industrial cameras includes: The acquisition module is used to acquire the current quality parameters of the industrial camera, wherein the quality parameters are image recognition rate and / or image quality; The second adjustment module is used to adjust the color of the supplementary light source when the quality parameters do not meet the preset quality target, wherein the preset quality target is a preset recognition rate target and / or a preset image quality target; to obtain the current quality parameters of the industrial camera after the light source color adjustment, and to determine whether the currently obtained quality parameters meet the preset quality target; and to end the adjustment of the supplementary light source when the current quality parameters meet the preset quality target.

11. An industrial camera, characterized in that, include: Camera lens; Memory, used to store computer programs; A processor electrically connected to an external supplementary lighting source; used to execute a program stored in a memory to implement the method described in any one of claims 1-9.

12. A supplemental lighting device, characterized in that, Used for providing supplemental lighting to the industrial camera of claim 11; including a supplemental lighting source.

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

14. The supplementary lighting device according to claim 13, characterized in that, The supplementary light source includes: a coaxial light source coaxial with the industrial camera and at least one ring of light sources arranged around the coaxial light source; there is a preset interval between each ring of light sources; wherein, the plane where each ring 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; the preset angle of each ring of light sources increases sequentially from the inside to the outside. The control module is used to adjust the lighting angle by controlling the opening or closing of the coaxial light source and each ring of light sources.

15. A machine vision system, comprising: The industrial camera of claim 11 and the supplementary lighting device of any one of claims 12 to 14.