CN116993597A - Image correction method, device and computer readable storage medium - Google Patents

Image correction method, device and computer readable storage medium Download PDF

Info

Publication number
CN116993597A
CN116993597A CN202210447356.4A CN202210447356A CN116993597A CN 116993597 A CN116993597 A CN 116993597A CN 202210447356 A CN202210447356 A CN 202210447356A CN 116993597 A CN116993597 A CN 116993597A
Authority
CN
China
Prior art keywords
correction coefficient
correction
compressed
current frame
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210447356.4A
Other languages
Chinese (zh)
Inventor
李国柱
何皓嘉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qstech Co Ltd
Original Assignee
Qstech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qstech Co Ltd filed Critical Qstech Co Ltd
Priority to CN202210447356.4A priority Critical patent/CN116993597A/en
Publication of CN116993597A publication Critical patent/CN116993597A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Abstract

The application discloses an image correction method, an image correction device and a computer readable storage medium, wherein the method comprises the following steps: aiming at a current frame image to be corrected, acquiring a compressed correction coefficient corresponding to a pixel point in the current frame image; obtaining a mapping relation between a compressed correction coefficient and a correction coefficient before compression, and decompressing the compressed correction coefficient into a restored correction coefficient according to the mapping relation; and correcting the pixel points in the current frame image by using the restoring correction coefficient to generate a corrected image. The technical scheme provided by the application can improve the accuracy of image correction.

Description

Image correction method, device and computer readable storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image correction method, an image correction device, and a computer readable storage medium.
Background
Due to the manufacturing process of the LED chips and the difference of lamp bead batches, the LED display screen may have the condition that the lamp beads emit light with discreteness. If the display screen is simply lighted and the uniformity of the light emission is not compensated, the whole display screen can be in the condition of screen display when the pure ground color image is displayed. In view of this, usually, the LED display screen is corrected by adopting a chromaticity correction mode before leaving the factory, so as to ensure the light emitting consistency of the LED display screen.
At present, when correction is performed, the control system reads correction data from the memory, and then corrects each pixel point on the display screen by using the correction data. However, the data size of the existing correction data is generally large, and more hardware resources are wasted when the correction is performed, thereby reducing the efficiency of image correction.
Disclosure of Invention
In view of this, embodiments of the present application provide an image correction method, apparatus, and computer-readable storage medium, which can improve the efficiency of image correction.
In one aspect, the present application provides an image correction method, including: aiming at a current frame image to be corrected, acquiring a compressed correction coefficient corresponding to a pixel point in the current frame image; obtaining a mapping relation between a compressed correction coefficient and a correction coefficient before compression, and decompressing the compressed correction coefficient into a restored correction coefficient according to the mapping relation; and correcting the pixel points in the current frame image by using the restoring correction coefficient to generate a corrected image.
In one embodiment, decompressing the compressed correction coefficients into restored correction coefficients according to the mapping relationship includes: and identifying the bit value of the compressed correction coefficient, converting the bit value through the mapping relation, and taking the converted bit value as the decompressed restored correction coefficient.
In one embodiment, the mapping is characterized by the following formula:
wherein X represents a correction coefficient after compression and Y represents a restoration correction coefficient after decompression.
In one embodiment, the compressed correction factor satisfies the following formula:
where k represents the original correction coefficient and X represents the compressed correction coefficient.
In one embodiment, correcting the pixel point in the current frame image using the restoration correction coefficient includes: extracting original gray values of all pixel points in the current frame image, and performing gamma mapping on the extracted original gray values to obtain gamma mapped gray values; and correcting the gamma-mapped gray value by using the restoring correction coefficient.
In one embodiment, correcting the pixel point in the current frame image using the restoration correction coefficient includes: and identifying a correction coefficient corresponding to the current pixel point from the restoring correction coefficient aiming at any current pixel point in the current frame image, and correcting the current pixel point by utilizing the identified correction coefficient.
Another aspect of the present application provides an image correction apparatus, including: the correction data reading unit is used for acquiring a compressed correction coefficient corresponding to a pixel point in a current frame image aiming at the current frame image to be corrected; the decompression unit is used for acquiring a mapping relation between the compressed correction coefficient and the correction coefficient before compression, and decompressing the compressed correction coefficient into a restored correction coefficient according to the mapping relation; and the correction unit is used for correcting the pixel points in the current frame image by utilizing the restoring correction coefficient to generate a corrected image.
In one embodiment, the decompression unit is further configured to identify a bit value of the compressed correction coefficient, convert the bit value according to the mapping relationship, and use the converted bit value as the decompressed restoration correction coefficient.
The application also provides an image correction device, which comprises a processor and a memory, wherein the memory is used for storing a computer program, and the computer program realizes the image correction method when being executed by the processor.
Another aspect of the present application also provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described image correction method.
In the technical schemes provided by the embodiments of the application, only the compressed correction coefficient can be stored in the cache, so that the data volume of the correction coefficient can be greatly reduced, and the occupation of hardware resources is further reduced.
When the image correction is performed, the compressed correction coefficients can be decompressed and restored, so that each restoring correction coefficient is generated. By restoring the correction coefficient, each pixel point in the current frame image can be corrected point by point, so that a corrected image is generated.
Therefore, the technical scheme provided by the embodiment of the application can reduce the consumption of hardware resources, thereby improving the efficiency of image correction. When the image correction is carried out, a higher image correction precision can be ensured by a decompression mode.
Drawings
The features and advantages of the present application will be more clearly understood by reference to the accompanying drawings, which are illustrative and should not be construed as limiting the application in any way, in which:
FIG. 1 shows a flow chart of an image correction method in one embodiment of the application;
FIG. 2 is a schematic diagram showing functional blocks of an image correction apparatus according to an embodiment of the present application;
fig. 3 is a schematic diagram showing the configuration of an image correction apparatus in one embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, based on the embodiments of the application, which a person skilled in the art would obtain without making any inventive effort, are within the scope of the application.
At present, aiming at an LED display screen, a point-by-point correction mode is generally used for improving the brightness and color uniformity of pixel points, so that the picture consistency is better, and the natural colors are restored more. In practical applications, the pixel values of a pixel point may be represented by a plurality of parameters in the color gamut space. For example, in the RGB color gamut space, the pixel value may be represented by R, G, B three components. Also for example, in YUV color gamut space, pixel values may be represented by Y, U, V three components. When correcting the pixel value of the pixel point, the matrix is actually used to represent the correction data, and then the matrix product is performed on the correction data and the pixel value, so as to obtain the corrected pixel value.
Taking RGB color gamut space as an example, the pixel values of the pixels may be represented as vectors (R, G, B), and the correction data may be represented as:
wherein RR is the correction coefficient of the red light when displaying red, RG is the correction coefficient of the green light when displaying red, RB is the correction coefficient of the blue light when displaying red; GR is the correction coefficient of the red light when displaying green, GG is the correction coefficient of the green light when displaying green, and GB is the correction coefficient of the blue light when displaying green; BR is the correction factor for the red light when blue, BG is the correction factor for the green light when blue, BB is the correction factor for the blue light when blue.
The pixel values (R ', G ', B ') after pixel point correction can be expressed as:
in the implementation process, it is not difficult to find that the correction data includes a plurality of correction coefficients for each pixel, and the correction coefficients all have a certain bit number. For example, conventional correction coefficients are all 16bit data. Then assuming that the resolution of the bin of an LED is 640 x 360, then a 640 x 360 x 9 x 16bit (about 32 Mbit) of data needs to be stored in the buffer of the control system. If multiple segments of correction are to be made, multiple copies of correction data are required, which results in doubling the amount of correction data stored in the cache of the control system. In order to reduce the occupation of the cache of the control system, it is currently required to reduce the data amount of correction data.
In one embodiment of the present application, the number of bits occupied by the correction coefficient can be reduced by compressing the correction coefficient. For example, an original 16-bit correction coefficient may be compressed into a 10-bit correction coefficient. However, if the pixel value of the pixel is corrected based on the compressed correction coefficient, the accuracy of the correction may not be achieved. In view of this, the compressed correction data may be decompressed, and the pixel values of the pixels may be corrected using the decompressed correction data, thereby achieving higher correction accuracy. The advantage of this is that in the cache of the control system only the compressed correction data and decompression map can be stored, which greatly reduces the occupation of the cache. When correction is needed, decompression of the correction data is carried out temporarily, and correction is carried out by using the decompressed correction data.
In this embodiment, the 10bit correction coefficients have 1024 different values, and then the decompressed mapping table may include 1024 mapping relations, so that each compressed correction coefficient is mapped to a corresponding original correction coefficient. Thus, the correction data including the 16-bit correction coefficient is required to be stored in the cache of the control system originally, and after compression, only the correction data including the 10-bit correction coefficient and a decompression mapping table including 1024 mapping relations are required to be stored in the cache of the control system.
Referring to fig. 1, the image correction method according to an embodiment of the present application may include the following steps.
S1: and aiming at the current frame image to be corrected, acquiring a compressed correction coefficient corresponding to a pixel point in the current frame image.
In the present embodiment, each frame image to be corrected may be written into the buffer, so that correction is performed by a frame-by-frame pixel-by-pixel manner.
For the current frame image to be corrected, the original gray value of each pixel point in the current frame image can be extracted first, and then the extracted original gray value is subjected to gamma mapping, so that the gray value after gamma mapping is obtained. Taking RGB color gamut space as an example, the gamma mapped gray values can be represented by vectors (R, G, B). Where R represents the gray-value component of the red channel, G represents the gray-value component of the green channel, and B represents the gray-value component of the blue channel. Of course, the gray value components of these channels are all referred to as gamma mapped gray values.
In the present embodiment, the purpose of the gamma mapping is that the sensitization value of human eyes to the external light source is not in a linear relation with the input light intensity, but in an exponential relation. Under low illumination, the human eyes can more easily distinguish the change of the brightness, and with the increase of the illumination, the human eyes cannot easily distinguish the change of the brightness. However, the sensitization of the camera and the input light intensity are in a linear relation, so that the imaging effect of the current frame image captured by the camera cannot well meet the real sensitization result of human eyes. After gamma mapping, the gray value of each pixel point obtained can be more approximate to the true photosensitive result of human eyes, so that the authenticity of the image is improved.
In this embodiment, after gamma mapping is performed on the gray value of each pixel point in the current frame image, the compressed correction data corresponding to the current frame image may be read from the buffer. For example, the compressed correction data may be data containing 10bit correction coefficients.
In one embodiment, in compressing the original correction coefficient, in order to secure the original accuracy of the low-gradation correction data, the gradation of less than 64 levels may be not subjected to the compression processing, and the compression processing may be performed only for the gradation of greater than or equal to 64 levels. Specifically, in an actual application scenario, assuming that the original correction coefficient uses 16 bits and the compressed correction coefficient uses 10 bits, the compression process for the original correction coefficient may be performed according to the following formula:
where k represents the original correction coefficient and X represents the compressed correction coefficient.
It can be seen that the original correction coefficients may not be compressed when the gray level is below 64, but may be started when the gray level reaches 64. In practical applications, the gray scale of the compressed correction coefficient may be rounded.
In practical application, the formula adopted in the compression process can be summarized into a compression mapping table, and the compressed correction coefficient can be quickly queried in the compression mapping table according to different values of the original correction coefficient.
S2: and obtaining a mapping relation between the compressed correction coefficient and the correction coefficient before compression, and decompressing the compressed correction coefficient into a restored correction coefficient according to the mapping relation.
In the present embodiment, when decompressing the compressed correction coefficient, it may be performed according to the following formula:
wherein Y represents the decompressed reduction correction coefficient.
In practical application, the decompressed reduction correction coefficient may take a value in a rounded manner. Of course, it should be noted that the decompressed restored correction coefficient does not necessarily have to be exactly identical to the original correction coefficient, and a certain loss may occur during the compression and decompression, but even though the correction is performed in a compression and decompression manner, a higher correction accuracy may still be achieved.
In practical applications, the above formula for decompression can be represented by a decompression map. Taking 10 bits of correction coefficient as an example, the decompression mapping table may contain 1024 mapping relations, and by querying the decoding mapping table, the compressed correction coefficient may be rapidly decompressed into a restored correction coefficient.
It can be seen that the decompressed mapping table contains a plurality of mapping relations, the number of the mapping relations is associated with the number of bits of the compressed correction coefficient, and generally speaking, the number of the mapping relations is N to the power of 2, where N may be the number of bits of the compressed correction coefficient. When decompressing the compressed correction coefficient into a restoration correction coefficient, the bit value of the compressed correction coefficient can be identified, the bit value is converted through the mapping relation, and the converted bit value is used as the decompressed restoration correction coefficient.
In the present embodiment, after decompressing each correction coefficient in the compressed correction data, the restored correction data composed of each restored correction coefficient can be obtained. The correction coefficients may have the same number of bits in the restored correction data as in the original correction data.
S3: and correcting the pixel points in the current frame image by using the restoring correction coefficient to generate a corrected image.
In this embodiment, after the restoration correction data is obtained, each pixel point in the current frame image may be corrected by using the matrix product method described above, so as to obtain a corrected image.
It should be noted that, for each pixel point, the corresponding correction data may be provided, and the set of correction data of each pixel point may be used as the correction data corresponding to the current frame image.
In this way, when the correction is performed point by point, for any current pixel point in the current frame image, the correction data corresponding to the current pixel point can be identified from the restored correction data, and the correction is performed on the current pixel point by using each correction coefficient in the identified correction data.
Referring to fig. 2, an embodiment of the present application further provides an image correction apparatus, including:
the correction data reading unit is used for acquiring a compressed correction coefficient corresponding to a pixel point in a current frame image aiming at the current frame image to be corrected;
the decompression unit is used for acquiring a mapping relation between the compressed correction coefficient and the correction coefficient before compression, and decompressing the compressed correction coefficient into a restored correction coefficient according to the mapping relation;
and the correction unit is used for correcting the pixel points in the current frame image by utilizing the restoring correction coefficient to generate a corrected image.
In one embodiment, the decompression unit is further configured to identify a bit value of the compressed correction coefficient, convert the bit value according to the mapping relationship, and use the converted bit value as the decompressed restoration correction coefficient.
Referring to fig. 3, an embodiment of the present application further provides an image correction apparatus, where the image correction apparatus includes a processor and a memory, and the memory is configured to store a computer program, and when the computer program is executed by the processor, implement the image correction method described above.
The processor may be a central processing unit (Central Processing Unit, CPU). The processor may also be any other general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules, corresponding to the methods in embodiments of the present application. The processor executes various functional applications of the processor and data processing, i.e., implements the methods of the method embodiments described above, by running non-transitory software programs, instructions, and modules stored in memory.
The memory may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some implementations, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
An embodiment of the present application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described image correction method.
In the technical schemes provided by the embodiments of the application, only the compressed correction coefficient can be stored in the cache, so that the data volume of the correction coefficient can be greatly reduced, and the occupation of hardware resources is further reduced.
When the image correction is performed, the compressed correction coefficients can be decompressed and restored, so that each restoring correction coefficient is generated. By restoring the correction coefficient, each pixel point in the current frame image can be corrected point by point, so that a corrected image is generated.
Therefore, the technical scheme provided by the embodiment of the application can reduce the consumption of hardware resources, thereby improving the efficiency of image correction. When the image correction is carried out, a higher image correction precision can be ensured by a decompression mode.
It will be appreciated by those skilled in the art that implementing all or part of the above-described methods in the embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and where the program may include the steps of the embodiments of the methods described above when executed. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although embodiments of the present application have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the application, and such modifications and variations fall within the scope of the application as defined by the appended claims.

Claims (10)

1. An image correction method, the method comprising:
aiming at a current frame image to be corrected, acquiring a compressed correction coefficient corresponding to a pixel point in the current frame image;
obtaining a mapping relation between a compressed correction coefficient and a correction coefficient before compression, and decompressing the compressed correction coefficient into a restored correction coefficient according to the mapping relation;
and correcting the pixel points in the current frame image by using the restoring correction coefficient to generate a corrected image.
2. The method of claim 1, wherein decompressing the compressed correction coefficients into restored correction coefficients according to the mapping relationship comprises:
and identifying the bit value of the compressed correction coefficient, converting the bit value through the mapping relation, and taking the converted bit value as the decompressed restored correction coefficient.
3. The method according to claim 1 or 2, characterized in that the mapping relationship is characterized by the following formula:
wherein X represents a correction coefficient after compression and Y represents a restoration correction coefficient after decompression.
4. The method of claim 1, wherein the compressed correction factor satisfies the following formula:
where k represents the original correction coefficient and X represents the compressed correction coefficient.
5. The method of claim 1, wherein correcting pixels in the current frame image using the restoration correction coefficients comprises:
extracting original gray values of all pixel points in the current frame image, and performing gamma mapping on the extracted original gray values to obtain gamma mapped gray values;
and correcting the gamma-mapped gray value by using the restoring correction coefficient.
6. The method according to claim 1 or 5, wherein correcting pixels in the current frame image using the restoration correction coefficient comprises:
and identifying a correction coefficient corresponding to the current pixel point from the restoring correction coefficient aiming at any current pixel point in the current frame image, and correcting the current pixel point by utilizing the identified correction coefficient.
7. An image correction apparatus, characterized in that the apparatus comprises:
the correction data reading unit is used for acquiring a compressed correction coefficient corresponding to a pixel point in a current frame image aiming at the current frame image to be corrected;
the decompression unit is used for acquiring a mapping relation between the compressed correction coefficient and the correction coefficient before compression, and decompressing the compressed correction coefficient into a restored correction coefficient according to the mapping relation;
and the correction unit is used for correcting the pixel points in the current frame image by utilizing the restoring correction coefficient to generate a corrected image.
8. The apparatus of claim 7, wherein the decompression unit is further configured to identify a bit value of the compressed correction coefficient, convert the bit value through the mapping relationship, and use the converted bit value as the decompressed restored correction coefficient.
9. An image correction device, characterized in that it comprises a processor and a memory for storing a computer program which, when executed by the processor, implements the method according to any of claims 1 to 6.
10. A computer readable storage medium for storing a computer program which, when executed by a processor, implements the method of any one of claims 1 to 6.
CN202210447356.4A 2022-04-26 2022-04-26 Image correction method, device and computer readable storage medium Pending CN116993597A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210447356.4A CN116993597A (en) 2022-04-26 2022-04-26 Image correction method, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210447356.4A CN116993597A (en) 2022-04-26 2022-04-26 Image correction method, device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116993597A true CN116993597A (en) 2023-11-03

Family

ID=88523754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210447356.4A Pending CN116993597A (en) 2022-04-26 2022-04-26 Image correction method, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116993597A (en)

Similar Documents

Publication Publication Date Title
JP6937695B2 (en) Methods and Devices for Encoding and Decoding Color Pictures
JP6563915B2 (en) Method and apparatus for generating EOTF functions for generic code mapping for HDR images, and methods and processes using these images
RU2737507C2 (en) Method and device for encoding an image of a high dynamic range, a corresponding decoding method and a decoding device
KR102367205B1 (en) Method and device for encoding both a hdr picture and a sdr picture obtained from said hdr picture using color mapping functions
JP7053722B2 (en) A method and apparatus for signaling a picture / video format of an LDR picture within a bitstream and a picture / video format of a decoded HDR picture obtained from this LDR picture and an illumination picture.
RU2710873C2 (en) Method and device for colour image decoding
CN107888943B (en) Image processing
US7554557B2 (en) Device and method for image compression and decompression
JP2018525883A (en) Method and device for encoding and decoding color pictures
JP2018014707A (en) Method and apparatus for encoding/decoding high dynamic range picture into coded bitstream
WO2021073304A1 (en) Image processing method and apparatus
US11388345B2 (en) Image data processing device, capturing equipment and display system
JP2019515562A (en) Method and apparatus for encoding / decoding high dynamic range images into a coded bit stream
CN109471686B (en) System and method for rendering graphical assets
CN116993597A (en) Image correction method, device and computer readable storage medium
JP2018507618A (en) Method and apparatus for encoding and decoding color pictures
CN107888944B (en) Image processing
TW201601518A (en) Method and device for signaling in a bitstream a picture/video format of an LDR picture and a picture/video format of a decoded HDR picture obtained from said LDR picture and an illumination picture
US11769464B2 (en) Image processing
CN114387913B (en) EDID adjustment method and system for LED display screen
CN115938285A (en) LED display screen correction coefficient coding and decoding method
CN117422651A (en) Method for generating high dynamic range image and image processing system
CN113741843A (en) Correction coefficient processing method, device, system, electronic device and storage medium
CN113242424A (en) Image coding and decoding method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination