Machine vision light source controller capable of enhancing image and method
By preprocessing and adjusting the illumination state of the light source in machine vision, the color difference problem caused by the spectral characteristics of light is solved, thereby improving the accuracy of image color enhancement and recognition of objects.
Patent Information
- Application Number
- CN202511517500.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-03-03
AI Technical Summary
During the process of machine vision capturing objects with different color characteristics, the light spectrum features are concentrated in the short-wavelength or long-wavelength range, which causes color differences in the object images captured by the image acquisition sensor. This makes it impossible to truly reflect the surface color of the object and affects the accuracy of recognition.
By preprocessing the original image of the target scene under the reference illumination state, converting it into a tristimulus value image, performing color space distribution recognition, calibrating the color difference state of each target object, and adjusting the illumination state of the light source according to the real-time shooting parameters of machine vision, the illumination spectrum of each target object is adjusted in a targeted manner.
It reduces color difference in machine vision recognition, enables enhanced color capture of object images, and improves recognition accuracy.
Smart Images

Figure CN121604233A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision, and more particularly to an image-enhancing machine vision light source controller and method. Background Technology
[0002] Machine vision utilizes image acquisition devices to capture images and transmit the image information to industrial computers for analysis and processing, identifying the features of target objects or their surrounding environment. Machine vision technology is widely used in product appearance inspection, production monitoring, and product positioning. Machine vision mainly consists of a lighting source and an image acquisition sensor, where the lighting source provides sufficient and adjustable illumination for image acquisition. Considering that machine vision needs to capture images of objects with different color characteristics, the spectral characteristics of the light emitted by the lighting source, when it illuminates the object's surface and is reflected to the image acquisition sensor, affect its color visual excitation on the object's surface. When the spectral characteristics of the light emitted by the lighting source are concentrated in the short-wavelength or long-wavelength range, the light's color visual excitation on the object's surface will deviate, resulting in color differences in the image captured by the image acquisition sensor. This prevents the image from accurately reflecting the object's surface color, impacting the accuracy of machine vision recognition. Therefore, adjusting the spectral characteristics of the light source used in machine vision is crucial for reducing color differences in machine vision recognition and achieving enhanced color capture of object images. Summary of the Invention
[0003] The purpose of this invention is to provide a machine vision light source controller and method for image enhancement. The method involves preprocessing the original image of the target scene under reference illumination, converting the original image into a tristimulus value image of the target scene; performing color space distribution recognition on the tristimulus value image to obtain the visual perception features of all target objects in the target scene, thereby calibrating the color difference state of each target object; determining the visual recognition target object based on the real-time shooting parameters of the machine vision; adjusting the illumination state of the light source based on the color difference state of the visual recognition target object; using the light source under reference illumination as a reference, calibrating the color difference state of all target objects in the target scene under the illumination of the light source; and selectively adjusting the illumination spectrum of each target object to reduce the color difference in machine vision recognition and achieve color enhancement of the object's image.
[0004] This invention is achieved through the following technical solution: A machine vision light source controller capable of image enhancement includes: An image processing module is used to acquire the original image of the target scene when the light source is under reference illumination, and to preprocess the original image; The image conversion and recognition module is used to convert and recognize the original image to obtain the tristimulus value image of the target scene; The visual perception determination module is used to perform color space distribution recognition on the tristimulus value image to obtain the visual perception features of all target objects in the target scene. A color difference calibration module is used to calibrate the color difference state of each target object based on the visual perception characteristics. The target object determination module is used to determine the visually recognizable target object of the target scene based on the real-time shooting parameters of the target scene by machine vision. The light source illumination adjustment module is used to adjust the illumination state of the light source according to the color difference state of the visually identified target object.
[0005] Optionally, the image processing module is used to acquire an original image of the target scene under reference illumination conditions, and preprocess the original image, including: The original panoramic image of the target scene under reference illumination conditions is processed by noise reduction filtering and pixel brightness consistency preprocessing. The image conversion and recognition module is used to convert and recognize the original image to obtain the tristimulus value image of the target scene, including: The original panoramic image is subjected to spectral conversion to obtain a multispectral image; the multispectral image is subjected to chromaticity conversion to obtain a tristimulus value image of the target scene; wherein, the tristimulus value image is a CIEXYZ tristimulus value image.
[0006] Optionally, the image processing module is used to acquire an original image of the target scene under reference illumination conditions, and preprocess the original image, including: Retrieve the original image and take a 3×3 window centered on each pixel; Virtually emit grayscale detection particles in eight directions; The grayscale detection particles move along the grayscale gradient direction within the serial port, and the number of inflection points and the angle of abrupt change in direction of each grayscale detection particle's trajectory are recorded. The number of inflection points and the direction change angle are normalized to obtain the normalized number of inflection points and the direction change angle. The particle motion disorder index corresponding to each pixel is determined by using the number of inflection points and the direction change angle after normalization of the motion trajectory of each gray-scale probe particle. The particle turbulence index corresponding to each pixel is obtained by the following formula: , Where A represents the particle motion disorder index corresponding to each pixel; Ni represents the normalized number of inflection points corresponding to the gray-scale detection particles in the i-th direction; θi represents the average value of the absolute value of the normalized directional change angle corresponding to the gray-scale detection particles in the i-th direction; and Ti represents the motion duration of the gray-scale detection particles in the i-th direction. The particle motion disorder index is compared with a preset index threshold. When the particle movement disorder index is greater than the preset index threshold, the gray value of the current pixel is adjusted using the particle movement disorder index. The adjusted grayscale value is obtained using the following formula: , Where G represents the adjusted grayscale value; G0 represents the original grayscale value of the corresponding pixel; A represents the particle movement disorder index of the corresponding pixel; Ath represents the preset index threshold; and Ap represents the particle movement disorder index of the adjacent pixels of the pixel. When the particle running disorder index is not greater than the preset index threshold, the gray value of the current pixel will not be adjusted.
[0007] Optionally, the visual perception determination module is used to perform color space distribution recognition on the tristimulus value image to obtain the visual perception features of all target objects in the target scene, including: Based on the conversion relationship from standard color space to RGB space, the tristimulus value image is converted into an RGB image, and color space distribution recognition is performed on the RGB image to obtain the visual perception features of each target object in the target scene; wherein, the visual perception features refer to the sensitivity of machine vision in perceiving the surface color of the target object. The color difference calibration module is used to calibrate the color difference state of each target object based on the visual perception features, including: The visual perception features are compared with the reference visual perception features corresponding to the surface color of the target object to calibrate the color difference state of each target object; wherein, the color difference state refers to the difference between the sensitivity of the machine vision in perceiving the surface color of the target object and the expected reference sensitivity.
[0008] Optionally, the target object determination module is used to determine the visually recognizable target object of the target scene based on the real-time shooting parameters of the target scene by machine vision, including: The machine vision system acquires the real-time field of view and real-time focus distance of the target scene, and determines the visual recognition target of the target scene based on the real-time field of view and the real-time focus distance. The light source illumination adjustment module is used to adjust the illumination state of the light source according to the color difference state of the visually recognized target object, including: Based on the color difference state of the visually recognizable target object, a target value for adjusting the illumination spectrum of the visually recognizable target object is determined; based on the spatial position of the visually recognizable target object and the target value for adjusting the illumination spectrum, the illumination spectrum of the sub-light source within the light source that matches the position of the visually recognizable target object is adjusted.
[0009] A machine vision light source control method for image enhancement includes: Acquire the original image of the target scene under reference illumination and preprocess the original image; convert and recognize the original image to obtain the tristimulus value image of the target scene; Color space distribution recognition is performed on the tristimulus value image to obtain the visual perception features of all target objects in the target scene; based on the visual perception features, the color difference state of each target object is calibrated. Based on the real-time shooting parameters of the target scene by machine vision, the visual recognition target object of the target scene is determined; based on the color difference state of the visual recognition target object, the illumination state of the light source is adjusted.
[0010] Optionally, the original image of the target scene under reference illumination is acquired, and the original image is preprocessed; the original image is then converted and recognized to obtain a tristimulus value image of the target scene, including: The original panoramic image of the target scene under reference illumination conditions is processed by noise reduction filtering and pixel brightness consistency preprocessing. The original panoramic image is subjected to spectral conversion to obtain a multispectral image; the multispectral image is subjected to chromaticity conversion to obtain a tristimulus value image of the target scene; wherein, the tristimulus value image is a CIEXYZ tristimulus value image.
[0011] Optionally, color space distribution recognition is performed on the tristimulus value image to obtain the visual perception features of all target objects in the target scene; based on the visual perception features, the color difference state of each target object is calibrated, including: Based on the conversion relationship from standard color space to RGB space, the tristimulus value image is converted into an RGB image, and color space distribution recognition is performed on the RGB image to obtain the visual perception features of each target object in the target scene; wherein, the visual perception features refer to the sensitivity of machine vision in perceiving the surface color of the target object. The visual perception features are compared with the reference visual perception features corresponding to the surface color of the target object to calibrate the color difference state of each target object; wherein, the color difference state refers to the difference between the sensitivity of the machine vision in perceiving the surface color of the target object and the expected reference sensitivity.
[0012] Optionally, based on real-time shooting parameters of the target scene by machine vision, the visual recognition target object of the target scene is determined; based on the color difference state of the visual recognition target object, the illumination state of the light source is adjusted, including: The machine vision system acquires the real-time field of view and real-time focus distance of the target scene, and determines the visual recognition target of the target scene based on the real-time field of view and the real-time focus distance. Based on the color difference state of the visually recognizable target object, a target value for adjusting the illumination spectrum of the visually recognizable target object is determined; based on the spatial position of the visually recognizable target object and the target value for adjusting the illumination spectrum, the illumination spectrum of the sub-light source within the light source that matches the position of the visually recognizable target object is adjusted.
[0013] Compared with the prior art, the present invention has the following beneficial effects: This application provides a machine vision light source controller and method for image enhancement. After preprocessing the original image of the target scene under reference illumination, the original image is converted into a tristimulus value image of the target scene. Color space distribution recognition is performed on the tristimulus value image to obtain the visual perception features of all objects in the target scene, thereby calibrating the color difference state of each object. Based on the real-time shooting parameters of the machine vision, the visual recognition target object is determined. Based on the color difference state of the visual recognition target object, the illumination state of the light source is adjusted. Using the light source under reference illumination as a reference, the color difference state of all objects in the target scene under the illumination of the light source is calibrated. The illumination spectrum of each target object is adjusted in a targeted manner to reduce the color difference in machine vision recognition and achieve color enhancement of the object's image. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a schematic diagram of the structure of a machine vision light source controller capable of image enhancement provided by the present invention.
[0015] Figure 2This is a flowchart illustrating a machine vision light source control method for image enhancement provided by the present invention. Detailed Implementation
[0016] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, it should be noted that, for ease of description, only the parts relevant to this application are shown in the accompanying drawings, not the entire structure. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0017] The terms “comprising” and “having”, and any variations thereof, in this application are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or device.
[0018] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0019] Please see Figure 1 As shown, one embodiment of this application provides an image-enhancing machine vision light source controller. The image-enhancing machine vision light source controller includes: The image processing module is used to acquire the original image of the target scene under the reference illumination state and to preprocess the original image; The image conversion and recognition module is used to convert and recognize the original image to obtain the tristimulus value image of the target scene; The visual perception determination module is used to identify the color space distribution of the tristimulus value image to obtain the visual perception features of all target objects in the target scene. The color difference calibration module is used to calibrate the color difference status of each target object based on visual perception characteristics; The target object determination module is used to determine the visual recognition target object in the target scene based on the real-time shooting parameters of the target scene by machine vision. The light source illumination adjustment module is used to adjust the illumination state of the light source based on the color difference state of the visually identified target object.
[0020] The beneficial effects of the above embodiments are as follows: the image-enhancing machine vision light source controller preprocesses the original image of the target scene under the reference illumination state, and converts the original image into a tristimulus value image of the target scene; it performs color space distribution recognition on the tristimulus value image to obtain the visual perception features of all target objects in the target scene, thereby calibrating the color difference state of each target object; it determines the visual recognition target object according to the real-time shooting parameters of the machine vision, and adjusts the illumination state of the light source according to the color difference state of the visual recognition target object. Taking the light source under the reference illumination state as a reference, it calibrates the color difference state of all target objects in the target scene under the illumination of the light source, and adjusts the illumination light spectrum of each target object in a targeted manner to reduce the color difference of machine vision recognition and realize the image color enhancement shooting of the object.
[0021] In another embodiment, the image processing module is used to acquire an original image of the target scene when the light source is under reference illumination, and to preprocess the original image, including: The original panoramic image of the target scene is obtained when the light source is under the reference illumination state; where the reference illumination state means that all sub-light sources under the light source have the same luminous intensity across the entire visible spectrum. The original panoramic image is then subjected to noise reduction filtering preprocessing and pixel brightness consistency preprocessing. The image conversion and recognition module is used to convert and recognize the original image to obtain the tristimulus value image of the target scene, including: The original panoramic image is subjected to spectral conversion to obtain a multispectral image; the multispectral image is subjected to chromaticity conversion to obtain a tristimulus value image of the target scene; wherein, the tristimulus value image is a CIEXYZ tristimulus value image.
[0022] The beneficial effects of the above embodiments are that, considering machine vision recognition may require individual imaging and recognition of target objects at different locations within a target scene, the light source configured for machine vision also needs to have flexible and adjustable illumination performance. Specifically, the light source used by machine vision may include multiple sub-light sources arranged in an array, each sub-light source can emit light independently, and each sub-light source may include RGB three-color broadband LED beads. Each LED bead can independently change its own luminous intensity. In this way, by changing the switching state and luminous intensity of each RGB three-color broadband LED bead, the spectral range of the light emitted by each sub-light source can be changed, thereby changing the overall illumination spectral range of the light source during machine vision recognition. Each target object in the target scene has different surface color characteristics, and the illumination spectral range required for achieving color difference-free machine vision recognition of each target object is correspondingly different. In order to ensure that machine vision can achieve color difference-free recognition of each target object in the target scene, it is necessary to set a matching illumination spectral range for the surface color characteristics of each target object. Specifically, the light source used for machine vision is first set to a reference illumination state. When the light source is in the reference illumination state, each sub-light source under the light source has the same luminous intensity across the entire visible spectrum. That is, the RGB three-color broadband LED beads in each sub-light source emit light with the same reference intensity. At this time, the original panoramic image of the target scene under the reference illumination state is acquired, and Kalman denoising filtering and pixel brightness consistency preprocessing are performed on the original panoramic image (that is, the brightness of all pixels in the original panoramic image is set to be the same), thereby avoiding the impact of image noise and brightness differences between pixels on the accuracy of subsequent color difference recognition. The U-Net neural network model is used to perform spectral conversion on the original panoramic image to obtain a multispectral image; then, according to colorimetry theory, the multispectral image is chromaticity converted to obtain the CIEXYZ tristimulus value image of the target scene. The above chromaticity conversion of the multispectral image can be implemented by a convolutional neural network model, which will not be described in detail here. Through the above process, the original image of the target scene can be converted at the level of chromaticity visual stimulation, and the chromaticity visual stimulation formed by the target scene under the reference illumination state can be comprehensively represented.
[0023] In another embodiment, the image processing module is used to acquire an original image of the target scene under reference illumination conditions, and preprocess the original image, including: Retrieve the original image and take a 3×3 window centered on each pixel; Virtually emit grayscale detection particles in eight directions; The grayscale detection particles move along the grayscale gradient direction within the serial port, and the number of inflection points and the angle of abrupt change in direction of each grayscale detection particle's trajectory are recorded. The number of inflection points and the direction change angle are normalized to obtain the normalized number of inflection points and the direction change angle. The particle motion disorder index corresponding to each pixel is determined by using the number of inflection points and the direction change angle after normalization of the motion trajectory of each gray-scale probe particle. The particle turbulence index corresponding to each pixel is obtained by the following formula: , Where A represents the particle motion disorder index corresponding to each pixel; Ni represents the normalized number of inflection points corresponding to the gray-scale detection particles in the i-th direction; θi represents the average value of the absolute value of the normalized directional change angle corresponding to the gray-scale detection particles in the i-th direction; and Ti represents the motion duration of the gray-scale detection particles in the i-th direction. The particle motion disorder index is compared with a preset index threshold. When the particle movement disorder index is greater than the preset index threshold, the gray value of the current pixel is adjusted using the particle movement disorder index. The adjusted grayscale value is obtained using the following formula: , Where G represents the adjusted grayscale value; G0 represents the original grayscale value of the corresponding pixel; A represents the particle movement disorder index of the corresponding pixel; Ath represents the preset index threshold; and Ap represents the particle movement disorder index of the adjacent pixels of the pixel. When the particle running disorder index is not greater than the preset index threshold, the gray value of the current pixel will not be adjusted.
[0024] The beneficial effects of the above embodiments are achieved by taking a 3×3 window centered on the pixel and emitting grayscale detection particles in eight directions. The particles move according to the grayscale gradient, and the number of inflection points and the angle of abrupt changes in direction are recorded. This method can meticulously perceive the details of grayscale changes in local pixel regions. For example, at edges and textures in the image, the inflection points and angles of particle motion trajectories will show significant differences. Furthermore, by calculating the particle motion disorder index A, the complexity of local grayscale can be accurately quantified, providing a precise basis for subsequent grayscale adjustments, effectively enhancing image details and making previously blurred edges and textures clearer. The grayscale value G is adjusted based on the particle motion disorder index A, the adjacent pixel index Ap, and the threshold Ath. When A is greater than the threshold, it indicates that the local grayscale changes of the pixel are complex (possibly due to rich details or noise interference). The formula... It can adaptively adjust grayscale, highlighting details (such as enhancing contrast at edges) and suppressing abnormal grayscale fluctuations caused by noise to a certain extent, making the image grayscale distribution more reasonable and improving image quality.
[0025] The particle motion disorder index Ap of adjacent pixels is used in the grayscale adjustment calculation, taking into account the correlation between pixels. When adjusting the grayscale of a single pixel, the situation of surrounding pixels is referenced to avoid the "patchwork effect" (over-adjustment in a localized area that is inconsistent with the surrounding area) caused by local adjustments. This ensures a natural and harmonious overall grayscale transition, making the preprocessed image visually more coherent and stable, which is beneficial for subsequent higher-order image processing tasks such as object detection and recognition. Pixels with a particle motion disorder index greater than or less than a threshold are treated differently. Pixels with a particle motion disorder index less than the threshold retain their original grayscale, while those greater than the threshold are adjusted. This allows for targeted enhancement of areas that require detail (such as areas containing important target features) while preserving the original state of grayscale-stable areas (such as the background). This makes image preprocessing more targeted, improving the quality of key areas while maintaining the natural properties of the overall image, laying the foundation for high-quality image input for subsequent models.
[0026] In another embodiment, the visual perception determination module is used to perform color space distribution recognition on the tristimulus value image to obtain the visual perception features of all target objects in the target scene, including: Based on the conversion relationship from standard color space to RGB space, the tristimulus value image is converted into an RGB image, and the color space distribution of the RGB image is identified to obtain the visual perception features of each target object in the target scene; where visual perception features refer to the sensitivity of machine vision in perceiving the surface color of the target object. The color difference calibration module is used to calibrate the color difference state of each target object based on visual perception characteristics, including: The color difference state of each target object is calibrated by comparing the visual perception features with the reference visual perception features corresponding to the surface color of the target object. The color difference state refers to the difference between the sensitivity of the machine vision in perceiving the surface color of the target object and the expected reference sensitivity.
[0027] The beneficial effects of the above embodiments are as follows: In practical operation, a conversion matrix from standard color space to RGB space is used to convert the tristimulus value image into an RGB image. This conversion matrix is a commonly used color space transformation matrix in the field and will not be described in detail here. Furthermore, the U-Net neural network model can be used to complete the conversion from tristimulus value image to RGB image. Then, color space distribution recognition is performed on the RGB image to obtain the sensitivity of the machine vision's current perception of the surface color of each target object in the target scene. The sensitivity of the machine vision's current perception of the target object's surface color is then compared with the expected baseline sensitivity corresponding to the baseline visual perception features to determine the sensitivity difference between the two. This quantitatively characterizes the degree of color difference of each target object in the target scene under the baseline illumination state, providing a basis for subsequently adjusting the illumination spectrum of the light source on each target object.
[0028] In another embodiment, the target object determination module is used to determine visually recognizable target objects in the target scene based on real-time shooting parameters of the target scene by machine vision, including: The machine vision system acquires the real-time field of view and real-time focus distance of the target scene, and determines the visual recognition target of the target scene based on the real-time field of view and real-time focus distance. The light source illumination adjustment module is used to adjust the illumination state of the light source based on the color difference state of the visually identified target object, including: Based on the color difference state of the visually recognizable target object, determine the target value for adjusting the illumination spectrum of the visually recognizable target object; based on the spatial position and the target value for adjusting the illumination spectrum of the visually recognizable target object, adjust the illumination spectrum of the sub-light source within the light source that matches the position of the visually recognizable target object.
[0029] The beneficial effects of the above embodiments, considering the large spatial range of the target scene and the large number of internal targets, mean that machine vision can only identify a portion of the targets within a local area of the target scene at any given time. To ensure that the light source can provide color-difference-free illumination to these targets during the machine vision's identification of them, it is necessary to first determine the target objects that the machine vision is currently targeting. Specifically, this involves obtaining the real-time shooting field of view and real-time focusing focal length of the machine vision over the target scene. Based on these parameters, the target objects that the machine vision is currently aiming at and focusing on within the target scene are determined. For example, the real-time focusing focal length is compared with all targets within the real-time shooting field of view to identify targets within that focal length range. These targets are then used as the visual recognition targets for the machine vision. Next, based on the color difference state of the visually recognized target objects, the sensitivity difference corresponding to the color difference state is processed using a U-Net neural network model to determine the target value for adjusting the illumination spectrum to eliminate the color difference of the visually recognized target objects, i.e., the target spectral range to which the illumination light is expected to be adjusted. Based on the spatial position of the visual recognition target, a sub-light source within the light source that can direct the irradiation light toward the visual recognition target is determined. The target value is adjusted according to the illumination spectrum, and the illumination spectrum range of the sub-light source is adjusted to ensure that the light emitted by the sub-light source effectively eliminates the color difference of the visual recognition target after irradiating it, thereby achieving color enhancement of the target image.
[0030] Please see Figure 2 As shown, an embodiment of this application provides an image-enhancing machine vision light source control method. This image-enhancing machine vision light source control method includes: Acquire the original image of the target scene under reference illumination and preprocess the original image; transform and recognize the original image to obtain the tristimulus value image of the target scene; Color space distribution recognition is performed on the tristimulus value image to obtain the visual perception features of all target objects in the target scene; based on the visual perception features, the color difference state of each target object is calibrated. Based on the real-time shooting parameters of the target scene by machine vision, the visual recognition target object of the target scene is determined; based on the color difference state of the visual recognition target object, the illumination state of the light source is adjusted.
[0031] The beneficial effects of the above embodiments are as follows: the image-enhancing machine vision light source control method preprocesses the original image of the target scene under reference illumination, and then converts the original image into a tristimulus value image of the target scene; it performs color space distribution recognition on the tristimulus value image to obtain the visual perception features of all target objects in the target scene, thereby calibrating the color difference state of each target object; based on the real-time shooting parameters of machine vision, it determines the visual recognition target object, and adjusts the illumination state of the light source according to the color difference state of the visual recognition target object. Taking the light source under reference illumination as a reference, it calibrates the color difference state of all target objects in the target scene under the illumination of the light source, and adjusts the illumination spectrum of each target object in a targeted manner to reduce the color difference of machine vision recognition and achieve image color enhancement of objects.
[0032] In another embodiment, the original image of the target scene is acquired when the light source is under reference illumination, and the original image is preprocessed; the original image is then transformed and recognized to obtain a tristimulus value image of the target scene, including: The original panoramic image of the target scene is obtained when the light source is under the reference illumination state; where the reference illumination state means that all sub-light sources under the light source have the same luminous intensity across the entire visible spectrum. The original panoramic image is then subjected to noise reduction filtering preprocessing and pixel brightness consistency preprocessing. The original panoramic image is subjected to spectral conversion to obtain a multispectral image; the multispectral image is subjected to chromaticity conversion to obtain a tristimulus value image of the target scene; wherein, the tristimulus value image is a CIEXYZ tristimulus value image.
[0033] The beneficial effects of the above embodiments are that, considering machine vision recognition may require individual imaging and recognition of target objects at different locations within a target scene, the light source configured for machine vision also needs to have flexible and adjustable illumination performance. Specifically, the light source used by machine vision may include multiple sub-light sources arranged in an array, each sub-light source can emit light independently, and each sub-light source may include RGB three-color broadband LED beads. Each LED bead can independently change its own luminous intensity. In this way, by changing the switching state and luminous intensity of each RGB three-color broadband LED bead, the spectral range of the light emitted by each sub-light source can be changed, thereby changing the overall illumination spectral range of the light source during machine vision recognition. Each target object in the target scene has different surface color characteristics, and the illumination spectral range required for achieving color difference-free machine vision recognition of each target object is correspondingly different. In order to ensure that machine vision can achieve color difference-free recognition of each target object in the target scene, it is necessary to set a matching illumination spectral range for the surface color characteristics of each target object. Specifically, the light source used for machine vision is first set to a reference illumination state. When the light source is in the reference illumination state, each sub-light source under the light source has the same luminous intensity across the entire visible spectrum. That is, the RGB three-color broadband LED beads in each sub-light source emit light with the same reference intensity. At this time, the original panoramic image of the target scene under the reference illumination state is acquired, and Kalman denoising filtering and pixel brightness consistency preprocessing are performed on the original panoramic image (that is, the brightness of all pixels in the original panoramic image is set to be the same), thereby avoiding the impact of image noise and brightness differences between pixels on the accuracy of subsequent color difference recognition. The U-Net neural network model is used to perform spectral conversion on the original panoramic image to obtain a multispectral image; then, according to colorimetry theory, the multispectral image is chromaticity converted to obtain the CIEXYZ tristimulus value image of the target scene. The above chromaticity conversion of the multispectral image can be implemented by a convolutional neural network model, which will not be described in detail here. Through the above process, the original image of the target scene can be converted at the level of chromaticity visual stimulation, and the chromaticity visual stimulation formed by the target scene under the reference illumination state can be comprehensively represented.
[0034] In another embodiment, the image processing module is used to acquire an original image of the target scene under reference illumination conditions, and preprocess the original image, including: Retrieve the original image and take a 3×3 window centered on each pixel; Virtually emit grayscale detection particles in eight directions; The grayscale detection particles move along the grayscale gradient direction within the serial port, and the number of inflection points and the angle of abrupt change in direction of each grayscale detection particle's trajectory are recorded. The number of inflection points and the direction change angle are normalized to obtain the normalized number of inflection points and the direction change angle. The particle motion disorder index corresponding to each pixel is determined by using the number of inflection points and the direction change angle after normalization of the motion trajectory of each gray-scale probe particle. The particle turbulence index corresponding to each pixel is obtained by the following formula: , Where A represents the particle motion disorder index corresponding to each pixel; Ni represents the normalized number of inflection points corresponding to the gray-scale detection particles in the i-th direction; θi represents the average value of the absolute value of the normalized directional change angle corresponding to the gray-scale detection particles in the i-th direction; and Ti represents the motion duration of the gray-scale detection particles in the i-th direction. The particle motion disorder index is compared with a preset index threshold. When the particle movement disorder index is greater than the preset index threshold, the gray value of the current pixel is adjusted using the particle movement disorder index. The adjusted grayscale value is obtained using the following formula: , Where G represents the adjusted grayscale value; G0 represents the original grayscale value of the corresponding pixel; A represents the particle movement disorder index of the corresponding pixel; Ath represents the preset index threshold; and Ap represents the particle movement disorder index of the adjacent pixels of the pixel. When the particle running disorder index is not greater than the preset index threshold, the gray value of the current pixel will not be adjusted.
[0035] The beneficial effects of the above embodiments are achieved by taking a 3×3 window centered on the pixel and emitting grayscale detection particles in eight directions. The particles move according to the grayscale gradient, and the number of inflection points and the angle of abrupt changes in direction are recorded. This method can meticulously perceive the details of grayscale changes in local pixel regions. For example, at edges and textures in the image, the inflection points and angles of particle motion trajectories will show significant differences. Furthermore, by calculating the particle motion disorder index A, the complexity of local grayscale can be accurately quantified, providing a precise basis for subsequent grayscale adjustments, effectively enhancing image details and making previously blurred edges and textures clearer. The grayscale value G is adjusted based on the particle motion disorder index A, the adjacent pixel index Ap, and the threshold Ath. When A is greater than the threshold, it indicates that the local grayscale changes of the pixel are complex (possibly due to rich details or noise interference). The formula... It can adaptively adjust grayscale, highlighting details (such as enhancing contrast at edges) and suppressing abnormal grayscale fluctuations caused by noise to a certain extent, making the image grayscale distribution more reasonable and improving image quality.
[0036] The particle motion disorder index Ap of adjacent pixels is used in the grayscale adjustment calculation, taking into account the correlation between pixels. When adjusting the grayscale of a single pixel, the situation of surrounding pixels is referenced to avoid the "patchwork effect" (over-adjustment in a localized area that is inconsistent with the surrounding area) caused by local adjustments. This ensures a natural and harmonious overall grayscale transition, making the preprocessed image visually more coherent and stable, which is beneficial for subsequent higher-order image processing tasks such as object detection and recognition. Pixels with a particle motion disorder index greater than or less than a threshold are treated differently. Pixels with a particle motion disorder index less than the threshold retain their original grayscale, while those greater than the threshold are adjusted. This allows for targeted enhancement of areas that require detail (such as areas containing important target features) while preserving the original state of grayscale-stable areas (such as the background). This makes image preprocessing more targeted, improving the quality of key areas while maintaining the natural properties of the overall image, laying the foundation for high-quality image input for subsequent models.
[0037] In another embodiment, color space distribution recognition is performed on the tristimulus value image to obtain the visual perception features of all target objects in the target scene; based on the visual perception features, the color difference state of each target object is calibrated, including: Based on the conversion relationship from standard color space to RGB space, the tristimulus value image is converted into an RGB image, and the color space distribution of the RGB image is identified to obtain the visual perception features of each target object in the target scene; where visual perception features refer to the sensitivity of machine vision in perceiving the surface color of the target object. The color difference state of each target object is calibrated by comparing the visual perception features with the reference visual perception features corresponding to the surface color of the target object. The color difference state refers to the difference between the sensitivity of the machine vision in perceiving the surface color of the target object and the expected reference sensitivity.
[0038] The beneficial effects of the above embodiments are as follows: In practical operation, a conversion matrix from standard color space to RGB space is used to convert the tristimulus value image into an RGB image. This conversion matrix is a commonly used color space transformation matrix in the field and will not be described in detail here. Furthermore, the U-Net neural network model can be used to complete the conversion from tristimulus value image to RGB image. Then, color space distribution recognition is performed on the RGB image to obtain the sensitivity of the machine vision's current perception of the surface color of each target object in the target scene. The sensitivity of the machine vision's current perception of the target object's surface color is then compared with the expected baseline sensitivity corresponding to the baseline visual perception features to determine the sensitivity difference between the two. This quantitatively characterizes the degree of color difference of each target object in the target scene under the baseline illumination state, providing a basis for subsequently adjusting the illumination spectrum of the light source on each target object.
[0039] In another embodiment, based on real-time shooting parameters of the target scene by machine vision, a visually recognizable target object in the target scene is determined; based on the color difference state of the visually recognizable target object, the illumination state of the light source is adjusted, including: The machine vision system acquires the real-time field of view and real-time focus distance of the target scene, and determines the visual recognition target of the target scene based on the real-time field of view and real-time focus distance. Based on the color difference state of the visually recognizable target object, determine the target value for adjusting the illumination spectrum of the visually recognizable target object; based on the spatial position and the target value for adjusting the illumination spectrum of the visually recognizable target object, adjust the illumination spectrum of the sub-light source within the light source that matches the position of the visually recognizable target object.
[0040] The beneficial effects of the above embodiments, considering the large spatial range of the target scene and the large number of internal targets, mean that machine vision can only identify a portion of the targets within a local area of the target scene at any given time. To ensure that the light source can provide color-difference-free illumination to these targets during the machine vision's identification of them, it is necessary to first determine the target objects that the machine vision is currently targeting. Specifically, this involves obtaining the real-time shooting field of view and real-time focusing focal length of the machine vision over the target scene. Based on these parameters, the target objects that the machine vision is currently aiming at and focusing on within the target scene are determined. For example, the real-time focusing focal length is compared with all targets within the real-time shooting field of view to identify targets within that focal length range. These targets are then used as the visual recognition targets for the machine vision. Next, based on the color difference state of the visually recognized target objects, the sensitivity difference corresponding to the color difference state is processed using a U-Net neural network model to determine the target value for adjusting the illumination spectrum to eliminate the color difference of the visually recognized target objects, i.e., the target spectral range to which the illumination light is expected to be adjusted. Based on the spatial position of the visual recognition target, a sub-light source within the light source that can direct the irradiation light toward the visual recognition target is determined. The target value is adjusted according to the illumination spectrum, and the illumination spectrum range of the sub-light source is adjusted to ensure that the light emitted by the sub-light source effectively eliminates the color difference of the visual recognition target after irradiating it, thereby achieving color enhancement of the target image.
[0041] In summary, the image-enhancing machine vision light source controller and method preprocess the original image of the target scene under reference illumination, then converts the original image into a tristimulus value image of the target scene. Color space distribution recognition is performed on the tristimulus value image to obtain the visual perception features of all objects in the target scene, thereby calibrating the color difference state of each object. Based on the real-time shooting parameters of the machine vision, the visual recognition target objects are determined. According to the color difference state of the visual recognition target objects, the illumination state of the light source is adjusted. Using the light source under reference illumination as a reference, the color difference state of all objects in the target scene under the illumination of the light source is calibrated, and the illumination spectrum of each target object is adjusted in a targeted manner to reduce the color difference in machine vision recognition and achieve color enhancement of the object's image.
[0042] The above is only one specific embodiment of the present invention, and any improvements made based on the concept of the present invention shall be considered within the scope of protection of the present invention.
Claims
1. A machine vision light source controller capable of image enhancement, characterized in that, include: An image processing module is used to acquire the original image of the target scene when the light source is under reference illumination, and to preprocess the original image; The image conversion and recognition module is used to convert and recognize the original image to obtain the tristimulus value image of the target scene; The visual perception determination module is used to perform color space distribution recognition on the tristimulus value image to obtain the visual perception features of all target objects in the target scene. A color difference calibration module is used to calibrate the color difference state of each target object based on the visual perception characteristics. The target object determination module is used to determine the visually recognizable target object of the target scene based on the real-time shooting parameters of the target scene by machine vision. The light source illumination adjustment module is used to adjust the illumination state of the light source according to the color difference state of the visually identified target object.
2. The image-enhancing machine vision light source controller as described in claim 1, characterized in that: The image processing module is used to acquire the original image of the target scene when the light source is under reference illumination, and to preprocess the original image, including: The original panoramic image of the target scene under reference illumination conditions is processed by noise reduction filtering and pixel brightness consistency preprocessing. The image conversion and recognition module is used to convert and recognize the original image to obtain the tristimulus value image of the target scene, including: The original panoramic image is subjected to spectral conversion to obtain a multispectral image; the multispectral image is subjected to chromaticity conversion to obtain a tristimulus value image of the target scene; wherein, the tristimulus value image is a CIEXYZ tristimulus value image.
3. The image-enhancing machine vision light source controller as described in claim 2, characterized in that: The image processing module is used to acquire the original image of the target scene when the light source is under reference illumination, and to preprocess the original image, including: Retrieve the original image and take a 3×3 window centered on each pixel; Virtually emit grayscale detection particles in eight directions; The grayscale detection particles move along the grayscale gradient direction within the serial port, and the number of inflection points and the angle of abrupt change in direction of each grayscale detection particle's trajectory are recorded. The number of inflection points and the direction change angle are normalized to obtain the normalized number of inflection points and the direction change angle. The particle motion disorder index corresponding to each pixel is determined by using the number of inflection points and the direction change angle after normalization of the motion trajectory of each gray-scale probe particle. The particle turbulence index corresponding to each pixel is obtained by the following formula: , Where A represents the particle motion disorder index corresponding to each pixel; N i θ represents the normalized number of inflection points corresponding to the gray-scale detection particles in the i-th direction; i T represents the average of the normalized absolute values of the directional abrupt change angles corresponding to the gray-scale detection particles in the i-th direction; i This represents the duration of motion of the grayscale probe particle in the i-th direction; The particle motion disorder index is compared with a preset index threshold. When the particle movement disorder index is greater than the preset index threshold, the gray value of the current pixel is adjusted using the particle movement disorder index. The adjusted grayscale value is obtained using the following formula: , Where G represents the adjusted grayscale value; G0 represents the original grayscale value of the corresponding pixel; A represents the particle motion disorder index of the corresponding pixel; A th Indicates the preset exponential threshold; A p The particle movement disorder index represents the particle movement disorder index of adjacent pixels of a pixel; When the particle running disorder index is not greater than the preset index threshold, the gray value of the current pixel will not be adjusted.
4. The image-enhancing machine vision light source controller as described in claim 1, characterized in that: The visual perception determination module is used to perform color space distribution recognition on the tristimulus value image to obtain the visual perception features of all target objects in the target scene, including: Based on the conversion relationship from standard color space to RGB space, the tristimulus value image is converted into an RGB image, and color space distribution recognition is performed on the RGB image to obtain the visual perception features of each target object in the target scene; wherein, the visual perception features refer to the sensitivity of machine vision in perceiving the surface color of the target object. The color difference calibration module is used to calibrate the color difference state of each target object based on the visual perception features, including: The visual perception features are compared with the reference visual perception features corresponding to the surface color of the target object to calibrate the color difference state of each target object; wherein, the color difference state refers to the difference between the sensitivity of the machine vision in perceiving the surface color of the target object and the expected reference sensitivity.
5. The image-enhancing machine vision light source controller as described in claim 1, characterized in that: The target object determination module is used to determine the visually recognizable target object of the target scene based on the real-time shooting parameters of the target scene by machine vision, including: The machine vision system acquires the real-time field of view and real-time focus distance of the target scene, and determines the visual recognition target of the target scene based on the real-time field of view and the real-time focus distance. The light source illumination adjustment module is used to adjust the illumination state of the light source according to the color difference state of the visually recognized target object, including: Based on the color difference state of the visually recognizable target object, a target value for adjusting the illumination spectrum of the visually recognizable target object is determined; based on the spatial position of the visually recognizable target object and the target value for adjusting the illumination spectrum, the illumination spectrum of the sub-light source within the light source that matches the position of the visually recognizable target object is adjusted.
6. A machine vision light source control method for image enhancement, characterized in that, include: Acquire the original image of the target scene under reference illumination conditions, and preprocess the original image; The original image is converted and recognized to obtain the tristimulus value image of the target scene; Color space distribution recognition is performed on the tristimulus value image to obtain the visual perception features of all target objects in the target scene; based on the visual perception features, the color difference state of each target object is calibrated. Based on the real-time shooting parameters of the target scene by machine vision, the visual recognition target object of the target scene is determined; based on the color difference state of the visual recognition target object, the illumination state of the light source is adjusted.
7. The image-enhancing machine vision light source control method as described in claim 6, characterized in that: Acquire the original image of the target scene under reference illumination conditions, and preprocess the original image; Transforming and recognizing the original image to obtain the tristimulus value image of the target scene includes: The original panoramic image of the target scene under reference illumination conditions is processed by noise reduction filtering and pixel brightness consistency preprocessing. The original panoramic image is subjected to spectral conversion to obtain a multispectral image; the multispectral image is subjected to chromaticity conversion to obtain a tristimulus value image of the target scene; wherein, the tristimulus value image is a CIEXYZ tristimulus value image.
8. The image-enhancing machine vision light source control method as described in claim 7, characterized in that: The image processing module is used to acquire the original image of the target scene when the light source is under reference illumination, and to preprocess the original image, including: Retrieve the original image and take a 3×3 window centered on each pixel; Virtually emit grayscale detection particles in eight directions; The grayscale detection particles move along the grayscale gradient direction within the serial port, and the number of inflection points and the angle of abrupt change in direction of each grayscale detection particle's trajectory are recorded. The number of inflection points and the direction change angle are normalized to obtain the normalized number of inflection points and the direction change angle. The particle motion disorder index corresponding to each pixel is determined by using the number of inflection points and the direction change angle after normalization of the motion trajectory of each gray-scale probe particle. The particle turbulence index corresponding to each pixel is obtained by the following formula: , Where A represents the particle motion disorder index corresponding to each pixel; N i θ represents the normalized number of inflection points corresponding to the gray-scale detection particles in the i-th direction; i T represents the average of the normalized absolute values of the directional abrupt change angles corresponding to the gray-scale detection particles in the i-th direction; i This represents the duration of motion of the grayscale probe particle in the i-th direction; The particle motion disorder index is compared with a preset index threshold. When the particle movement disorder index is greater than the preset index threshold, the gray value of the current pixel is adjusted using the particle movement disorder index. The adjusted grayscale value is obtained using the following formula: , Where G represents the adjusted grayscale value; G0 represents the original grayscale value of the corresponding pixel; A represents the particle motion disorder index of the corresponding pixel; A th Indicates the preset exponential threshold; A p The particle movement disorder index represents the particle movement disorder index of adjacent pixels of a pixel; When the particle running disorder index is not greater than the preset index threshold, the gray value of the current pixel will not be adjusted.
9. The image-enhancing machine vision light source control method as described in claim 6, characterized in that: Color space distribution recognition is performed on the tristimulus value image to obtain the visual perception features of all target objects in the target scene; Based on the aforementioned visual perception features, the color difference state of each target object is calibrated, including: Based on the conversion relationship from standard color space to RGB space, the tristimulus value image is converted into an RGB image, and color space distribution recognition is performed on the RGB image to obtain the visual perception features of each target object in the target scene; wherein, the visual perception features refer to the sensitivity of machine vision in perceiving the surface color of the target object. The visual perception features are compared with the reference visual perception features corresponding to the surface color of the target object to calibrate the color difference state of each target object; wherein, the color difference state refers to the difference between the sensitivity of the machine vision in perceiving the surface color of the target object and the expected reference sensitivity.
10. The image-enhancing machine vision light source control method as described in claim 6, characterized in that: Based on the real-time shooting parameters of the target scene by machine vision, the visual recognition target object of the target scene is determined; Adjusting the illumination state of the light source based on the color difference state of the visually recognized target object includes: The machine vision system acquires the real-time field of view and real-time focus distance of the target scene, and determines the visual recognition target of the target scene based on the real-time field of view and the real-time focus distance. Based on the color difference state of the visually recognizable target object, a target value for adjusting the illumination spectrum of the visually recognizable target object is determined; based on the spatial position of the visually recognizable target object and the target value for adjusting the illumination spectrum, the illumination spectrum of the sub-light source within the light source that matches the position of the visually recognizable target object is adjusted.