Image color calibration method and device, electronic equipment and storage medium
By performing spectral correlation region division and color temperature calibration on multispectral images, the problem of color reproduction under complex lighting conditions was solved, achieving high-accuracy color reproduction and improved user experience.
Patent Information
- Application Number
- CN202610024077.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-09
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies struggle to achieve highly accurate image color reproduction under complex lighting conditions, failing to meet color reproduction requirements in multi-light source scenarios.
By acquiring multispectral images, preprocessing them, dividing them into spectral correlation regions, performing spectral inversion, obtaining reflectance spectral curves, determining the target color temperature value, and calibrating the color temperature of the spectral correlation regions based on the target color temperature value.
It achieves high-accuracy color reproduction under complex lighting conditions, improves user experience, adapts to environmental changes, and performs real-time calibration.
Smart Images

Figure CN121505053A_ABST
Abstract
Description
Technical Field
[0001] This invention relates generally to the field of spectral technology, and more particularly to an image color calibration method, apparatus, electronic device, and storage medium. Background Technology
[0002] Different color temperatures of light sources evoke different feelings. High color temperature light sources, if not very bright, can create a cold or damp feeling; low color temperature light sources, if too bright, can create a stuffy or oppressive feeling. Lower color temperatures result in warmer (redder) tones, while higher color temperatures result in cooler (bluer) tones.
[0003] Current technical solutions address image color cast issues by adjusting color temperature. However, these methods, limited to adjusting a single color temperature value, cannot achieve high-accuracy color reproduction under complex lighting conditions, thus failing to meet user needs. Therefore, achieving high-accuracy color reproduction under complex lighting conditions is a technical problem this invention aims to solve.
[0004] The content of the background section is merely the technology known to the inventor and does not necessarily represent the prior art in this field. Summary of the Invention
[0005] In view of one or more of the problems existing in the prior art, the present invention provides an image color calibration method, an image color calibration device, an electronic device, and a computer-readable storage medium, which can calibrate the color temperature of the spectral correlation region, realize accurate global or local color restoration of multispectral images, and achieve high-accuracy color restoration under complex lighting conditions.
[0006] A first aspect of the present invention provides an image color calibration method. The image color calibration method includes: acquiring a multispectral image; preprocessing the multispectral image; dividing the preprocessed multispectral image into at least one spectral correlation region; performing spectral inversion on the spectral correlation region to obtain a reflectance spectral curve; determining a target color temperature value for the spectral correlation region based on the reflectance spectral curve; and calibrating the color temperature of the spectral correlation region based on the target color temperature value.
[0007] Optionally, preprocessing the multispectral image includes at least one of the following operations: background subtraction, shadow removal, and interpolation.
[0008] Optionally, the spectral correlation region is a pixel region in the multispectral image that has the same or similar spectral features.
[0009] Optionally, determining the target color temperature value of the spectral correlation region based on the reflectance spectral curve includes: determining the light source spectral curve of the spectral correlation region based on the reflectance spectral curve; and determining the target color temperature value based on the light source spectral curve.
[0010] Optionally, determining the target color temperature value based on the light source spectral curve includes: calculating the tristimulus values of the light source based on the light source spectral curve and the standard observer spectral tristimulus values; converting the tristimulus values of the light source into color coordinates on the CIE chromaticity diagram; and calculating the target color temperature value based on the light source color coordinates and the blackbody locus.
[0011] Optionally, calculating the target color temperature value includes: calculating the target color temperature value based on the light source color coordinates and the blackbody color coordinates of the blackbody trajectory.
[0012] Optionally, calculating the target color temperature value includes: within a preset temperature range, searching on the blackbody trajectory for the blackbody coordinate with the smallest color difference distance from the light source color coordinate; and taking the color temperature value corresponding to the blackbody coordinate with the smallest distance as the target color temperature value.
[0013] Optionally, calibrating the color temperature of the spectral correlation region according to the target color temperature value includes adjusting the color temperature of the spectral correlation region to the target color temperature value.
[0014] Optionally, the number of spectral correlation regions includes multiple regions, and the image color calibration method further includes: performing spectral inversion on the multiple spectral correlation regions respectively to obtain multiple reflectance spectral curves; determining the target color temperature value of the multiple spectral correlation regions respectively based on the multiple reflectance spectral curves; and calibrating the color temperature of the multiple spectral correlation regions respectively based on the target color temperature value of the multiple spectral correlation regions.
[0015] Optionally, the number of spectral correlation regions may include one or more, and the image color calibration method may further include: selecting a ROI spectral correlation region from the one or more spectral correlation regions; performing spectral inversion on the ROI spectral correlation region to obtain a reflectance spectral curve; determining the target color temperature value of the ROI spectral correlation region based on the reflectance spectral curve; and calibrating the color temperature of the ROI spectral correlation region based on the target color temperature value of the ROI spectral correlation region.
[0016] Optionally, the image color calibration method further includes: under preset conditions, calibrating the color temperature of the spectral correlation region according to the target color temperature value.
[0017] Optionally, the spectral correlation region includes multiple pixels, each pixel includes multiple channel data, and the image color calibration method further includes: performing noise reduction processing on the spectral correlation region, including: performing mean processing on the corresponding channel data of each pixel in the spectral correlation region.
[0018] A second aspect of the present invention provides an image color calibration apparatus. The image color calibration apparatus includes a processor configured to perform the image color calibration method described above.
[0019] Optionally, the image color calibration device further includes: a microlens array, a filter unit array, and a photoelectric sensor array coupled to the processor, arranged along the optical path, wherein each filter unit includes a filter sub-unit array, the filter sub-unit array being configured to form multiple spectral channels; the photoelectric sensor is configured to convert incident light signals into electrical signals; and the processor is configured to generate a multispectral image based on the electrical signals, the multispectral image including data from the multiple spectral channels.
[0020] A third aspect of the present invention provides an electronic device. The electronic device includes the image color calibration device described above.
[0021] A fourth aspect of the present invention provides a computer-readable storage medium. The computer-readable storage medium includes computer-executable instructions stored thereon, which, when executed by a processor, implement the image color calibration method described above.
[0022] The image color calibration method and device of the present invention divide a preprocessed multispectral image into at least one spectral correlation region, perform spectral inversion on the spectral correlation region to obtain a reflectance spectral curve, determine the target color temperature value of the spectral correlation region based on the reflectance spectral curve, and calibrate the color temperature of the spectral correlation region based on the target color temperature value. This enables independent calibration of the color temperature of the spectral correlation region, achieving accurate global or local color reproduction of the multispectral image, solving the color cast problem caused by multi-light source scenes, and achieving accurate color reproduction in the visible light band that conforms to human visual perception, thus helping to improve the user experience.
[0023] The electronic device of the present invention integrates an image color calibration device, which is highly efficient, small in size and low in cost. It can independently calibrate the color temperature of the spectral correlation region, achieve accurate global or local color reproduction of multispectral images, solve the color cast problem caused by multi-light source scenes, and achieve accurate color reproduction in the visible light band that conforms to human visual perception, thus helping to improve the user experience.
[0024] The image color calibration method and device of the present invention can realize the acquisition of color temperature of the image in different areas, and perform white balance processing according to the color temperature values of different areas. The higher the color reproduction of the processed image, the closer it is to the human eye's visual perception. It can achieve high-accuracy color reproduction under complex lighting conditions (e.g., multiple light sources) and can be calibrated in real time to adapt to environmental changes. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the following description of the embodiments will be provided as examples. The drawings described below are merely embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort. The drawings are used to provide a further understanding of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention and do not constitute a limitation of the present invention.
[0026] Figure 1 A schematic flowchart of an image color calibration method according to some embodiments of the present invention is shown.
[0027] Figure 2 A schematic diagram of an image color calibration apparatus according to some embodiments of the present invention is shown.
[0028] Figure 3 A schematic diagram of an image color calibration apparatus according to some embodiments of the present invention is shown.
[0029] Figure 4 This diagram illustrates how a preprocessed multispectral image is divided into a spectral correlation region according to some embodiments of the present invention.
[0030] Figure 5 This diagram illustrates the division of a preprocessed multispectral image into multiple spectral correlation regions according to some embodiments of the present invention.
[0031] Figure 6 A flowchart illustrating step S14 according to some embodiments of the present invention is shown.
[0032] Figure 7 A schematic diagram illustrating the calculation of a target color temperature value according to some embodiments of the present invention is shown.
[0033] Figure 8 A schematic diagram of an electronic device according to some embodiments of the present invention is shown. Detailed Implementation
[0034] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0035] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0036] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "coupling" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection, an electrical connection, or a connection that allows for communication; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0037] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0038] The following provides many different embodiments or examples for implementing various structures of the invention. To simplify the invention, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed. In addition, examples of various specific processes and materials are provided in this invention, but those skilled in the art will recognize the application of other processes and / or the use of other materials.
[0039] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0040] This invention provides an image color calibration method. The image color calibration method includes: acquiring a multispectral image; preprocessing the multispectral image; dividing the preprocessed multispectral image into at least one spectral correlation region; performing spectral inversion on the spectral correlation region to obtain a reflectance spectral curve; determining the target color temperature value of the spectral correlation region based on the reflectance spectral curve; and calibrating the color temperature of the spectral correlation region based on the target color temperature value. This image color calibration method can calibrate the color temperature of the spectral correlation region, achieving accurate global or local color reproduction of the multispectral image, and achieving high-accuracy color reproduction under complex lighting conditions.
[0041] Figure 1 A schematic flowchart of an image color calibration method according to some embodiments of the present invention is shown. Figure 1 As shown, the image color calibration method 10 includes steps S11 to S15. Step S11: Acquire a multispectral image and preprocess it. Step S12: Divide the preprocessed multispectral image into at least one spectral correlation region. Step S13: Perform spectral inversion on the spectral correlation region to obtain a reflectance spectral curve. Step S14: Determine the target color temperature value of the spectral correlation region based on the reflectance spectral curve. Step S15: Calibrate the color temperature of the spectral correlation region based on the target color temperature value.
[0042] In some embodiments, the image color calibration method 10 may be executed by a processor. In some embodiments, the processor may be located on an electronic device such as an image color calibration device, a mobile phone, a tablet computer, a laptop computer, a wearable device, an in-vehicle device, an augmented reality (AR) / virtual reality (VR) device, an ultramobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), or a smart home device.
[0043] In some embodiments, the processor may include processing circuitry, a central processing unit (CPU), a microcontroller unit (MCU), a digital signal processor (DSP), a graphics processing unit (GPU), an accelerator, a neural processing unit (NPU), a tensor processing unit (TPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, gate devices, or transistor logic devices, or similar devices.
[0044] The present invention also provides an image color calibration device. Figure 2 A schematic diagram of an image color calibration apparatus 20 according to some embodiments of the present invention is shown. Figure 2 As shown, the image color calibration device 20 includes a processor 21. The processor 21 can execute the image color calibration method 10.
[0045] Figure 3 A schematic diagram of an image color calibration apparatus 20 according to some embodiments of the present invention is shown. Figure 3 As shown, the image color calibration device 20 also includes a microlens array 22, a filter unit array 23, and a photoelectric sensor array 24 coupled to the processor 21, arranged along the optical path. Although not shown in the figure, the upstream of the optical path of the microlens array 22 may include a lens or a lens group.
[0046] In some embodiments, the microlens array 22 may include a plurality of microlenses. The plurality of microlenses may be arranged in a one-dimensional array or a two-dimensional array. The microlenses may focus the incident light L onto the filter unit array 23. In some embodiments, the incident surface of the microlenses may include an antireflection coating to improve light throughput, reduce reflection, and suppress noise.
[0047] In some embodiments, the filter unit array 23 is located downstream of the optical path of the microlens array 22. The filter unit array 23 includes multiple filter units. The multiple filter units can be arranged in a one-dimensional or two-dimensional array. Each filter unit can include an array of filter sub-units. The filter sub-unit array can be a one-dimensional or two-dimensional array. For example, the filter sub-units can be arranged in an n*n two-dimensional array or an m*n two-dimensional array, where n and m are positive integers, and n≠m. For example, the filter sub-unit array can be arranged in 2*2, 3*3, 4*4, 2*3, 3*4 arrays, etc. Each filter sub-unit can have a specific transmittance curve. Each filter sub-unit can form a spectral channel to allow light of a preset wavelength band to pass through. The operating wavelength bands of the filter sub-units in each filter unit are not exactly the same. For example, the operating wavelength bands of the filter sub-units in each filter unit can be different or partially the same. The filter sub-unit array in each filter unit can form multiple spectral channels to allow light of multiple preset wavelength bands to pass through. In some embodiments, the preset wavelength band includes the visible light band. In other words, the image color calibration method 10 and image color calibration device 20 of the present invention operate in the visible light band, enabling color temperature calibration in the visible light band. Compared with color temperature calibration using infrared spectroscopy, the present invention can achieve accurate color reproduction that conforms to visual effects, thus improving user experience. In some embodiments, the filter subunit may include filter films, filters, nanoarrays, gratings, or similar devices to achieve wavelength selection. It should be noted that the present invention does not limit the number, arrangement, transmittance, number of channels, device type, or other parameters of the filter subunits in each filter unit. In practical applications, these parameters can be configured according to requirements.
[0048] In some embodiments, the photoelectric sensor array 24 is located downstream of the optical path of the filter unit array 23. The photoelectric sensor array 24 includes multiple photoelectric sensors. The multiple photoelectric sensors can be arranged in a one-dimensional or two-dimensional array. The photoelectric sensors can convert incident light signals into electrical signals. In some embodiments, the photoelectric sensor can include one or more pixels. The multiple pixels can be arranged in a one-dimensional or two-dimensional array. The pixel can serve as the smallest photosensitive unit of the photoelectric sensor array, converting incident light signals into electrical signals. In some embodiments, the pixel can include photosensitive elements such as photodiodes or phototransistors, for example, charge-coupled devices (CCDs) or complementary metal-oxide-semiconductor (CMOS) devices.
[0049] In some embodiments, the processor 21 is coupled to the photoelectric sensor array 24. The processor 21 can generate a multispectral image based on the electrical signal output by the photoelectric sensor array 24. The multispectral image includes multiple pixels. Each pixel includes three-dimensional data (x, y, λ). Here, x and y represent spatial dimensions, indicating the horizontal and vertical positions of the pixel in the image, and represent pixel coordinates. λ represents the spectral dimension, indicating wavelength. The multispectral image can reflect the reflection, absorption, or emission characteristics of an object at different wavelengths. The multispectral image includes data from multiple spectral channels. It should be noted that the present invention does not limit the correspondence between microlenses, filter units, filter sub-units, photoelectric sensors, pixels, and image pixels; it can be one-to-many or many-to-one, and can be configured according to requirements in practical applications.
[0050] In some embodiments, the image color calibration device 20 may further include a memory coupled to the processor 21. The memory may store information such as multispectral images and program instructions. The processor 21 may retrieve multispectral image data, program instructions, and other information from the memory. In some embodiments, the memory may include random access memory (RAM) or non-volatile memory (NVM). Further, the memory may include at least one of phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), read-only memory (ROM), and electrically erasable programmable read-only memory (EEPROM).
[0051] In some embodiments, the image color calibration device 20 may include a spectral camera. The spectral camera can acquire image data from multiple spectral channels in a single shot. In some embodiments, the microlens array 22, the filter unit array 23, and the photoelectric sensor array 24 may be integrated onto a single spectral chip. In some embodiments, the processor 21, the microlens array 22, the filter unit array 23, and the photoelectric sensor array 24 may be integrated onto a single spectral chip. In some embodiments, the processor 21 may be located on a separate chip. In practical applications, configuration can be tailored to specific needs. The image color calibration device 20 of the present invention is highly efficient, small in size, and low in cost, making it easy to integrate into various electronic devices.
[0052] The following describes each step using the image color calibration method 10 executed by processor 21 as an example. It is understood that examples of processors in other electronic devices executing the image color calibration method 10 are similar.
[0053] In some embodiments, in step S11, the processor 21 can acquire a multispectral image and preprocess the multispectral image. (Refer to...) Figure 3 The processor 21 is coupled to the photoelectric sensor array 24. The processor 21 can generate a multispectral image based on the electrical signals output by the photoelectric sensor array 24. The multispectral image includes multiple pixels. Each pixel includes three-dimensional data (x, y, λ). Here, x and y represent the spatial dimensions, indicating the horizontal and vertical positions of the pixel in the image, and representing the pixel coordinates. λ represents the spectral dimension, indicating the wavelength. In some embodiments, λ ranges from 400 to 700 nm in the visible light band. The multispectral image includes data from multiple spectral channels. The multispectral image can reflect the reflection, absorption, or emission characteristics of an object at different wavelengths.
[0054] In some embodiments, preprocessing a multispectral image includes at least one of background subtraction, shadow removal, and interpolation. For example, processor 21 can utilize an image segmentation algorithm to segment the spectral image to achieve background subtraction and shadow removal, which helps to remove noise and improve accuracy. In some embodiments, the image segmentation algorithm may include end-to-end algorithms such as UYOLO and U-NET, but the invention is not limited thereto. For example, processor 21 can perform interpolation processing using nearest neighbor interpolation, bilinear interpolation, bicubic interpolation, etc., but the invention is not limited thereto. Through interpolation processing, each pixel of the multispectral image can include data from multiple spectral channels.
[0055] In some embodiments, in step S12, the processor 21 may divide the preprocessed multispectral image into at least one spectral correlation region. A spectral correlation region is a pixel region in the multispectral image that has the same or similar spectral features. Dividing the multispectral image into spectral correlation regions can be understood as filtering and classifying pixels with high spectral information correlation in the spectral image. Each spectral correlation region includes multiple pixels. Each pixel includes multiple channel data. The number of spectral correlation regions is related to the spectral features of the multispectral image. The processor 21 may divide the preprocessed multispectral image into one spectral correlation region, or it may divide the preprocessed multispectral image into multiple spectral correlation regions, depending on the degree of similarity or identical spectral features between pixels, as appropriate.
[0056] Figure 4 This diagram illustrates how a preprocessed multispectral image is divided into a spectral correlation region according to some embodiments of the present invention. Figure 4 As shown, processor 21 divides the preprocessed multispectral image into a spectral correlation region A. For example, the target is a solid color. Examples include blue sky, sea, red wall, etc.
[0057] Figure 5 This diagram illustrates the division of a preprocessed multispectral image into multiple spectral correlation regions according to some embodiments of the present invention. Figure 5 As shown, the processor 21 divides the preprocessed multispectral image into multiple spectral correlation regions A, B, and C. It should be noted that this description uses spectral correlation regions A, B, and C as an example, and the invention is not limited thereto.
[0058] It is understandable that the number of pixels, area size, and pixel distribution may be the same or different between different spectral correlation regions. Pixels within the same spectral correlation region may be evenly distributed or unevenly distributed. Multiple pixels within the same spectral correlation region may be physically adjacent or logically adjacent.
[0059] In some embodiments, the processor 21 can perform spectral correlation region division on the preprocessed multispectral image based on a grayscale reference value method. For example, the processor 21 can determine the grayscale value of each channel corresponding to each pixel in the preprocessed multispectral image. Based on the grayscale values of the corresponding channels, the processor 21 can determine a grayscale reference value for each channel. Based on the difference between the grayscale value of each channel of each pixel and the corresponding grayscale reference value, the processor 21 can group pixels with differences less than a grayscale difference threshold into the same spectral correlation region, thereby achieving spectral correlation region division of the multispectral image.
[0060] In some embodiments, the processor 21 can determine the average gray value of each pixel in the multispectral image corresponding to a channel, and use the average gray value as the gray reference value of the corresponding channel. The processor 21 can determine the mean square error between the gray values of multiple channels of each pixel in the multispectral image and the gray reference value of the corresponding channel. Pixels with a mean square error less than a threshold are assigned to a spectral correlation region. Then, the processor 21 can determine the average gray value of the remaining pixels corresponding to a channel, and use this average gray value as the gray reference value of the remaining pixels corresponding to a channel. The processor 21 can determine the mean square error between the gray values of multiple channels of each of the remaining pixels and the gray reference value of the corresponding channel, and assign pixels with a mean square error less than a threshold to another spectral correlation region. This process is continued for the remaining pixels until all pixels of the spectral image are assigned to various spectral correlation regions, resulting in multiple spectral correlation regions.
[0061] In some embodiments, the processor 21 may perform spectral correlation region division on the preprocessed multispectral image based on a clustering algorithm. For example, the clustering algorithm may include K-means clustering, etc.
[0062] This invention utilizes spectral characteristics to divide pixels in a multispectral image that have the same or similar spectral characteristics, thereby obtaining one or more spectrally correlated regions. It should be noted that this invention does not limit the method of dividing spectrally correlated regions; in practical applications, a suitable division method can be selected according to requirements.
[0063] In some embodiments, the image color calibration method 10 further includes: performing noise reduction processing on spectral correlation regions. Each spectral correlation region includes multiple pixels. Each pixel includes multiple channel data. The processor 21 performs noise reduction processing on each spectral correlation region, which helps to improve accuracy.
[0064] In some embodiments, the processor 21 can perform averaging on the corresponding channel data of each pixel in the spectral correlation region to reduce noise in the spectral correlation region. For example, each pixel in the spectral correlation region includes data from nine channels CH1 to CH9. The processor 21 can perform averaging on the data from the nine channels CH1 to CH9 of each pixel in the spectral correlation region. It should be noted that this example only uses nine channels; noise reduction can be performed in a similar manner for other numbers of channels.
[0065] In some embodiments, in step S13, the processor 21 can perform spectral inversion on the spectral correlation region to obtain a reflectance spectral curve. For example, the processor 21 can perform spectral inversion on each spectral correlation region to obtain a reflectance spectral curve for each region. One spectral correlation region corresponds to one reflectance spectral curve. Multiple spectral correlation regions correspond to multiple reflectance spectral curves. For example, the processor 21 performs spectral inversion on spectral correlation region A to obtain the reflectance spectral curve SpecA corresponding to spectral correlation region A. For example, the processor 21 performs spectral inversion on spectral correlation region B to obtain the reflectance spectral curve SpecB corresponding to spectral correlation region B. For example, the processor 21 performs spectral inversion on spectral correlation region C to obtain the reflectance spectral curve SpecC corresponding to spectral correlation region C. It should be noted that spectral correlation regions A, B, and C are used as examples for illustrative purposes, and the invention is not limited thereto.
[0066] In some embodiments, in step S14, the processor 21 determines the target color temperature value of the spectral correlation region based on the reflectance spectral curve. The reflectance spectrum includes light source information and material information. Material information is the reflectance spectrum. The reflectance spectrum of common everyday materials is a broad and smooth curve. The influence factor of material information in the reflectance spectrum is relatively low. Light source information is the light source spectrum. The influence factor of light source information in the reflectance spectrum is relatively high. The processor 21 can approximate the reflectance spectral curve as the light source spectrum curve. Dividing the spectral correlation region can be approximated as dividing different light source regions. By dividing the spectral correlation region, the corresponding light source regions can be obtained. The number of spectral correlation regions corresponds to the number of light source regions. The number of light source regions corresponds to the number of light sources. One spectral correlation region corresponds to one light source region, one light source, one reflectance spectral curve, one light source spectrum curve, and one target color temperature value. Multiple spectral correlation regions correspond to multiple light source regions, multiple light sources, multiple reflectance spectral curves, multiple light source spectrum curves, and multiple target color temperature values. The processor 21 can determine the target color temperature value corresponding to the spectral correlation region based on the reflectance spectral curve corresponding to the spectral correlation region. For example, based on the reflectance spectrum curve SpecA, processor 21 can determine the target color temperature value TA of spectral correlation region A. For example, based on the reflectance spectrum curve SpecB, processor 21 can determine the target color temperature value TB of spectral correlation region C. For example, based on the reflectance spectrum curve SpecC, processor 21 can determine the target color temperature value TC of spectral correlation region C. It should be noted that spectral correlation regions A, B, and C are used as examples here for illustrative purposes; the invention is not limited thereto, and similar methods apply to examples including only one spectral correlation region or multiple spectral correlation regions.
[0067] In some embodiments, the processor 21 can determine the light source spectral curve of the spectral correlation region based on the reflectance spectral curve. Based on the light source spectral curve, the processor 21 can determine the target color temperature value of the spectral correlation region. For example, the processor 21 approximates the reflectance spectral curve SpecA as the light source spectral curve LSpecA of the spectral correlation region A. Based on the light source spectral curve LSpecA, the processor 21 can determine the target color temperature value TA of the spectral correlation region A. For example, the processor 21 approximates the reflectance spectral curve SpecB as the light source spectral curve LSpecB of the spectral correlation region B. Based on the light source spectral curve LSpecB, the processor 21 can determine the target color temperature value TB of the spectral correlation region B. For example, the processor 21 approximates the reflectance spectral curve SpecC as the spectral correlation region C. Based on the reflectance spectral curve LSpecC and the light source spectral curve LSpecC, the processor 21 can determine the target color temperature value TC of the spectral correlation region C. It should be noted that the spectral correlation regions A, B, and C are used as examples for illustrative purposes only. The invention is not limited to these examples; similar methods apply to examples involving only one spectral correlation region or multiple spectral correlation regions.
[0068] Figure 6 A flowchart illustrating step S14 according to some embodiments of the present invention is shown. Figure 6 As shown, step S14 includes operations S141-S143.
[0069] In some embodiments, during operation S141, the processor 21 can calculate the tristimulus values of the light source based on the light source spectral curve and the standard observer spectral tristimulus values. One spectral correlation region corresponds to one light source region, one light source, one reflectance spectral curve, and one set of tristimulus values. X,Y,Z For example, for the spectrally correlated region A, the processor 21 can calculate the tristimulus values of the light source LA based on the reflectance spectral curve LSpecA and the standard observer spectral tristimulus values. XA,YA,ZA For example, for the spectral correlation region B, the processor 21 can calculate the tristimulus values of the light source LB based on the reflectance spectral curve LSpecB and the standard observer spectral tristimulus values. XB,YB,ZB For example, for the spectral correlation region C, the processor 21 can calculate the tristimulus values of the light source LC based on the reflectance spectral curve LSpecC and the standard observer spectral tristimulus values. XC,YC,ZC The tristimulus values of the light source are calculated based on the spectral curve of the light source and the standard observer's spectral tristimulus values, conforming to the characteristics of human visual perception. It should be noted that this example uses spectral correlation regions A, B, and C as illustrations; the invention is not limited to these, and similar methods apply to examples including only one spectral correlation region or multiple spectral correlation regions.
[0070] In some embodiments, the processor 21 can determine the spectrum P based on the light source spectral curve. According to the spectrum P and standard observer spectral tristimulus values ( The processor 21 can calculate the tristimulus values of the light source. X , Y , Z ).
[0071] In some embodiments, the processor 21 can determine the light source spectral curve and the CIE standard observer spectral tristimulus values (…). ) and (Equation 1-1), (Equation 1-2), (Equation 1-3), calculate the tristimulus values of the light source ( X,Y,Z The processor 21 will process the spectrum respectively. With tristimulus function , , The corresponding wavelengths are multiplied and then summed to obtain the tristimulus values. X、 Y, Z .
[0072] X=k d λ……(Equation 1-1)
[0073] Y=k d λ……(Equation 1-2)
[0074] Z=k d λ……(Equation 1-3)
[0075] Where k is the normalization coefficient. Spectrum The spectrum of the light source spectral curve representing the spectral correlation region.
[0076] In some embodiments, processor 21 can calculate coefficient k using (Equations 1-4).
[0077] k=100 / d λ……(Equation 1-4)
[0078] In some embodiments, equal energy white light... Y =100. It can be understood that equal-energy white light refers to light whose spectral power distribution (SPD) is constant across the entire visible spectrum. Here... Y=100 means normalizing the brightness value of equal-energy white light to 100. The coefficient k is 1. In some embodiments, the integral of discrete spectral data can be approximated by summing using the trapezoidal rule.
[0079] In some embodiments, during operation S142, the processor 21 can convert the tristimulus values of the light source into color coordinates on the CIE chromaticity diagram. The processor 21 can convert the tristimulus values of the light source into color coordinates on the CIE chromaticity diagram based on the conversion relationship between the CIEXYZ color space and CIE chromaticity coordinates.
[0080] For example, processor 21 can, based on (Equation 2-1) and (Equation 2-2), convert the tristimulus values ( X,Y,Z Convert the values to color coordinates (x, y) on the CIE 1931 chromaticity diagram. Color coordinates can be used to locate the color position of a light source. The color position of a light source can be understood as the position where the light source affects the multispectral image. A set of tristimulus values ( X,Y,Z ) corresponds to a color coordinate (x, y). Multiple sets of tristimulus values ( X,Y,Z This corresponds to multiple color coordinates (x, y). Color coordinates (x, y) can characterize the color position of the light source. For example, for the spectral correlation region A, processor 21 can convert the tristimulus values of the light source LA (x, y) into multiple color coordinates (x, y). XA,YA,ZA Convert to color coordinates (x) A ,y A ), color coordinates (x A ,y A () can characterize the color position of the light source LA. For example, for the spectral correlation region B, the processor 21 can represent the tristimulus values of the light source LB () XB,YB,ZB Convert to color coordinates (x) B ,y B ), color coordinates (x B ,y B The color position of the light source LB can be characterized. For example, for the spectral correlation region C, the processor 21 can represent the tristimulus values of the light source LC ( XC,YC,ZC Convert to color coordinates (x) C ,y C ), color coordinates (x C ,y C The color position of the light source LC can be characterized. It should be noted that the spectral correlation regions A, B, and C are used as examples for illustration, but the invention is not limited to these. Similar methods can be used for examples that include only one spectral correlation region or more spectral correlation regions.
[0081] ... (Equation 2-1).
[0082] ... (Equation 2-2).
[0083] In some embodiments, during operation S143, the processor 21 can calculate the target color temperature value based on the light source color coordinates and the blackbody trajectory. Figure 7 A schematic diagram illustrating the calculation of a target color temperature value according to some embodiments of the present invention is shown. Figure 7 As shown, in the chromaticity diagram, the Black-Body-Kurve (PL) (also known as the Planck trajectory) is formed by converting the light color corresponding to each temperature during blackbody combustion into chromaticity coordinates and then plotting them on the chromaticity diagram. The temperature corresponding to each color on the Black-Body-Kurve (PL) is the color temperature of the light source. The processor 21 can calculate the target color temperature value based on the light source chromaticity coordinates and the Black-Body-Kurve. One target color temperature value corresponds to one light source and one spectral correlation region. Multiple target color temperature values correspond to multiple light sources and multiple spectral correlation regions.
[0084] like Figure 7 As shown, the blackbody trajectory PL includes multiple blackbody chromatic coordinates. The blackbody trajectory PL also includes multiple isotherms. In some embodiments, the processor 21 can calculate the target color temperature value based on the light source chromatic coordinates (x, y) and the blackbody chromatic coordinates (x0, y0) on the blackbody trajectory. In some embodiments, the processor 21 can calculate the blackbody chromatic coordinates (x0, y0) based on approximate formulas (Equation 3-1) and (Equation 3-2) derived from Planck's law.
[0085] ... (Equation 3-1).
[0086] ... (Equation 3-2).
[0087] Where T is the blackbody temperature (unit: Kelvin).
[0088] In some embodiments, the processor 21 can search for the blackbody coordinate (x0, y0) with the smallest color difference distance between the blackbody coordinate (x, y) and the light source color coordinate (x, y) on the blackbody trajectory PL within a preset temperature range, and take the color temperature value corresponding to the blackbody coordinate (x0, y0) with the smallest color difference distance between the blackbody coordinate (x, y) and the light source color coordinate (x, y) (e.g., the color difference distance is less than a preset value) as the target color temperature value T.
[0089] In some embodiments, the preset temperature range may include 1000K~15000K, covering various light source scenarios to meet daily shooting needs. In some embodiments, the light source may include various natural or artificial light sources such as sunlight, incandescent lamps, flame light sources, candlelight, tungsten filament lamps, flash lamps, fluorescent lamps, tungsten halogen lamps, and photographic lights. For example, a color temperature of 1000K can be used to shoot warm scenes such as those with incandescent lamps, flame light sources, and candlelight. For example, a color temperature of 2000K can be used to shoot scenes with warm golden tones such as sunrises and sunsets. For example, a color temperature of 2600K can be used to shoot scenes with warm light. For example, a color temperature of 3200K can be used to shoot everyday indoor scenes. For example, a color temperature of 3200K is suitable for scenes that require warm tones. For example, a color temperature of 5000-5500K can be used to shoot scenes that require strong and uniform light. For example, a color temperature of 5600K can be used to shoot natural light. For example, a color temperature of 7000-9000K can be used to shoot soft scenes on cloudy days. For example, a color temperature of 10000K can be used to photograph shadowed areas during the day. It should be noted that these light sources and shooting scenarios are merely illustrative examples, and the invention is not limited thereto. Furthermore, these color temperature values can have a certain degree of flexibility.
[0090] In some embodiments, the preset temperature range may include multiple sub-temperature ranges. For example, the sub-ranges may be 1000K~1500K, 1000K~2000K, 1000K~3000K, 2000K~3000K, 2500K~3000K, 2000K~6000K, 3000K~4000K, 3000K~5000K, 4000K~5000K, 4000K~5500K, 5000K~6000K, 3000K~4000K, 3000K~5000K, 4000K~5500K, 5000K~6000K, 3000K~4000K, 3000K~5000K, 4000K~5500K, 5000K~6000K, 5000K~6000K, 3000K~4000K, 3000K~5000K, 4000K~5000K, 4000K~5500K, 5000K~60 ... Temperature ranges range from 5500K to 5500K, 4000K to 6000K, 5500K to 6500K, 5500K to 7500K, 3000K to 7000K, 2000K to 8000K, 4000K to 9000K, 6000K to 9000K, 9000K to 10000K, 7500K to 10000K, and 10000K to 15000K, etc. It should be noted that these sub-temperature ranges are merely illustrative examples, and the invention is not limited thereto. In practical applications, they can be set according to requirements.
[0091] In some embodiments, after determining the light source color coordinates (x, y), the processor 21 can estimate a sub-temperature range based on the light source color coordinates (x, y). Within the sub-temperature range, it searches for the blackbody color coordinates (x0, y0) with the smallest color difference distance from the light source color coordinates (x, y) on the local blackbody trajectory PL. The color temperature value corresponding to this blackbody color coordinate (x0, y0) is taken as the target color temperature value T. This enables local search, saves computing power, improves efficiency, helps to quickly determine the target color temperature value, achieves rapid calibration of color temperature in the spectral correlation region, and achieves high accuracy and efficient color reproduction.
[0092] In some embodiments, the search algorithm may include binary search or Newton's method, etc.
[0093] For example, when the processor 21 searches based on the binary search method, it can search for the blackbody color coordinates corresponding to the middle temperature value of the preset temperature range (or sub-temperature range) on the blackbody trajectory PL. Each time the binary search is performed, the length of the search interval is reduced by half. After multiple iterations, the blackbody color coordinates (x0, y0) with the smallest color difference distance from the light source color coordinates (x, y) are found. The color temperature value corresponding to the blackbody color coordinates (x0, y0) is taken as the target color temperature value T.
[0094] For example, when processor 21 searches based on Newton's method, it can take a point (e.g., point Q1) on the blackbody trajectory PL and draw a tangent line thereto. This tangent line intersects the horizontal axis containing the ordinate of the light source color coordinates (x, y) at point Q2. A perpendicular line is drawn at intersection point Q2, intersecting the blackbody trajectory PL at point Q3. Another tangent line is drawn at point Q3, intersecting the horizontal axis containing the ordinate of the light source color coordinates (x, y) at point Q4. A third perpendicular line is drawn at intersection point Q4, intersecting the blackbody trajectory PL at point Q5. This process is iterated multiple times until the blackbody color coordinates (x0, y0) with the smallest color difference distance from the light source color coordinates (x, y) are found. The color temperature value corresponding to these blackbody color coordinates (x0, y0) is then used as the target color temperature value T.
[0095] The bisection method, which searches by dividing the temperature range in two, is simple and robust. Newton's method, based on tangents (derivatives), provides a fast approximation and allows for rapid searching. Both methods have their advantages. In practical applications, the appropriate search algorithm can be selected based on the specific requirements. Alternatively, the processor 21 can use Lagrange interpolation to determine the blackbody coordinates (x0, y0) on the blackbody trajectory PL that minimize the color difference between the blackbody and the light source color coordinates (x, y).
[0096] In some embodiments, the processor 21 can use a distance function d(T) (Equation 4) Search for the blackbody color coordinates (x0, y0) with the smallest color difference distance between the blackbody trajectory PL and the light source color coordinates (x, y). The processor 21 takes the temperature corresponding to the blackbody color coordinates (x0, y0) with the smallest color difference distance between the blackbody trajectory PL and the light source color coordinates (x, y) as the color temperature of the light source, and as the target color temperature value T.
[0097] ... (Equation 4).
[0098] For example, for the spectral correlation region A, processor 21 can search on the blackbody trajectory PL for the coordinates of the light source color (x... A ,y A The blackbody color coordinate (x) with the smallest color difference distance between ) 0A,y 0A ), set the blackbody color coordinates (x 0A ,y 0A The temperature corresponding to the color coordinates (x, y) of the light source LA is used as the color temperature of the spectral correlation region A, and is also used as the target color temperature value TA of the spectral correlation region A. For example, for the spectral correlation region B, the processor 21 can search on the blackbody trajectory PL for the color coordinates (x, y) of the light source LA. B ,y B The blackbody color coordinate (x) with the smallest color difference distance between ) 0B ,y 0B ), set the blackbody color coordinates (x 0B ,y 0B The temperature corresponding to ) is used as the color temperature of the light source LB, and as the target color temperature value TB for the spectral correlation region B. For example, for the spectral correlation region C, the processor 21 can search on the blackbody trajectory PL for the color coordinates (x, y, y) of the light source. C ,y C The blackbody color coordinate (x) with the smallest color difference distance between ) 0C ,y 0C ), set the blackbody color coordinates (x 0C ,y 0C The temperature corresponding to ) is taken as the color temperature of the light source LC, and as the target color temperature value TC of the spectral correlation region C. It should be noted that the spectral correlation regions A, B, and C are used as examples for illustration, and the present invention is not limited thereto. Examples with only one spectral correlation region or more spectral correlation regions are similar.
[0099] In some embodiments, in step S15, the processor 21 calibrates the color temperature of the spectral correlation region according to the target color temperature value. For example, the processor 21 can adjust the color temperature of the spectral correlation region to the target color temperature value to calibrate the color temperature of the spectral correlation region. For instance, for spectral correlation region A, the processor 21 can adjust the color temperature of spectral correlation region A to the target color temperature value TA to calibrate the color temperature of spectral correlation region A. Similarly, for spectral correlation region B, the processor 21 can adjust the color temperature of spectral correlation region B to the target color temperature value TB to calibrate the color temperature of spectral correlation region B. And again, for spectral correlation region C, the processor 21 can adjust the color temperature of spectral correlation region C to the target color temperature value TC to calibrate the color temperature of spectral correlation region C. It should be noted that spectral correlation regions A, B, and C are used as examples here for illustrative purposes; the invention is not limited thereto, and similar methods apply to examples including only one spectral correlation region or multiple spectral correlation regions.
[0100] In some embodiments, the number of spectral correlation regions includes one. The processor 21 can perform spectral inversion on this spectral correlation region to obtain a reflectance spectral curve. Based on this reflectance spectral curve, the processor 21 can determine the target color temperature value of this spectral correlation region. Based on the target color temperature value of this spectral correlation region, the processor 21 can calibrate the color temperature of this spectral correlation region. In this way, global color temperature calibration of the multispectral image can be performed, achieving accurate color reproduction overall.
[0101] In some embodiments, the number of spectral correlation regions includes multiple regions. The processor 21 can perform spectral inversion on each of the multiple spectral correlation regions to obtain multiple reflectance spectral curves. Based on the multiple reflectance spectral curves, the processor 21 can determine the target color temperature values for each of the multiple spectral correlation regions. Based on the target color temperature values for each of the multiple spectral correlation regions, the processor 21 can calibrate the color temperature of each of the multiple spectral correlation regions. In this way, the color temperature of the multispectral image can be calibrated by region, solving the color cast problem caused by color temperature differences of different light sources (such as sunlight, incandescent lamps, etc.) on the same captured target, achieving accurate color reproduction in each correlation region (local area), and ultimately achieving accurate color reproduction of the multispectral image as a whole.
[0102] In some embodiments, the number of spectral correlation regions includes one or more. The processor 21 can select a ROI spectral correlation region from the one or more spectral correlation regions. The processor 21 can perform spectral inversion on the ROI spectral correlation region to obtain its reflectance spectral curve. Based on the reflectance spectral curve of the ROI spectral correlation region, the processor 21 can determine the target color temperature value of the ROI spectral correlation region. Based on the target color temperature value of the ROI spectral correlation region, the processor 21 can calibrate the color temperature of the ROI spectral correlation region. In this way, the color temperature of the ROI spectral correlation region of a multispectral image can be calibrated, achieving local color temperature calibration of the multispectral image and meeting the user's needs.
[0103] In some embodiments, the ROI spectral correlation region may include one or more spectral correlation regions. (See reference...) Figure 5 For example, if the ROI spectral correlation region is spectral correlation region A, then processor 21 can calibrate the color temperature of spectral correlation region A using the aforementioned method. For example, if the ROI spectral correlation regions are spectral correlation regions A and B, then processor 21 can calibrate the color temperatures of spectral correlation regions A and B respectively using the aforementioned method. For example, if the ROI spectral correlation regions are spectral correlation regions A, B, and C, then processor 21 can calibrate the color temperatures of spectral correlation regions A, B, and C respectively using the aforementioned method. It should be noted that this example uses spectral correlation regions A, B, and C as an example, and the invention is not limited thereto.
[0104] In some embodiments, the ROI spectral correlation region may include local regions of one or more spectral correlation regions. For example, the ROI spectral correlation region may include one or more local regions of a single spectral correlation region. (See also...) Figure 5 For example, if the ROI spectral correlation region is a local region ROIA1 or ROIA2 within spectral correlation region A, processor 21 can calibrate the color temperature of local regions ROIA1 and ROIA2. It is understood that local regions within the same spectral correlation region can have the same color temperature; for example, they can all be the target color temperature value. As another example, if the ROI spectral correlation region is a local region ROIB within spectral correlation region B, processor 21 can calibrate the color temperature of local region ROIB. Yet another example, if the ROI spectral correlation region is a local region ROIC within spectral correlation region C, processor 21 can calibrate the color temperature of local region ROIC. For instance, the ROI spectral correlation region can include multiple local regions within multiple spectral correlation regions. (See reference...) Figure 5 For example, the ROI spectral correlation region is a local region ROIA1 of spectral correlation region A and a local region ROIB of spectral correlation region B. The processor 21 can calibrate the color temperature of the local regions ROIA1 and ROIB respectively.
[0105] In some embodiments, the processor 21 can calibrate the color temperature of the spectral correlation region or the ROI spectral correlation region based on the target color temperature value to achieve accurate color reproduction. In some embodiments, the processor 21 can calibrate the color temperature of the spectral correlation region or the ROI spectral correlation region based on the DIY color temperature value to meet DIY shooting needs. In some embodiments, the DIY color temperature value can be determined based on user input instructions. This invention does not limit the magnitude relationship between the DIY color temperature value and the target color temperature value; they can be the same or different, depending on the requirements in practical applications.
[0106] It should be noted that this invention does not limit the number of spectrally correlated regions, nor does it limit the number of ROI spectrally correlated regions. The ROI spectrally correlated region can include the entire region or a local region of the multispectral image. In practical applications, it can be determined according to requirements.
[0107] In some embodiments, the ROI spectral correlation region can be determined based on user input instructions. For example, processor 21 can receive user input instructions, and based on these instructions, processor 21 can select the ROI spectral correlation region from one or more spectral correlation regions in a multispectral image. For example, the user input instructions may include at least one of voice instructions, action instructions, gesture instructions, image instructions, or text instructions.
[0108] In some embodiments, the processor 21 can calibrate the color temperature of the spectral correlation region based on a target color temperature value under preset conditions. In some embodiments, the preset conditions may include the number of light sources. The number of light sources is equal to the number of spectral correlation regions. The processor 21 can determine the number of light sources based on the number of spectral correlation regions. The processor 21 can determine whether the number of light sources is greater than a threshold value. When the number of light sources is greater than the threshold value, the processor 21 can calibrate the color temperature of each spectral correlation region. When the number of light sources is not greater than the threshold value, the processor 21 may not calibrate the color temperature of each spectral correlation region. This helps to balance color accuracy and power consumption.
[0109] In some embodiments, the preset conditions may include color temperature differences. For example, processor 21 can determine the light source spectral curve based on the reflectance spectral curve of the spectral correlation region. Based on the light source spectral curve, processor 21 can determine the light source type, and based on the light source type, processor 21 can determine the color temperature corresponding to the light source. Processor 21 can compare the color temperature difference between the color temperature corresponding to the light source and the target color temperature value calculated in step S14, and decide whether to calibrate the color temperature of the spectral correlation region based on the color temperature difference between the color temperature corresponding to the light source and the target color temperature value calculated in step S14. For example, when the color temperature difference is greater than a color temperature difference threshold, processor 21 can calibrate the color temperature of each spectral correlation region. When the color temperature difference is not greater than the color temperature difference threshold, processor 21 may not calibrate the color temperature of each spectral correlation region. This helps to balance color accuracy and power consumption.
[0110] In some embodiments, preset conditions may include whether the calibration function or the shooting function is activated. For example, the image color calibration device 20 may include a calibration switch or a shooting switch. The calibration switch or shooting switch can be implemented in hardware, software, or a combination of hardware and software. In some embodiments, the processor 21 can determine whether the calibration function or the shooting function of the image color calibration device 20 is activated based on the on / off state of the calibration switch or the shooting switch. For example, when the calibration switch or the shooting switch is on, the calibration function or the shooting function is activated. For example, when the calibration switch or the shooting switch is off, the calibration function or the shooting function is deactivated. When the calibration function or the shooting function is activated, the processor 21 can execute all or part of the steps or operations of the image color calibration method 10, calibrating the color temperature of the spectral correlation region according to the target color temperature value. This helps to achieve accurate color reproduction. When the calibration function or the shooting function is not activated, the processor 21 may not execute all or part of the steps or operations of the image color calibration method 10.
[0111] In some embodiments, preset conditions may include user input instructions. For example, the image color calibration device 20 may include an input interface for receiving user input instructions. The input interface may be coupled to the processor 21. When a user input instruction is received, the processor 21 may execute all or part of the steps or operations of the image color calibration method 10 to calibrate the color temperature of each spectral correlation region. Conversely, the processor 21 may not execute all or part of the steps or operations of the image color calibration method 10, and may not calibrate the color temperature of each spectral correlation region. For example, the user input instruction may include at least one of voice instructions, action instructions, gesture instructions, image instructions, or text instructions.
[0112] It should be noted that preset conditions may include one or more of the following: the number of light sources, color temperature differences, whether the calibration or shooting function is activated, and user input commands. In practical applications, these can be set according to specific needs.
[0113] The image color calibration method and device of the present invention divide a preprocessed multispectral image into at least one spectral correlation region, perform spectral inversion on the spectral correlation region to obtain a reflectance spectral curve, determine the target color temperature value of the spectral correlation region based on the reflectance spectral curve, and calibrate the color temperature of the spectral correlation region based on the target color temperature value. This enables independent calibration of the color temperature of the spectral correlation region, achieving accurate global or local color reproduction of the multispectral image, solving the color cast problem caused by multi-light source scenes, and achieving accurate color reproduction in the visible light band that conforms to human visual perception, thus helping to improve the user experience.
[0114] The image color calibration method and image color calibration device of the present invention can realize the acquisition of color temperature of the image in different areas, and perform white balance processing according to the color temperature values of different areas. The higher the color reproduction of the processed image, the closer it is to the human eye's visual perception. It can achieve high-accuracy color reproduction under complex lighting conditions (such as multiple light sources) and can be calibrated in real time to adapt to environmental changes.
[0115] The present invention also provides an electronic device. Figure 8 A schematic diagram of an electronic device 30 according to some embodiments of the present invention is shown. For example... Figure 8 As shown, the electronic device 30 includes the image color calibration device 20 as described above. In some embodiments, the electronic device 30 may include cameras, mobile phones, tablet computers, laptops, wearable devices, in-vehicle devices, augmented reality / virtual reality devices, super mobile personal computers, netbooks, personal digital assistants, smart home devices, and other electronic devices.
[0116] The electronic device of the present invention integrates an image color calibration device, which is highly efficient, small in size and low in cost. It can independently calibrate the color temperature of the spectral correlation region, achieve accurate global or local color reproduction of multispectral images, solve the color cast problem caused by multi-light source scenes, and achieve accurate color reproduction in the visible light band that conforms to human visual perception, thus helping to improve the user experience.
[0117] The present invention also provides a computer-readable storage medium. The computer-readable storage medium includes computer-executable instructions stored thereon, which, when executed by a processor, implement the image color calibration method 10 as described above.
[0118] In some embodiments, the present invention may take the form of a computer program product implemented on one or more storage media containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: PRAM, SRAM, DRAM, other types of RAM, ROM, EEPROM, flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital video disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0119] It should be noted that this specification provides method operation steps as shown in the embodiments or diagrams, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many steps and does not represent the only execution order. In actual system or device products, the methods shown in the embodiments or flowcharts can be executed sequentially or in parallel.
[0120] It should be noted that although several modules of the image color calibration device / electronic device have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules described above can be implemented in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules. Furthermore, the various modules mentioned in this invention can be implemented in hardware, in software, or a combination of hardware and software.
[0121] It should be noted that the present invention may include Figure 1-8 Any one or more features of any one or more embodiments. In other words, not all features shown in the figures need to be implemented simultaneously in the color calibration method / image color calibration device / electronic device / computer-readable storage medium of the present invention.
[0122] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An image color calibration method, characterized in that, include: Acquire multispectral images and preprocess the multispectral images; The preprocessed multispectral image is divided into at least one spectral correlation region; Spectral inversion is performed on the spectral correlation region to obtain the reflectance spectrum curve; Based on the reflectance spectrum curve, determine the target color temperature value of the spectral correlation region; The color temperature of the spectral correlation region is calibrated based on the target color temperature value.
2. The image color calibration method according to claim 1, characterized in that, Preprocessing the multispectral image includes at least one of the following operations: background subtraction, shadow removal, and interpolation.
3. The image color calibration method according to claim 1, characterized in that, The spectral correlation region is a pixel region in the multispectral image that has the same or similar spectral features.
4. The image color calibration method according to claim 1, characterized in that, Determining the target color temperature value of the spectral correlation region based on the reflectance spectrum curve includes: Based on the reflectance spectrum curve, determine the light source spectrum curve of the spectral correlation region; The target color temperature value is determined based on the spectral curve of the light source.
5. The image color calibration method according to claim 4, characterized in that, Determining the target color temperature value based on the light source spectral curve includes: The tristimulus values of the light source are calculated based on the spectral curve of the light source and the standard observer spectral tristimulus values. The tristimulus values of the light source are converted into color coordinates on the CIE chromaticity diagram; The target color temperature value is calculated based on the color coordinates of the light source and the blackbody trajectory.
6. The image color calibration method according to claim 5, characterized in that, Calculating the target color temperature value includes: The target color temperature value is calculated based on the color coordinates of the light source and the blackbody color coordinates of the blackbody trajectory.
7. The image color calibration method according to claim 6, characterized in that, Calculating the target color temperature value includes: Within a preset temperature range, search the blackbody color coordinates on the blackbody trajectory for the blackbody color coordinates with the smallest color difference distance from the light source color coordinates; The color temperature value corresponding to the blackbody color coordinate with the smallest distance is taken as the target color temperature value.
8. The image color calibration method according to claim 7, characterized in that, The calibration of the color temperature in the spectral correlation region based on the target color temperature value includes: The color temperature of the spectral correlation region is adjusted to the target color temperature value.
9. The image color calibration method according to claim 7, characterized in that, The number of spectral correlation regions includes multiple regions, and the image color calibration method further includes: Spectral inversion is performed on the multiple spectral correlation regions to obtain multiple reflectance spectral curves; Based on the multiple reflectance spectral curves, the target color temperature values of the multiple spectral correlation regions are determined respectively; The color temperature of each of the multiple spectral correlation regions is calibrated based on the target color temperature values of those regions.
10. The image color calibration method according to claim 7, characterized in that, The number of spectral correlation regions may include one or more, and the image color calibration method further includes: Select the ROI spectral correlation region from one or more spectral correlation regions; Spectral inversion is performed on the spectral correlation region of the ROI to obtain the reflectance spectrum curve; Based on the reflectance spectrum curve, determine the target color temperature value of the ROI spectral correlation region; The color temperature of the ROI spectral correlation region is calibrated based on the target color temperature value of the ROI spectral correlation region.
11. The image color calibration method according to any one of claims 1-10, characterized in that, Also includes: Under preset conditions, the color temperature of the spectral correlation region is calibrated according to the target color temperature value.
12. The image color calibration method according to any one of claims 1-10, characterized in that, The spectral correlation region includes multiple pixels, and each pixel includes multiple channel data. The image color calibration method further includes: performing noise reduction processing on the spectral correlation region, including: performing mean processing on the corresponding channel data of each pixel in the spectral correlation region.
13. An image color calibration device, characterized in that, include: A processor configured to perform the image color calibration method as described in any one of claims 1-12.
14. The image color calibration device according to claim 13, characterized in that, Also includes: The system comprises a microlens array, a filter unit array, and a photoelectric sensor array coupled to the processor, arranged along an optical path. Each filter unit includes a filter sub-unit array configured to form multiple spectral channels. The photoelectric sensor is configured to convert incident light signals into electrical signals. The processor is configured to generate a multispectral image based on the electrical signals, the multispectral image including data from the multiple spectral channels.
15. An electronic device, characterized in that, Includes the image color calibration device as described in claim 13 or 14.
16. A computer-readable storage medium, characterized in that, It includes computer-executable instructions stored thereon, which, when executed by a processor, implement the image color calibration method as described in any one of claims 1-12.
Citation Information
Patent Citations
Environment color temperature test method and system based on multispectral image detection technology
CN111551266A
Method for determining color correction matrix and electronic equipment
CN118945490A
White balance adjusting method and device, electronic equipment, storage medium and product
CN119094900A
White balance correction method for performing color temperature estimation by reconstructing scene spectrum
CN120358421A
Spectrum chip, spectrum camera and image white balance processing method
CN120547446A