Image Chromatic Aberration Correction Method, Device, Electronic Device and Storage Medium

By determining the reference color channel in the target image and calculating the offset of the target color channel, using fitting to obtain the color difference deviation degree data, and automatically performing chromatic aberration correction, the problem of low chromatic aberration correction in the prior art is solved, and efficient and accurate chromatic aberration correction is achieved.

CN114219736BActive Publication Date: 2025-06-03AXERA SEMICON (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111568538.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2025-06-03
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

In the prior art, the image chromatic aberration correction efficiency is low, it is greatly affected by labor, has high cost, and has limited application scope.

Method used

By determining the reference color channel in the target image, the offset of the target color channel is calculated, and the color difference offset degree data is obtained by fitting, and the color difference correction is performed automatically.

Benefits of technology

It improves the efficiency and accuracy of chromatic aberration correction, reduces labor and time costs, and is suitable for a variety of lenses and application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114219736B_ABST
    Figure CN114219736B_ABST
Patent Text Reader

Abstract

The present application provides an image color difference correction method, apparatus, electronic device, and storage medium, relating to the field of digital image processing technology. The method includes: determining an offset of a target color channel corresponding to a target point based on a reference color channel of the target point in a target image; fitting the offset to obtain color difference offset degree data of the target color channel; and performing color difference correction on the target image based on the color difference offset degree data to obtain a corrected image. The present application can utilize the physical characteristics of lens chromatic aberration. By keeping one color channel unchanged as a reference color channel, the color difference offset degree of other color channels is obtained, so as to correct the color difference of the target image according to the color difference offset degree data and the color difference correction algorithm, without the need for engineers to repeatedly debug parameters and adjust positions for color difference correction, reducing labor and time costs, and effectively improving the correction efficiency and accuracy of color difference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of digital image processing technology. Specifically, it relates to an image color difference correction method, device, electronic device, and storage medium. Background Art

[0002] Due to the physical properties of the lens, color differences exist in the images captured by the camera. This is because the wavelengths of different lights cause the lens to be unable to focus all wavelengths of colors onto the same focal plane. Since current cameras generally use Red, Green, and Blue photosensitive sensors, the RGB three-color lights will be focused onto different focal planes, thus forming color differences.

[0003] In the prior art, the general way to correct color differences is to select lens materials with small color differences, such as fluorite, etc. However, the properties of the lens materials are not very stable, and the production cost is too high. Therefore, it is usually only used in a very small number of high-end lenses with extremely high prices and cannot be popularized. In a large number of practical applications, people will set it in the ISP (Image Signal Processing Pipeline), but when setting, experienced engineers need to adjust parameters for different lenses to configure reasonable parameters, resulting in a large influence of manual work on the current image color difference correction, high human and time costs, and low correction efficiency and accuracy of color differences. Summary of the Invention

[0004] In view of this, the purpose of the embodiments of this application is to provide an image color difference correction method, device, electronic device, and storage medium to improve the problem of low efficiency of image color difference correction existing in the prior art.

[0005] To solve the above problems, in the first aspect, this application provides an image color difference correction method, and the method includes:

[0006] Determine the offset of the target color channel corresponding to the target point based on the reference color channel of the target point in the target image;

[0007] Fit the offset to obtain the color difference offset degree data of the target color channel;

[0008] Perform color difference correction on the target image based on the color difference offset degree data to obtain a corrected image.

[0009] In the above implementation, by keeping one color channel in the target image unchanged and using it as a reference color channel to calibrate other target color channels, it is possible to obtain chromatic aberration offset degree data that can represent the physical characteristics of the lens based on the determined offset, and then, according to the chromatic aberration offset degree data, use a chromatic aberration correction algorithm to correct the chromatic aberration of the target image. There is no need for engineers with work experience to repeatedly debug parameter configurations for different lenses to set reasonable parameters to correct chromatic aberration. It can automatically set parameters for correction, is applicable to multiple types of lenses and multiple application scenarios, reduces labor and time costs, and effectively improves the correction efficiency and accuracy of chromatic aberration.

[0010] Optionally, determining the offset of the target color channel corresponding to the target point based on the reference color channel in the target image includes:

[0011] Determining the reference color channel among the first color channel, the second color channel, and the third color channel of the target point in the target image;

[0012] Calibrating the corresponding target color parameters in the non-reference color channels to serve as the target color channels;

[0013] Calculating the offset of the target color channel at the center of the target point based on the reference color channel.

[0014] In the above implementation, due to the phenomenon of chromatic aberration, the colors of the three color channels of multiple target points in the target image will not gather at the same position. By selecting the corresponding color channel as the reference color channel according to actual needs and settings among the three color channels, the pixel coordinates in the reference color channel remain fixed, and the corresponding target color parameters are automatically calibrated in the non-reference color channels to serve as the target color channels that need to be corrected. Since the colors of the reference color channel and the target color channel should be focused at the same position when there is no chromatic aberration, based on the target point, it is possible to calculate the offset generated by the target color channel at the center of the target point with the reference color channel as the reference, thereby calculating the offset of the chromatic aberration existing in the target image.

[0015] Optionally, fitting the offset to obtain the chromatic aberration offset degree data of the target color channel includes:

[0016] Obtaining multiple focal radii and elliptical parameters of the target point;

[0017] Fitting the offset based on the elliptical parameters and the multiple focal radii to obtain the chromatic aberration offset degree data.

[0018] In the above implementation, based on the physical characteristics of the lens chromatic aberration corresponding to the target image, it is possible to obtain the pixel offset degree of the chromatic aberration distributed with the elliptical parameters and the focal radii at the target points. By fitting the offset amounts at the centers of the target points with multiple focal radii and elliptical parameters of the target points, the corresponding chromatic aberration offset degree data can be obtained, thereby obtaining the pixel offset result of the chromatic aberration, without the need for engineers to manually calibrate the chromatic aberration offset parameters, improving the acquisition efficiency of the chromatic aberration offset degree data.

[0019] Optionally, the chromatic aberration correction of the target image based on the chromatic aberration offset degree data to obtain a corrected image includes:

[0020] Based on the chromatic aberration offset degree data, determine the initial coordinates of the target color channel;

[0021] Adjust the initial coordinates to obtain adjusted coordinates;

[0022] Based on the adjusted coordinates, perform chromatic aberration correction on the target image to obtain the corrected image.

[0023] In the above implementation, based on the obtained chromatic aberration offset degree data, a chromatic aberration correction algorithm can be designed, without the need for engineers to manually calibrate the chromatic aberration degree parameters at each pixel position in the target image, and saving the offset value of each pixel position in the form of a table in the chromatic aberration correction algorithm for chromatic aberration correction. It can automatically adjust the relative positions of the pixels in the target color channel according to the chromatic aberration offset degree data to obtain the corresponding adjusted coordinates, thereby removing the influence of chromatic aberration in the target color channel, realizing the chromatic aberration correction of the target image, obtaining the corresponding corrected image, and effectively improving the efficiency and accuracy of chromatic aberration correction.

[0024] Optionally, the adjusting the initial coordinates to obtain adjusted coordinates includes:

[0025] Calculate the target radian based on the optical center position of the target color channel;

[0026] Search in the chromatic aberration correspondence table based on the target radian to determine the corresponding radial offset;

[0027] Based on the radial offset, perform position adjustment on the initial coordinates to obtain the adjusted coordinates.

[0028] In the above implementation manner, when adjusting the pixel positions in the target color channel, the corresponding target radian can be calculated according to the optical center position of the target color channel. In the color difference correspondence table stored in the color difference correction algorithm and corresponding to the color difference offset degree data, look up and match according to the target radian to determine the radial offset amount during adjustment. Offset the initial coordinates according to the radial offset amount to obtain the adjusted coordinates, realizing the automatic adjustment of the pixel positions in the target color channel, without the need for engineers to manually calibrate the color difference parameters to adjust the pixel positions, improving the efficiency and accuracy of pixel position adjustment.

[0029] Optionally, the performing color difference correction on the target image based on the adjusted coordinates to obtain the corrected image includes:

[0030] Calculating interpolation data of adjacent coordinates within a preset range of the adjusted coordinates in the target color channel;

[0031] Performing color difference correction on the target color channel in the target image based on the interpolation data to obtain the corrected image.

[0032] In the above implementation manner, when performing color difference correction, in order to improve the accuracy of color difference correction, multiple adjacent coordinates of the same channel as the target color channel can be selected within a preset range around the adjusted coordinates for interpolation calculation to obtain the corresponding interpolation data. Using the interpolation data as the pixel positions to perform color difference correction on the target color channel in the input target image can perform color difference correction on multiple pixel coordinates within the range, improving the range and accuracy of color difference correction.

[0033] Optionally, before determining the offset amount of the target color channel corresponding to the target point based on the reference color channel of the target point in the target image, the method further includes:

[0034] Obtaining a test image that needs to be subjected to color difference correction;

[0035] Calibrating the test image to obtain the target image having multiple target points.

[0036] In the above implementation manner, before obtaining the target image, the image of the corresponding lens can also be preprocessed. Obtain the test image that needs to be subjected to color difference correction captured by the corresponding lens, and perform point calibration on the test image to obtain the target image having multiple target points, so as to facilitate color difference correction of the target image.

[0037] In a second aspect, the present application further provides an image color difference correction device, and the device includes:

[0038] An offset module, configured to determine an offset of a target color channel corresponding to a target point based on a reference color channel of the target point in a target image;

[0039] A fitting module, configured to fit the offset to obtain data on the degree of color difference offset of the target color channel;

[0040] A correction module, configured to perform color difference correction on the target image based on the data on the degree of color difference offset to obtain a corrected image.

[0041] In the above implementation, the offset module determines the offset of the target color channel in the target points based on the reference color channel of multiple target points in the target image; the fitting module fits the offset to obtain data on the degree of color difference offset that can represent the physical characteristics of the lens; the correction module corrects the color difference of the target image according to the data on the degree of color difference offset by using a color difference correction algorithm, without the need for an engineer with working experience to repeatedly debug parameters for different lenses to configure reasonable parameters to correct the color difference, and can automatically set parameters for correction, which is applicable to multiple types of lenses and multiple application scenarios, reducing human and time costs, and effectively improving the efficiency and accuracy of color difference correction.

[0042] In a third aspect, the present application further provides an electronic device, which includes a memory and a processor. When the processor reads and runs program instructions stored in the memory, it executes the steps in any of the above implementations.

[0043] In a fourth aspect, the present application further provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and run by a processor, they execute the steps in any of the above implementations.

[0044] In summary, the present application provides an image color difference correction method, device, electronic device and storage medium, which can utilize the physical characteristics of lens chromatic aberration, by keeping one color channel unchanged as a reference color channel, obtaining the degree of color difference offset of other color channels, and thus correcting the color difference of the target image according to the data on the degree of color difference offset and the color difference correction algorithm, without the need for an engineer to repeatedly debug parameters and adjust positions for color difference correction, reducing human and time costs, and effectively improving the efficiency and accuracy of color difference correction. Description of the Drawings

[0045] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0046] Figure 1 It is a block diagram of an electronic device provided by an embodiment of the present application;

[0047] Figure 2 It is a flowchart of an image color difference correction method provided by an embodiment of the present application;

[0048] Figure 3 It is a detailed flowchart of step S200 provided by an embodiment of the present application;

[0049] Figure 4 It is a detailed flowchart of step S300 provided by an embodiment of the present application;

[0050] Figure 5 It is a detailed flowchart of step S400 provided by an embodiment of the present application;

[0051] Figure 6 It is a detailed flowchart of step S420 provided by an embodiment of the present application;

[0052] Figure 7 It is a detailed flowchart of step S430 provided by an embodiment of the present application;

[0053] Figure 8 It is a module structure diagram of an image color difference correction device provided by an embodiment of the present application.

[0054] Icons: 100 - electronic device; 111 - memory; 112 - storage controller; 113 - processor; 114 - peripheral interface; 115 - input / output unit; 116 - display unit; 500 - image color difference correction device; 510 - offset module; 520 - fitting module; 530 - correction module. Specific embodiments

[0055] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all of them. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope protected by the embodiments of the present application.

[0056] In the prior art, when correcting the color difference of an image, it is usually set in the ISP (Image Signal Processing Pipeline), and a corresponding color difference correction algorithm is added for correction. For example, the purple fringing removal module of CAC (Color Aberration Correction). However, the CAC algorithm module generally has many parameters, and an experienced engineer needs to adjust the parameters for different lenses to configure reasonable parameters. When configuring, the engineer needs to manually calibrate the color difference degree of each pixel position on the image and save the offset value of each pixel position in the form of a mesh (wireless mesh network) table. When configuring parameters in the table, the labor and time costs are relatively high, and the storage pressure is also relatively large. The color difference correction result of the image is greatly affected by humans, resulting in low correction efficiency and accuracy of the current color difference.

[0057] Therefore, to solve the above problems, the embodiments of the present application provide an image color difference correction method, which is applied to an electronic device. The electronic device can be an electronic device with logical computing functions such as a server, a personal computer (PC), a tablet computer, a smart phone, a personal digital assistant (PDA), etc., and can perform fast and accurate color difference correction on the image, eliminate the influence caused by color difference in the image, and reduce the color distortion in the image.

[0058] Optionally, please refer to Figure 1 , Figure 1 which is a block diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may include a memory 111, a storage controller 112, a processor 113, a peripheral interface 114, an input / output unit 115, and a display unit 116. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the electronic device 100. For example, the electronic device 100 may further include more or fewer components than those shown in Figure 1 , or have a different configuration from that shown in Figure 1 .

[0059] The above-mentioned memory 111, storage controller 112, processor 113, peripheral interface 114, input / output unit 115, and display unit 116 are directly or indirectly electrically connected to each other to realize data transmission or interaction. For example, these components may be electrically connected to each other through one or more communication buses or signal lines. The above-mentioned processor 113 is used to execute the executable module stored in the memory.

[0060] Among them, the memory 111 can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electric Erasable Programmable Read-Only Memory (EEPROM), etc. Among them, the memory 111 is used to store programs. After receiving an execution instruction, the processor 113 executes the program. The method executed by the electronic device 100 defined by any embodiment of the embodiments of the present application can be applied to the processor 113 or implemented by the processor 113.

[0061] The above-mentioned processor 113 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 113 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a digital signal processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0062] The above-mentioned peripheral interface 114 couples various input / output devices to the processor 113 and the memory 111. In some embodiments, the peripheral interface 114, the processor 113, and the memory controller 112 may be implemented on a single chip. In some other instances, they may be implemented by separate chips respectively.

[0063] The above-mentioned input / output unit 115 is used to provide input data to the user. The input / output unit 115 can be, but is not limited to, a mouse, a keyboard, etc.

[0064] The above-mentioned display unit 116 provides an interaction interface (such as a user operation interface) between the electronic device 100 and the user or is used to display image data for the user to refer to. In this embodiment, the display unit may be a liquid crystal display or a touch display. If it is a touch display, it may be a capacitive touch screen or a resistive touch screen that supports single-point and multi-point touch operations, etc. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations generated simultaneously at one or more positions on the touch display and hand over the sensed touch operations to the processor for calculation and processing. In the embodiment of the present application, the display unit 116 can display the image before color difference correction and the image after color difference correction.

[0065] The electronic device in this embodiment can be used to execute each step in the various image color difference correction methods provided by the embodiments of the present application. The implementation process of the image color difference correction method will be described in detail through several embodiments below.

[0066] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of an image color difference correction method provided by an embodiment of the present application. The method may include the following steps:

[0067] Step S200, based on the reference color channel of the target point in the target image, determine the offset of the target color channel corresponding to the target point.

[0068] Among them, the target image may include multiple target points. The reference color channel and the target color channel are channels that store information about color elements in the image. Since in a variety of light-sensitive sensors in the camera, such as the RGB (Red, Green, Blue) light-sensitive sensor of the bayer pattern, the RGB three-color lights of the target image will gather on different focal planes, thus forming a color difference phenomenon. Therefore, based on the light-sensitive sensor, one color channel in the target image can be kept unchanged as the reference color channel, and other target color channels can be calibrated to determine the offset corresponding to the target color channel at the target point.

[0069] Optionally, before obtaining the target image, the method may further include: obtaining a test image that needs to be corrected for color difference; calibrating the test image to obtain a target image with multiple target points. It can preprocess the image of the corresponding lens. Obtain the test image that needs to be corrected for color difference taken in the corresponding lens, and perform point calibration on the test image to obtain a target image with multiple target points, so as to correct the color difference of the target image.

[0070] Step S300: Fit the offset to obtain the chromatic aberration offset degree data of the target color channel.

[0071] Among them, due to the physical characteristics of lens chromatic dispersion, when chromatic aberration is formed, the offset degree of pixel positions is distributed in the characteristic of concentric ellipse clusters with approximately equal focal radii. By fitting on the basis of the offset, chromatic aberration offset degree data representing the offset degree of pixel positions can be obtained, so as to obtain the offset degree of the target color channel at the target point.

[0072] Step S400: Perform chromatic aberration correction on the target image based on the chromatic aberration offset degree data to obtain a corrected image.

[0073] Among them, the chromatic aberration correction algorithm can be designed through the chromatic aberration offset degree data, so as to automatically perform chromatic aberration correction on the target image to obtain the corresponding corrected image. There is no need for engineers with working experience to debug parameters for different lenses, so as to configure reasonable parameters to correct the image.

[0074] Optionally, the target image includes multiple target points. When performing chromatic aberration correction on the target image, the correction order of the target points is not restricted. It can be carried out in the manner shown in the Figure 1 embodiment, and chromatic aberration correction is performed on each target point in sequence, so as to achieve chromatic aberration correction of the target image. It is also possible to simultaneously determine the offsets corresponding to the target color channels in multiple target points, simultaneously fit the offsets to obtain the corresponding chromatic aberration offset degree data, and simultaneously perform chromatic aberration correction on multiple target points according to multiple chromatic aberration offset degree data, so as to achieve chromatic aberration correction of the target image. It is also possible to perform chromatic aberration correction on multiple target points simultaneously after obtaining the chromatic aberration offset degree data corresponding to all target points, so as to achieve chromatic aberration correction of the target image.

[0075] In the Figure 2 embodiment shown, it can automatically calculate and obtain parameters to correct the image, which is applicable to multiple models of lenses and multiple application scenarios, reduces labor and time costs, and effectively improves the correction efficiency and accuracy of chromatic aberration.

[0076] Optionally, please refer to Figure 3 , Figure 3 which is a detailed flowchart of step S200 provided by an embodiment of the present application. Step S200 may further include steps S210 - S230.

[0077] Step S210: Determine the reference color channel among the first color channel, the second color channel, and the third color channel of the target point in the target image.

[0078] Among them, the first color channel, the second color channel, and the third color channel are respectively one of the three RGB colors. The corresponding color channel can be selected as the reference color channel among the three color channels according to actual needs and settings. For example, the G color channel corresponding to the Green color is used as the reference color channel.

[0079] Step S220, calibrate the corresponding target color parameters in the non-reference color channel to be the target color channel.

[0080] Among them, after determining the reference color channel, the corresponding parameter calibration can be performed according to the colors of the non-reference color channels to be the target color channels that need to be corrected. For example, when the G color channel is the reference color channel, the color parameters of the R color channel and the B color channel are respectively used as the target color parameters, and the target color parameters are calibrated in the R color channel and the B color channel. The calibrated R color channel and B color channel are used as the target color channels that need to be corrected.

[0081] Step S230, calculate the offset of the target color channel at the center of the target point based on the reference color channel.

[0082] Among them, due to the color difference phenomenon, the colors of the three color channels in multiple target points of the target image will not gather at the same position. When there is no color difference, the colors of the reference color channel and the target color channel should be focused on the same position. Therefore, the pixel positions in the determined reference color channel can be kept fixed, and taking the reference color channel as the reference benchmark, calculate the offset generated by one or more target color channels at the center of the target point.

[0083] In Figure 3 In the shown embodiment, based on the target point, the offset generated by the target color channel at the center of the target point can be calculated with the reference color channel as the benchmark, so as to calculate the offset of the color difference existing in the target image.

[0084] Optionally, please refer to Figure 4 , Figure 4 which is a detailed flowchart of step S300 provided by an embodiment of the present application. Step S300 may further include steps S310-S320.

[0085] Step S310, obtain multiple focal radii and elliptical parameters of the target point.

[0086] Among them, since the degree of pixel position offset in the lens has the characteristic of approximately equal focal radius distribution such as a cluster of concentric ellipses, multiple focal radii and ellipse parameters in the target point can be calculated. The focal radius is the line segment connecting any point on the conic curve to the focus of the conic curve, which is not a fixed value, or it is the focal chord of the line segment connecting any point on the curve to the focus, that is, the chord passing through one focus. The latus rectum is the chord passing through the focus and perpendicular to the axis in the conic curve (except the circle). The ellipse parameters include various parameters of multiple concentric ellipse clusters on the target point, such as ellipse area, ellipse intersection position and other data.

[0087] Step S320: Based on the ellipse parameters and multiple focal radii, fit the offset amount to obtain the chromatic aberration offset degree data.

[0088] Among them, based on the obtained ellipse parameters and multiple focal radii, the offset amount of the center of the target point can be fitted to obtain the chromatic aberration offset degree data that can represent the pixel positions of the target color channel approximated by a cluster of concentric ellipses and distributed with different focal radii in an equal focal radius manner, so as to obtain the pixel offset degree of the chromatic aberration of the target color channel relative to the reference color channel at the target point.

[0089] Optionally, according to the fitting results of the offset amounts in multiple target points, a visual display result of multiple target points can also be generated to display the display colors of multiple target points.

[0090] In Figure 4 the illustrated embodiment, there is no need for an engineer to manually calibrate the chromatic aberration offset parameters, and the chromatic aberration offset degree data of the target color channel can be automatically calculated, improving the acquisition efficiency of the chromatic aberration offset degree data.

[0091] Optionally, please refer to Figure 5 , Figure 5 which is a detailed flowchart of step S400 provided by an embodiment of the present application. Step S400 may further include steps S410 - S430.

[0092] Step S410: Based on the chromatic aberration offset degree data, determine the initial coordinates of the target color channel.

[0093] Among them, after obtaining the chromatic aberration offset degree data, the chromatic aberration correction algorithm in the chromatic aberration correction module in the electronic device can be designed according to the chromatic aberration offset degree data. For example, the CAC algorithm is designed, and the target image is input into the DST (Depleted Substrate Transisto, dispersion support transmission) in the algorithm, and the initial coordinates of the target color channel are determined in the DST system according to the chromatic aberration offset degree data.

[0094] Step S420: Adjust the initial coordinates to obtain adjusted coordinates.

[0095] Among them, when adjusting the pixel positions of the color channels, the relative positions of the pixels in the target color channel can be automatically adjusted according to the color difference offset degree data to obtain the corresponding adjusted coordinates, without the need for engineers to manually calibrate the color difference degree parameters of each pixel position in the target image, reducing the error influence and time cost during manual calibration, and effectively improving the efficiency and accuracy of position adjustment.

[0096] Step S430: Perform color difference correction on the target image based on the adjusted coordinates to obtain the corrected image.

[0097] Among them, by performing color difference correction on the target image in the color difference correction algorithm according to the adjusted coordinates, a corrected image free from the influence of color difference can be obtained.

[0098] In Figure 5 the illustrated embodiment, the color difference of the target image can be automatically corrected according to the color difference offset degree data, effectively improving the efficiency and accuracy of color difference correction.

[0099] Optionally, please refer to Figure 6 , Figure 6 which is a detailed flowchart of step S420 provided by an embodiment of the present application. Step S420 may further include steps S421 - S423.

[0100] Step S421: Calculate the target radian based on the optical center position of the target color channel.

[0101] Among them, when adjusting the pixel positions in the target color channel, the optical center position of the target color channel can be obtained, and the target radian of the optical center position can be calculated, enabling an understanding of the angular position of the target color in the optical center position.

[0102] Step S422: Search in the color difference correspondence table based on the target radian to determine the corresponding radial offset.

[0103] Among them, in the color difference correspondence table stored in the color difference correction algorithm corresponding to the color difference offset degree data, the radial offset during adjustment can be determined by searching and matching according to the target radian, thereby adjusting the pixel positions of the target color channel.

[0104] It should be noted that in the color difference correction algorithm designed in this application, it is not necessary to save information such as the color difference offset degree data at each pixel position in the form of a mesh table. Only the color difference correspondence table corresponding to the color difference offset degree data needs to be saved. The parameters in the color difference correspondence table LUT (Look Up Table) are few, and the parameters therein can all be automatically calibrated and obtained, which is convenient for parameter adjustment. It is not necessary for engineers to perform multiple debugging configurations, which can effectively reduce the storage pressure and improve the efficiency of parameter acquisition.

[0105] Step S423: Based on the radial offset, adjust the position of the initial coordinates to obtain the adjusted coordinates.

[0106] Among them, according to the radial offset, the initial coordinates are offset, and the relative positions of the points on the target color channel plane to their respective optical center positions are radially scaled to obtain the adjusted coordinates after adjustment.

[0107] In Figure 6 the illustrated embodiment, it is possible to realize the automatic adjustment of the pixel positions in the target color channel, without the need for engineers to adjust the pixel positions according to the manually calibrated color difference parameters, which improves the efficiency and accuracy of pixel position adjustment.

[0108] Optionally, please refer to Figure 7 , Figure 7 which is a detailed flowchart of step S430 provided by an embodiment of the present application. Step S430 may further include steps S431-S432.

[0109] Step S431: Calculate the interpolation data of adjacent coordinates within a preset range of the adjusted coordinates in the target color channel.

[0110] Among them, in order to improve the accuracy of color difference correction, multiple adjacent coordinates of the same channel as the target color channel can be selected within a preset range around the adjusted coordinates for interpolation calculation to obtain the corresponding interpolation data. The interpolation data can interpolate a continuous function based on discrete data, so that this continuous curve passes through all the given discrete data points. By the value conditions of the function at a finite number of points, the approximate values of the function at other points can be estimated, which can be used to fill the gaps between pixels during image transformation and expand the correction range during color difference correction.

[0111] Step S432: Based on the interpolation data, perform color difference correction on the target color channel in the target image to obtain the corrected image.

[0112] Among them, the calculated interpolation data is used as the pixel position of the DST system in the color difference correction algorithm, so as to perform a relatively large range of color difference correction on the target color channel in the input target image. When the correction of multiple target points is completed, a corrected image without the influence of color difference is obtained.

[0113] In Figure 7 the illustrated embodiment, color difference correction can be performed on multiple pixel coordinates within a range, improving the range and accuracy of color difference correction.

[0114] Please refer to Figure 8 , Figure 8 which is a schematic diagram of the module structure of an image color difference correction device provided by an embodiment of the present application. The image color difference correction device 500 may include:

[0115] An offset module 510, configured to determine an offset amount of a target color channel corresponding to the target point based on a reference color channel of the target point in the target image;

[0116] A fitting module 520, configured to fit the offset amount to obtain color difference offset degree data of the target color channel;

[0117] A correction module 530, configured to perform color difference correction on the target image based on the color difference offset degree data to obtain a corrected image.

[0118] In an optional implementation manner, the offset module 510 may further include a reference determination sub-module, a parameter calibration sub-module, and an offset amount calculation sub-module;

[0119] The reference determination sub-module is configured to determine the reference color channel among the first color channel, the second color channel, and the third color channel of the target point in the target image;

[0120] The parameter calibration sub-module is configured to calibrate corresponding target color parameters in non-reference color channels as the target color channel;

[0121] The offset amount calculation sub-module is configured to calculate the offset amount of the target color channel at the center of the target point based on the reference color channel.

[0122] In an optional implementation manner, the fitting module 520 may further include a parameter sub-module and a fitting sub-module;

[0123] The parameter sub-module is configured to obtain multiple focal radii and elliptical parameters of the target point;

[0124] The fitting sub-module is configured to fit the offset amount based on the elliptical parameters and multiple focal radii to obtain the color difference offset degree data.

[0125] In an alternative embodiment, the correction module 530 may further include a coordinate sub-module, an adjustment sub-module, and a correction sub-module;

[0126] The coordinate sub-module is configured to determine an initial coordinate of the target color channel based on the color difference offset degree data;

[0127] The adjustment sub-module is configured to adjust the initial coordinate to obtain an adjusted coordinate;

[0128] The correction sub-module is configured to perform color difference correction on the target image based on the adjusted coordinate to obtain the corrected image.

[0129] In an alternative embodiment, the adjustment sub-module may further include a radian unit, a radial unit, and an offset unit;

[0130] The radian unit is configured to calculate a target radian based on the optical center position of the target color channel;

[0131] The radial unit is configured to look up in a color difference correspondence table based on the target radian to determine a corresponding radial offset;

[0132] The offset unit is configured to perform position adjustment on the initial coordinate based on the radial offset to obtain the adjusted coordinate.

[0133] In an alternative embodiment, the correction sub-module may further include an interpolation unit and a correction unit;

[0134] The interpolation unit is configured to calculate interpolation data of adjacent coordinates within a preset range of the adjusted coordinate in the target color channel;

[0135] The correction unit is configured to perform color difference correction on the target color channel in the target image based on the interpolation data to obtain the corrected image.

[0136] In an alternative embodiment, the image color difference correction device 500 may further include a preprocessing module, configured to obtain a test image that needs to be subjected to color difference correction; perform calibration on the test image to obtain the target image having a plurality of the target points.

[0137] Since the principle of the device in the embodiments of the present application for solving the problem is similar to that of the embodiments of the foregoing image color difference correction method, the implementation of the image color difference correction device 500 in this embodiment may refer to the description in the embodiments of the above image color difference correction method, and repeated parts will not be elaborated.

[0138] An embodiment of the present application further provides an electronic device, which includes a memory and a processor. Program instructions are stored in the memory. When the processor reads and runs the program instructions, it executes the steps in any one of the image color difference correction methods provided in this embodiment.

[0139] It should be understood that the electronic device can be an electronic device with logical computing functions such as a personal computer, a tablet computer, a smart phone, a personal digital assistant, etc.

[0140] An embodiment of the present application further provides a computer-readable storage medium. Computer program instructions are stored in the readable storage medium. When the computer program instructions are read and run by a processor, the steps in any one of the image color difference correction methods provided in this embodiment are executed.

[0141] In summary, an embodiment of the present application provides an image color difference correction method, device, electronic device and storage medium, which can utilize the physical characteristics of lens chromatic aberration. By keeping one color channel unchanged as a reference color channel, the color difference offset degree of other color channels is obtained, and then the color difference of the target image is corrected according to the color difference offset degree data and the color difference correction algorithm. There is no need for engineers to repeatedly debug parameters and adjust positions for color difference correction, reducing labor and time costs, and effectively improving the correction efficiency and accuracy of color difference.

[0142] In several embodiments provided by the present application, it should be understood that the disclosed device can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the block diagrams in the drawings show the possible architectures, functions, and operations of the devices according to multiple embodiments of the present application. In this regard, each block in the block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram, as well as the combination of block diagrams, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0143] In addition, in each embodiment of the present application, the various functional modules can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.

[0144] When the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Therefore, this embodiment also provides a computer-readable storage medium storing computer program instructions. When the computer program instructions are read and run by a processor, the steps in any of the methods of the block data storage method are executed. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, RanDom Access Memory), magnetic disks, or optical discs.

[0145] The above are only the embodiments of this application and are not used to limit the protection scope of this application. For those skilled in the art, this application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the protection scope of this application. It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0146] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in this application, and all should be covered by the protection scope of this application.

[0147] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, the elements defined by the statement "including..." do not exclude the existence of additional identical elements in the process, method, article or device including the said elements.

Claims

1. An image color difference correction method, characterized in that, the method includes: Determining the offset of the target color channel corresponding to the target point based on the reference color channel of the target point in the target image; Fitting the offset to obtain the color difference offset degree data of the target color channel; Performing color difference correction on the target image based on the color difference offset degree data to obtain a corrected image; Wherein, the performing color difference correction on the target image based on the color difference offset degree data to obtain a corrected image includes: determining the initial coordinates of the target color channel based on the color difference offset degree data; adjusting the initial coordinates to obtain adjusted coordinates; performing color difference correction on the target image based on the adjusted coordinates to obtain the corrected image; The adjusting the initial coordinates to obtain adjusted coordinates includes: calculating a target radian based on the optical center position of the target color channel; looking up in a color difference correspondence table based on the target radian to determine the corresponding radial offset; adjusting the position of the initial coordinates based on the radial offset to obtain the adjusted coordinates; wherein, the color difference correspondence table is a lookup table stored in the color difference correction algorithm corresponding to the color difference offset degree data.

2. The method according to claim 1, characterized in that, the determining the offset of the target color channel corresponding to the target point based on the reference color channel of the target point in the target image includes: Determining the reference color channel among the first color channel, the second color channel, and the third color channel of the target point in the target image; Calibrating the corresponding target color parameters in the non-reference color channels to serve as the target color channel; Calculating the offset of the target color channel at the center of the target point based on the reference color channel.

3. The method according to claim 1, characterized in that, the fitting the offset to obtain the color difference offset degree data of the target color channel includes: Obtaining multiple focal radii and elliptical parameters of the target point; Fitting the offset based on the elliptical parameters and multiple focal radii to obtain the color difference offset degree data.

4. The method according to claim 1, characterized in that, the performing color difference correction on the target image based on the adjusted coordinates to obtain the corrected image includes: Calculating interpolation data of adjacent coordinates within a preset range of the adjusted coordinates in the target color channel; Performing color difference correction on the target color channel in the target image based on the interpolation data to obtain the corrected image.

5. The method according to claim 1, characterized in that, before the determining the offset of the target color channel corresponding to the target point based on the reference color channel of the target point in the target image, the method further includes: Obtaining a test image that needs to be subjected to color difference correction; Calibrating the test image to obtain the target image having multiple target points.

6. An image color difference correction device, characterized in that, the device includes: An offset module, configured to determine an offset of a target color channel corresponding to a target point based on a reference color channel of the target point in a target image; A fitting module, configured to fit the offset to obtain color difference offset degree data of the target color channel; A correction module, configured to perform color difference correction on the target image based on the color difference offset degree data to obtain a corrected image; Wherein, the correction module includes a coordinate sub-module, an adjustment sub-module and a correction sub-module; the coordinate sub-module is configured to determine an initial coordinate of the target color channel based on the color difference offset degree data; the adjustment sub-module is configured to adjust the initial coordinate to obtain an adjusted coordinate; the correction sub-module is configured to perform color difference correction on the target image based on the adjusted coordinate to obtain the corrected image; The adjustment sub-module includes a radian unit, a radial unit and an offset unit; the radian unit is configured to calculate a target radian based on the optical center position of the target color channel; the radial unit is configured to look up in a color difference correspondence table based on the target radian to determine a corresponding radial offset; the offset unit is configured to perform position adjustment on the initial coordinate based on the radial offset to obtain the adjusted coordinate; wherein, the color difference correspondence table is a look-up table stored in a color difference correction algorithm corresponding to the color difference offset degree data.

7. An electronic device, Characterized in that, The electronic device includes a memory and a processor, and program instructions are stored in the memory. When the processor runs the program instructions, the steps in the method according to any one of claims 1-5 are executed.

8. A computer-readable storage medium, Characterized in that, Computer program instructions are stored in the readable storage medium. When the computer program instructions are run by a processor, the steps in the method according to any one of claims 1-5 are executed.

Citation Information

Patent Citations

  • Image processing method and device and movable platform

    CN112640424A