CN112689139A - Video image color depth transformation method, system and equipment - Google Patents

Video image color depth transformation method, system and equipment Download PDF

Info

Publication number
CN112689139A
CN112689139A CN202110267128.4A CN202110267128A CN112689139A CN 112689139 A CN112689139 A CN 112689139A CN 202110267128 A CN202110267128 A CN 202110267128A CN 112689139 A CN112689139 A CN 112689139A
Authority
CN
China
Prior art keywords
image
color depth
color
target image
image sequence
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.)
Granted
Application number
CN202110267128.4A
Other languages
Chinese (zh)
Other versions
CN112689139B (en
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.)
Beijing Digibird Technology Co ltd
Original Assignee
Beijing Digibird Technology 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 Beijing Digibird Technology Co ltd filed Critical Beijing Digibird Technology Co ltd
Priority to CN202110267128.4A priority Critical patent/CN112689139B/en
Publication of CN112689139A publication Critical patent/CN112689139A/en
Application granted granted Critical
Publication of CN112689139B publication Critical patent/CN112689139B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention belongs to the field of image transmission processing, and particularly relates to a method, a system and equipment for converting the color depth of a video image, aiming at solving the problems that the step jump occurs when the color depth of a low bit is converted into the color depth of a high bit and the conversion deviation occurs when the color depth of the high bit is converted into the color depth of the low bit in the conventional image color depth conversion. The invention comprises the following steps: acquiring a source image sequence to be converted and a target image sequence color depth; calculating a color level conversion relation and performing color depth conversion; if the high color depth is converted into the low color depth, directly outputting the converted target image sequence; if the low color depth is converted into the high color depth, the images are divided into a non-change image, a step change image and a continuous image according to the pixel difference value of the image; carrying out pixel fine adjustment on the continuous images to obtain continuous images with rich details; and outputting a target image sequence consisting of the unchanged image, the step change image and the continuous image with rich details. The image color depth conversion method is high in image color depth conversion precision and good in real-time performance, and is more suitable for occasions with limited computing capacity or higher real-time requirements.

Description

Video image color depth transformation method, system and equipment
Technical Field
The invention belongs to the field of image transmission processing, and particularly relates to a video image color depth transformation method, system and device.
Background
In current video data processing and display devices, such as PCs, LCD screens, etc., there are a number of standards that provide different levels of color accuracy. A common standard is true color 24-bit (8 bits for each of the three RGB primaries), which includes 16777216 variations. Some high-end display devices will have 30 bits of color, 36 bits of color, or even 48 bits of color. There are 1090519040 variations in 30-bit color (10 bits for each of the three primary colors RGB); 68719476736 kinds of changes exist in each of the three primary colors of RGB of 36 bits; there are 281474976710656 variations for 48 bit colors (16 bits for each of the three primary colors RGB).
In the field of video screens, the application of mixing signals with different color depths on the screen is very common, and the accompanying data processing is image color depth conversion. In a typical processing manner, the high-low color depth conversion is realized by low-bit truncation or zero padding for each color component. For example, RGB24 bit color is converted to 36 bit color, and 8 bit data of R/G/B in each color component is changed to 12 bit data by shifting the data left by 4 bits. If the original color of a certain point is {0xA0,0xB0,0xC0}, the converted data becomes {0xA00,0xB00,0xC00 }. Conversely, if the data with high color depth is changed into the data with low color depth, the direct truncation is performed. For example, RGB36 bit color data is converted into RGB24 bit color, R/G/B of original data is 12 bit data, and the lowest 4 bit data is converted into 8 bit data by cutting off. If the color of the original data at a certain point is {0xA0F,0xB0F,0xC0F } and becomes {0xA0,0xB0,0xC0} after truncation.
However, in the above-described conversion of an image from a low color depth to a high color depth, the amount of data information does not change, and the display content of the image cannot be enriched even when the image is displayed on a screen with a high color depth. If the source image is a 24-bit color gradient color bar, there is no apparent color step change when displayed on a 24-bit color depth display device. When the color is changed into 36-bit color by complementing 0 to the lower bit of each component, a significant stair-step display effect occurs when the color is displayed on a 36-bit color depth display device. For example, the grayscale gradation images P0-P1023 of an image with a certain width of 1024 are {0x00, 0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x02,0x02,0x02,0x02, … 0xff, 0xff, 0xff, 0xff } and directly pass through the low bit complement 0, and the results P0-P1023 are {0x000, 0x000,0x000,0x000,0x010,0x010,0x010,0x 020,0x020,0x020, … 0xff0, 0xff0, 0xff0, 0xff0 }. As the displayed color depth increases, the image resolution is higher, and the change of the image is stepped, eventually resulting in a visual discontinuity. In the conversion of the image from high color depth to low color depth, there is a deviation of plus or minus 1 gradation in color without being grouped in the vicinity. For example, the source data of a certain point is 36-bit color {0xA0F,0xB0F,0xC0F } which is truncated to become 24-bit color {0xA0,0xB0,0xC0}, and a reasonable selection result should be {0xA1,0xB1,0xC1}, and each color component has a deviation of 1 color rank.
Some documents propose that a display effect of approximately 8-bit color depth is displayed by using 6-bit data in a dithering mode [1], but the method is only a visual improvement, the data content is not substantially improved, and the method has very limited improvement on the color depth and can only improve the color depth of 1-2-bit data. When the difference between the high and low color depths is large, the method is not suitable. In addition, because the processing mode is time-dependent, the same image is captured by a camera or the like at different times, and two slightly different images are obtained.
The following documents are background information related to the present invention:
[1] zhangwen super, liuhaifeng, frame rate control for LCD display images-dithering method, 20091229, CN 101770760A.
Disclosure of Invention
In order to solve the above problems in the prior art, that is, the problems of step jump occurring when the color depth of the lower bit is converted into the color depth of the higher bit and conversion deviation occurring when the color depth of the higher bit is converted into the color depth of the lower bit in the color depth conversion of the prior image, the present invention provides a color depth conversion method for a video image, the method comprising:
step S10, obtaining the color depth of the source image sequence to be converted in the video
Figure 589153DEST_PATH_IMAGE001
And the color depth of the target image sequence on the video display side
Figure DEST_PATH_IMAGE002
Step S20, based on the color depth
Figure 443977DEST_PATH_IMAGE001
And said color depth
Figure 223714DEST_PATH_IMAGE002
Calculating the color level conversion relation between each frame image in the source image sequence and the corresponding frame image in the target image sequence, and performing color depth conversion of the source image sequence based on the conversion relation to obtain a target image sequence;
in step S30, if
Figure 618923DEST_PATH_IMAGE003
Outputting the target image sequence with the reduced color depth obtained in the step S20 to the video display end; if it is
Figure DEST_PATH_IMAGE004
Then go to step S40;
step S40, for each current frame target image in the target image sequence, based on the color depth of the source image sequence
Figure 869514DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 691976DEST_PATH_IMAGE002
Classifying the pixel difference value of the current frame target image to obtain a target image sequence consisting of a non-change image, a step change image and a continuous image;
step S50, for each frame of image of the continuous image, carrying out fine adjustment on the current pixel after quantization according to the position of the current pixel in the color level, the position of the previous color level and the position of the next color level, and obtaining the continuous image with rich details;
and step S60, outputting a target image sequence with improved color depth formed by the unchanged image, the step-change image and the continuous image with abundant details to a video display terminal.
In some preferred embodiments, in step S20, the color level conversion relationship between each frame image in the source image sequence and the corresponding frame image in the target image sequence is calculated by:
Figure 100002_DEST_PATH_IMAGE005
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE006
representing the color level conversion relation between the source image and the target image.
In some preferred embodiments, in step S20, the color depth conversion of the source image sequence is performed based on the conversion relationship by:
Figure 896693DEST_PATH_IMAGE007
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE008
represents a source image and a plurality of source images,
Figure 33276DEST_PATH_IMAGE009
which represents the image of the object or objects,
Figure DEST_PATH_IMAGE010
representative pair
Figure 639838DEST_PATH_IMAGE011
Rounding the result of (a).
In some preferred embodiments, the color depth based source image sequence in step S40
Figure 633202DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 387531DEST_PATH_IMAGE002
And classifying the pixel difference value of the current frame target image, wherein the method comprises the following steps:
step S41, based on the color depth of the sequence of source images
Figure 124543DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 87076DEST_PATH_IMAGE002
Determining the detection range of the current frame target image according to the difference value between the target image and the current frame target image, and calculating the difference value between all pixels and adjacent pixels in the detection range through the difference value;
and step S42, dividing the current frame target image into a non-change image, a step change image or a continuous image according to the change trend of the difference value based on the range of the difference value.
In some preferred embodiments, step S50 includes:
step S51, for each frame of image of the continuous image, based on the current pixel
Figure DEST_PATH_IMAGE012
Position of
Figure 516920DEST_PATH_IMAGE013
Constructing a detection matrix at color depths in a source image and a target image
Figure DEST_PATH_IMAGE014
Step S52, based on the detection matrix
Figure 696229DEST_PATH_IMAGE014
Detecting the difference between two adjacent pixels as
Figure 971353DEST_PATH_IMAGE015
Position of the pixel
Figure DEST_PATH_IMAGE016
And
Figure 552507DEST_PATH_IMAGE017
(ii) a The current pixel
Figure 887673DEST_PATH_IMAGE012
Position of
Figure 616595DEST_PATH_IMAGE013
Is located at
Figure 633092DEST_PATH_IMAGE016
And
Figure 131070DEST_PATH_IMAGE017
to (c) to (d);
step S53, calculating the current pixel
Figure 902717DEST_PATH_IMAGE012
Position of
Figure 289573DEST_PATH_IMAGE013
And
Figure 172079DEST_PATH_IMAGE016
and
Figure 524563DEST_PATH_IMAGE017
in combination with the pixel difference
Figure 404794DEST_PATH_IMAGE015
Calculating a current pixel
Figure 842728DEST_PATH_IMAGE012
Fine adjustment correction value of
Figure DEST_PATH_IMAGE018
And proceed with the current pixel
Figure 201029DEST_PATH_IMAGE012
And (4) fine adjustment and correction to obtain continuous images with rich details.
In some preferred embodiments, the detection matrix
Figure 673598DEST_PATH_IMAGE014
Comprises the following steps:
Figure 787048DEST_PATH_IMAGE019
wherein the content of the first and second substances,
Figure 712278DEST_PATH_IMAGE012
representing the current pixel.
In some preferred embodiments, the current pixel is calculated in step S53
Figure 874269DEST_PATH_IMAGE012
Position of
Figure 935766DEST_PATH_IMAGE013
And
Figure 220117DEST_PATH_IMAGE016
and
Figure 71792DEST_PATH_IMAGE017
in combination with the pixel difference
Figure 99791DEST_PATH_IMAGE015
Calculating a current pixel
Figure 281373DEST_PATH_IMAGE012
Fine adjustment correction value of
Figure 408729DEST_PATH_IMAGE018
And proceed with the current pixel
Figure 308552DEST_PATH_IMAGE012
The fine tuning correction method comprises the following steps:
Figure DEST_PATH_IMAGE020
Figure 77925DEST_PATH_IMAGE021
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE022
is the current pixel
Figure 379594DEST_PATH_IMAGE012
Position of
Figure 740168DEST_PATH_IMAGE013
Is determined by the gray-scale value of (a),
Figure DEST_PATH_IMAGE023
as pixel location
Figure 799391DEST_PATH_IMAGE016
Is determined by the gray-scale value of (a),
Figure DEST_PATH_IMAGE024
as pixel location
Figure 605410DEST_PATH_IMAGE017
The gray value of (a).
In another aspect of the present invention, a system for transforming color depth of a video image is provided, the system comprising:
a parameter acquisition module configured to acquire a color depth of a source image sequence to be converted in a video
Figure 496006DEST_PATH_IMAGE001
And the color depth of the target image sequence on the video display side
Figure 230744DEST_PATH_IMAGE002
A color depth conversion module configured to convert the color depth into a color depth based on the color depth
Figure 839580DEST_PATH_IMAGE001
And said color depth
Figure 13072DEST_PATH_IMAGE002
Calculating the color level conversion relationship between each frame image in the source image sequence and the corresponding frame image in the target image sequence, and based on the color level conversion relationshipPerforming color depth conversion on the source image sequence according to the conversion relation to obtain a target image sequence;
a jump judging module configured to be if
Figure 961436DEST_PATH_IMAGE003
If so, sending the target image sequence with the reduced color depth to an output display module; if it is
Figure 929392DEST_PATH_IMAGE004
Skipping to the image frame classification module;
an image frame classification module configured to, for each current frame target image in the target image sequence, base on a color depth of the source image sequence
Figure 25524DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 737128DEST_PATH_IMAGE002
Classifying the pixel difference value of the current frame target image to obtain a target image sequence consisting of a non-change image, a step change image and a continuous image;
the image fine-tuning module is configured to perform fine tuning on the current pixel after quantization according to the position of the current pixel in the color level, the position of the previous color level and the position of the next color level of each frame of image of the continuous image, so as to obtain a continuous image with rich details;
and the output display module is configured to output and display the target image sequence with reduced color depth or the target image sequence with improved color depth formed by the unchanged image, the step change image and the continuous image with rich details.
In a third aspect of the present invention, an electronic device is provided, including:
at least one processor; and
a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,
the memory stores instructions executable by the processor for execution by the processor to implement the video image color depth transformation method described above.
In a fourth aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for being executed by the computer to implement the video image color depth transformation method described above.
The invention has the beneficial effects that:
(1) according to the video image color depth conversion method, in the conversion from low color depth to high color depth of a video image, the converted image can be closer to the original image through color depth stretching, the image display rule can be better met, and the image color level deviation caused by direct zero filling at a low position can be compensated; in the subsequent processing, the details of the image can be enriched according to the characteristics of the image, and the image can be displayed more smoothly.
(2) According to the video image color depth conversion method, in the conversion from high color depth to low color depth of the video image, the converted image can be closer to the original image through the color depth equal-scale reduction, the image display rule can be better met, and the image color level deviation caused by direct end truncation can be made up.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a schematic flow chart of a video image color depth transformation method according to the present invention;
FIG. 2 is a comparison diagram of partial pixel values of an 8-color-depth image converted into a 12-color-depth image according to an embodiment of the color depth transformation method for video images of the present invention;
fig. 3 is a comparison diagram of partial pixel values of an 8-color depth image converted into a 12-color depth image and subjected to pixel trimming according to an embodiment of the color depth transformation method for video images.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
The invention discloses a video image color depth transformation method, which comprises the following steps:
step S10, obtaining the color depth of the source image sequence to be converted in the video
Figure 805579DEST_PATH_IMAGE001
And the color depth of the target image sequence on the video display side
Figure 944436DEST_PATH_IMAGE002
Step S20, based on the color depth
Figure 527864DEST_PATH_IMAGE001
And said color depth
Figure 939430DEST_PATH_IMAGE002
Calculating the color level conversion relation between each frame image in the source image sequence and the corresponding frame image in the target image sequence, and performing color depth conversion of the source image sequence based on the conversion relation to obtain a target image sequence;
in step S30, if
Figure 924703DEST_PATH_IMAGE003
Outputting the target image sequence with the reduced color depth obtained in the step S20 to the video display end; if it is
Figure 234462DEST_PATH_IMAGE004
Then go to step S40;
step S40, for each current frame target image in the target image sequence, based on the color depth of the source image sequence
Figure 242869DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 296276DEST_PATH_IMAGE002
Classifying the pixel difference value of the current frame target image to obtain a target image sequence consisting of a non-change image, a step change image and a continuous image;
step S50, for each frame of image of the continuous image, carrying out fine adjustment on the current pixel after quantization according to the position of the current pixel in the color level, the position of the previous color level and the position of the next color level, and obtaining the continuous image with rich details;
and step S60, outputting a target image sequence with improved color depth formed by the unchanged image, the step-change image and the continuous image with abundant details to a video display terminal.
In order to more clearly explain the color depth transformation method of the video image of the present invention, the following describes the steps in the embodiment of the present invention in detail with reference to fig. 1.
The method for transforming color depth of a video image according to the first embodiment of the present invention includes steps S10-S60, each of which is described in detail as follows:
step S10, obtaining the color depth of the source image sequence to be converted in the video
Figure 136056DEST_PATH_IMAGE001
And the color depth of the target image sequence on the video display side
Figure 616716DEST_PATH_IMAGE002
Color depth: color depth, which describes the number of bits in a single pixel to make up a color. The more bits per pixel, the better the transition from one color to another and the more detailed the different shades of a particular color that are adjacent to each other.
RGB: the computer display image is formed by superposing R (red), G (green) and B (blue) components according to different proportions to form different colors.
Color gradation: color depth of
Figure 112419DEST_PATH_IMAGE025
Each color component having
Figure DEST_PATH_IMAGE026
And (4) color levels.
Step S20, based on the color depth
Figure 969517DEST_PATH_IMAGE001
And said color depth
Figure 335907DEST_PATH_IMAGE002
And calculating the color level conversion relation between each frame image in the source image sequence and the corresponding frame image in the target image sequence, and performing color depth conversion of the source image sequence based on the conversion relation to obtain the target image sequence.
Calculating the color level conversion relation between each frame image in the source image sequence and the corresponding frame image in the target image sequence, wherein the method is as shown in formula (1):
Figure 987468DEST_PATH_IMAGE027
wherein the content of the first and second substances,
Figure 32785DEST_PATH_IMAGE006
representing the color level conversion relation between the source image and the target image.
And performing color depth conversion of the source image sequence based on the conversion relation, wherein the method is as shown in formula (2):
Figure 427994DEST_PATH_IMAGE029
wherein the content of the first and second substances,
Figure 678585DEST_PATH_IMAGE008
represents a source image and a plurality of source images,
Figure 766626DEST_PATH_IMAGE009
which represents the image of the object or objects,
Figure 33660DEST_PATH_IMAGE010
representative pair
Figure 904664DEST_PATH_IMAGE011
Rounding the result of (a).
In step S30, if
Figure 307963DEST_PATH_IMAGE003
Outputting the target image sequence with the reduced color depth obtained in the step S20 to the video display end; if it is
Figure 566906DEST_PATH_IMAGE004
Then, it goes to step S40.
The process of changing the image from high color depth to low color depth is the operation of losing part of image details, the detail optimization is not needed, and the sequence formed by the converted image is directly sent to the output display module for display.
The process of the image from low color depth to high color depth can represent richer image details due to the increase of the color depth, and two adjacent color levels in the low color depth can greatly differ in the high color depth. For example, the color depth before conversion is 8 bits, which has a total of 0 to 255, and 256 levels, and the color depth after conversion is 12 bits, which has a total of 0 to 4095, and 4096 levels. Thus, if there is 1 step before the transition, there is 16 steps after the transition, so that a continuous image before the transition will have a step after the transition, and the image will appear to have a trace of the step since the high color depth display device is more rich in detail.
As shown in fig. 2, a comparison graph of partial pixel values of an 8-color depth image converted into a 12-color depth image according to an embodiment of the method for converting color depth of a video image of the present invention shows that, for a pixel having a difference of 1 between two adjacent pixel values before conversion, and for a pixel having a difference of 16 between pixel values after conversion, the color depth increases to cause the image to be in a staircase shape, and in order to make the image relatively conform to the characteristics of image continuity, interpolation needs to be performed according to the variation trend of the image.
Step S40, for the target image sequenceBased on the color depth of the source image sequence for each current frame target image
Figure 258919DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 995930DEST_PATH_IMAGE002
And classifying the pixel difference value of the current frame target image to obtain a target image sequence consisting of a non-change image, a step change image and a continuous image.
Color depth based on a sequence of source images
Figure 519316DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 949160DEST_PATH_IMAGE002
And classifying the pixel difference value of the current frame target image, wherein the method comprises the following steps:
step S41, based on the color depth of the sequence of source images
Figure 128469DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 669171DEST_PATH_IMAGE002
Determining the detection range of the current frame target image according to the difference value between the target image and the current frame target image, and calculating the difference value between all pixels and adjacent pixels in the detection range through the difference value;
and step S42, dividing the current frame target image into a non-change image, a step change image or a continuous image according to the change trend of the difference value based on the range of the difference value.
No change image: such as computer monochrome test charts and the like;
step change image: such as the edges of computer graphics text, etc.;
successive images: such as incremental or decremental computer test images, natural images, etc.
For an image without change, the image has almost no detail change and is consistent as a whole, so that no processing is carried out; secondly, for the image with step change, the details of the image are only at the position where the step occurs, and the problem of detail continuity does not exist, so the image is not processed; and thirdly, quantizing the continuous image according to the color level of the current pixel and the positions of the previous color level and the next color level, finely adjusting the current pixel, and enriching details under the condition of keeping the overall contour unchanged.
And step S50, for each frame of image of the continuous image, carrying out fine adjustment on the current pixel after quantization according to the position of the color level of the current pixel and the positions of the previous color level and the next color level, and obtaining the continuous image with rich details.
Step S51, for each frame of image of the continuous image, based on the current pixel
Figure 312642DEST_PATH_IMAGE012
Position of
Figure 821377DEST_PATH_IMAGE013
Constructing a detection matrix at color depths in a source image and a target image
Figure 550299DEST_PATH_IMAGE014
As shown in formula (3):
Figure DEST_PATH_IMAGE030
wherein the content of the first and second substances,
Figure 832376DEST_PATH_IMAGE012
represents the current pixel;
step S52, based on the detection matrix
Figure 330353DEST_PATH_IMAGE014
Detecting the difference between two adjacent pixels as
Figure 836421DEST_PATH_IMAGE015
Position of the pixel
Figure 990322DEST_PATH_IMAGE016
And
Figure 872827DEST_PATH_IMAGE017
(ii) a The current pixel
Figure 225311DEST_PATH_IMAGE012
Position of
Figure 167859DEST_PATH_IMAGE013
Is located at
Figure 277898DEST_PATH_IMAGE016
And
Figure 698515DEST_PATH_IMAGE017
to (c) to (d);
step S53, calculating the current pixel
Figure 171084DEST_PATH_IMAGE012
Position of
Figure 720752DEST_PATH_IMAGE013
And
Figure 645983DEST_PATH_IMAGE016
and
Figure 870291DEST_PATH_IMAGE017
in combination with the pixel difference
Figure 869471DEST_PATH_IMAGE015
Calculating a current pixel
Figure 153822DEST_PATH_IMAGE012
Fine adjustment correction value of
Figure 566348DEST_PATH_IMAGE018
And proceed with the current pixel
Figure 532030DEST_PATH_IMAGE012
And (4) fine adjustment and correction to obtain continuous images with rich details.
Calculating a current pixel
Figure 713613DEST_PATH_IMAGE012
Position of
Figure 168865DEST_PATH_IMAGE013
And
Figure 68688DEST_PATH_IMAGE016
and
Figure 572482DEST_PATH_IMAGE017
in combination with the pixel difference
Figure 608571DEST_PATH_IMAGE015
Calculating a current pixel
Figure 234724DEST_PATH_IMAGE012
Fine adjustment correction value of
Figure 795412DEST_PATH_IMAGE018
And proceed with the current pixel
Figure 899634DEST_PATH_IMAGE012
The method of trimming (2) is represented by the following formulas (4) and (5):
Figure 55809DEST_PATH_IMAGE031
Figure DEST_PATH_IMAGE032
wherein the content of the first and second substances,
Figure 56126DEST_PATH_IMAGE022
is the current pixel
Figure 664962DEST_PATH_IMAGE012
Position of
Figure 776137DEST_PATH_IMAGE013
Is determined by the gray-scale value of (a),
Figure 786819DEST_PATH_IMAGE016
is a distance
Figure 754775DEST_PATH_IMAGE013
The nearest previous point of color change of the image,
Figure 850907DEST_PATH_IMAGE017
is a distance
Figure 234615DEST_PATH_IMAGE013
The nearest next point of color change of the image,
Figure 365382DEST_PATH_IMAGE013
is located at
Figure 504239DEST_PATH_IMAGE016
And
Figure 523885DEST_PATH_IMAGE017
in the above-mentioned manner,
Figure 773601DEST_PATH_IMAGE023
as pixel location
Figure 758875DEST_PATH_IMAGE016
Is determined by the gray-scale value of (a),
Figure 740737DEST_PATH_IMAGE024
as pixel location
Figure 811461DEST_PATH_IMAGE017
The gray value of (a).
As shown in fig. 3, a partial pixel value contrast diagram for pixel fine adjustment after an 8-color depth image is converted into a 12-color depth image according to an embodiment of the video image color depth conversion method of the present invention, the top is the partial pixel value of the 8-color depth image, and the middle is the partial pixel value after the 8-color depth is converted into the 12-color depthThe lowest part of the image pixel values is the part of the image pixel values after pixel fine adjustment, and the image pixel values are calculated by a detection matrix
Figure 864868DEST_PATH_IMAGE013
Image trend centered at the location:
[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16(
Figure 704648DEST_PATH_IMAGE016
),0,0(
Figure 388570DEST_PATH_IMAGE013
),0,0,0,0,0,0,0,0,0,0,0,0,0,16(
Figure 681011DEST_PATH_IMAGE017
),0,0,0,…];
Figure DEST_PATH_IMAGE033
therefore, it is
Figure DEST_PATH_IMAGE034
Two image change points
Figure 475792DEST_PATH_IMAGE016
And
Figure 170078DEST_PATH_IMAGE017
is a distance of 16 a from the top,
Figure 260788DEST_PATH_IMAGE013
the point reaches the first image change point
Figure 306104DEST_PATH_IMAGE016
Has a distance of 2, the difference between the pixel values of the two image change points is
Figure 701313DEST_PATH_IMAGE034
Is calculated to obtain
Figure 187789DEST_PATH_IMAGE013
Correction value of point
Figure 275831DEST_PATH_IMAGE035
Due to the fact that
Figure DEST_PATH_IMAGE036
Figure 542864DEST_PATH_IMAGE037
Figure DEST_PATH_IMAGE038
Thus, after fine adjustment correction
Figure 413868DEST_PATH_IMAGE013
Dot pixel value
Figure 82747DEST_PATH_IMAGE039
And step S60, outputting a target image sequence with improved color depth formed by the unchanged image, the step-change image and the continuous image with abundant details to a video display terminal.
Although the foregoing embodiments describe the steps in the above sequential order, those skilled in the art will understand that, in order to achieve the effect of the present embodiments, the steps may not be executed in such an order, and may be executed simultaneously (in parallel) or in an inverse order, and these simple variations are within the scope of the present invention.
A video image color depth conversion system according to a second embodiment of the present invention includes:
a parameter acquisition module configured to acquire a color depth of a source image sequence to be converted in a video
Figure 279373DEST_PATH_IMAGE001
And the color depth of the target image sequence on the video display side
Figure 768123DEST_PATH_IMAGE002
A color depth conversion module configured toBased on the colour depth
Figure 770715DEST_PATH_IMAGE001
And said color depth
Figure 730318DEST_PATH_IMAGE002
Calculating the color level conversion relation between each frame image in the source image sequence and the corresponding frame image in the target image sequence, and performing color depth conversion of the source image sequence based on the conversion relation to obtain a target image sequence;
a jump judging module configured to be if
Figure 894583DEST_PATH_IMAGE003
If so, sending the target image sequence with the reduced color depth to an output display module; if it is
Figure 136209DEST_PATH_IMAGE004
Skipping to the image frame classification module;
an image frame classification module configured to, for each current frame target image in the target image sequence, base on a color depth of the source image sequence
Figure 676911DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 992486DEST_PATH_IMAGE002
Classifying the pixel difference value of the current frame target image to obtain a target image sequence consisting of a non-change image, a step change image and a continuous image;
the image fine-tuning module is configured to perform fine tuning on the current pixel after quantization according to the position of the current pixel in the color level, the position of the previous color level and the position of the next color level of each frame of image of the continuous image, so as to obtain a continuous image with rich details;
and the output display module is configured to output and display the target image sequence with reduced color depth or the target image sequence with improved color depth formed by the unchanged image, the step change image and the continuous image with rich details.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process and related description of the system described above may refer to the corresponding process in the foregoing method embodiments, and will not be described herein again.
It should be noted that, the video image color depth transformation system provided in the foregoing embodiment is only illustrated by the division of the functional modules, and in practical applications, the above functions may be distributed by different functional modules according to needs, that is, the modules or steps in the embodiments of the present invention are further decomposed or combined, for example, the modules in the foregoing embodiments may be combined into one module, or may be further split into multiple sub-modules, so as to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps, and are not to be construed as unduly limiting the present invention.
An electronic apparatus according to a third embodiment of the present invention includes:
at least one processor; and
a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,
the memory stores instructions executable by the processor for execution by the processor to implement the video image color depth transformation method described above.
A computer-readable storage medium according to a fourth embodiment of the present invention stores computer instructions for being executed by the computer to implement the video image color depth conversion method described above.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes and related descriptions of the storage device and the processing device described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Those of skill in the art would appreciate that the various illustrative modules, method steps, and modules described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that programs corresponding to the software modules, method steps may be located in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. To clearly illustrate this interchangeability of electronic hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as electronic hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The terms "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing or implying a particular order or sequence.
The terms "comprises," "comprising," or any other similar term are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (10)

1. A method for color depth conversion of a video image, the method comprising:
step S10, obtaining the color depth of the source image sequence to be converted in the video
Figure 585038DEST_PATH_IMAGE001
And the color depth of the target image sequence on the video display side
Figure 375270DEST_PATH_IMAGE002
Step S20, based on the color depth
Figure 974879DEST_PATH_IMAGE001
And said color depth
Figure 707211DEST_PATH_IMAGE002
Calculating the color level conversion relation between each frame image in the source image sequence and the corresponding frame image in the target image sequence, and performing color depth conversion of the source image sequence based on the conversion relation to obtain a target image sequence;
in step S30, if
Figure 25060DEST_PATH_IMAGE003
Outputting the target image sequence with the reduced color depth obtained in the step S20 to the video display end; if it is
Figure 743618DEST_PATH_IMAGE004
Then go to step S40;
step S40, for each current frame target image in the target image sequence, based on the color depth of the source image sequence
Figure 73099DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 117278DEST_PATH_IMAGE002
Classifying the pixel difference value of the current frame target image to obtain a target image sequence consisting of a non-change image, a step change image and a continuous image;
step S50, for each frame of image of the continuous image, carrying out fine adjustment on the current pixel after quantization according to the position of the current pixel in the color level, the position of the previous color level and the position of the next color level, and obtaining the continuous image with rich details;
and step S60, outputting a target image sequence with improved color depth formed by the unchanged image, the step-change image and the continuous image with abundant details to a video display terminal.
2. The method for color depth transformation of video images according to claim 1, wherein the step S20 is implemented by calculating the color level transformation relationship between each frame image in the source image sequence and the corresponding frame image in the target image sequence, and the method comprises:
Figure DEST_PATH_IMAGE005
wherein the content of the first and second substances,
Figure 515899DEST_PATH_IMAGE006
representing the color level conversion relation between the source image and the target image.
3. The method for color depth conversion of video images according to claim 2, wherein the step S20 is to perform color depth conversion of the source image sequence based on the conversion relationship by:
Figure 38147DEST_PATH_IMAGE008
wherein the content of the first and second substances,
Figure 219205DEST_PATH_IMAGE009
represents a source image and a plurality of source images,
Figure 168706DEST_PATH_IMAGE010
which represents the image of the object or objects,
Figure 320202DEST_PATH_IMAGE011
representative pair
Figure 646141DEST_PATH_IMAGE012
Rounding the result of (a).
4. The method for color depth transformation of video images according to claim 1, wherein the step S40 is based on the color depth of the sequence of source images
Figure 74848DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 70617DEST_PATH_IMAGE002
And classifying the pixel difference value of the current frame target image, wherein the method comprises the following steps:
step S41, based on the color depth of the sequence of source images
Figure 584775DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 573460DEST_PATH_IMAGE002
Determining the detection range of the current frame target image according to the difference value between the target image and the current frame target image, and calculating the difference value between all pixels and adjacent pixels in the detection range through the difference value;
and step S42, dividing the current frame target image into a non-change image, a step change image or a continuous image according to the change trend of the difference value based on the range of the difference value.
5. The method for color depth conversion of video images according to claim 1, wherein step S50 comprises:
step S51, for each frame of image of the continuous image, based on the current pixel
Figure 591094DEST_PATH_IMAGE013
Position of
Figure 288923DEST_PATH_IMAGE014
Constructing a detection matrix at color depths in a source image and a target image
Figure 24798DEST_PATH_IMAGE015
Step S52, based on the detection matrix
Figure 551594DEST_PATH_IMAGE015
Detecting the difference between two adjacent pixels as
Figure 954894DEST_PATH_IMAGE016
Position of the pixel
Figure 682678DEST_PATH_IMAGE017
And
Figure 515636DEST_PATH_IMAGE018
(ii) a The current pixel
Figure 987069DEST_PATH_IMAGE013
Position of
Figure 369509DEST_PATH_IMAGE014
Is located at
Figure 2615DEST_PATH_IMAGE017
And
Figure 591378DEST_PATH_IMAGE018
to (c) to (d);
step S53, calculating the current pixel
Figure 600923DEST_PATH_IMAGE013
Position of
Figure 713235DEST_PATH_IMAGE014
And
Figure 907456DEST_PATH_IMAGE017
and
Figure 839640DEST_PATH_IMAGE018
in combination with the pixel difference
Figure 793821DEST_PATH_IMAGE016
Calculating a current pixel
Figure 760640DEST_PATH_IMAGE013
Fine adjustment correction value of
Figure 860183DEST_PATH_IMAGE019
And proceed with the current pixel
Figure 545242DEST_PATH_IMAGE013
And (4) fine adjustment and correction to obtain continuous images with rich details.
6. The method of claim 5, wherein the detection matrix is a color depth transform matrix
Figure 162168DEST_PATH_IMAGE015
Comprises the following steps:
Figure 858860DEST_PATH_IMAGE020
wherein the content of the first and second substances,
Figure 4670DEST_PATH_IMAGE013
representing the current pixel.
7. The method for color depth conversion of video images according to claim 5, wherein the current pixel is calculated in step S53
Figure 301659DEST_PATH_IMAGE013
Position of
Figure 456697DEST_PATH_IMAGE014
And
Figure 7895DEST_PATH_IMAGE017
and
Figure 590186DEST_PATH_IMAGE018
in combination with the pixel difference
Figure 108893DEST_PATH_IMAGE016
Calculating a current pixel
Figure 67621DEST_PATH_IMAGE013
Fine adjustment correction value of
Figure 863539DEST_PATH_IMAGE019
And proceed with the current pixel
Figure 489168DEST_PATH_IMAGE013
The fine tuning correction method comprises the following steps:
Figure 370536DEST_PATH_IMAGE021
Figure 992010DEST_PATH_IMAGE022
wherein the content of the first and second substances,
Figure 642435DEST_PATH_IMAGE023
is the current pixel
Figure 441894DEST_PATH_IMAGE013
Position of
Figure 76138DEST_PATH_IMAGE014
Is determined by the gray-scale value of (a),
Figure 111090DEST_PATH_IMAGE024
as pixel location
Figure 740655DEST_PATH_IMAGE017
Is determined by the gray-scale value of (a),
Figure 835650DEST_PATH_IMAGE025
as pixel location
Figure 301397DEST_PATH_IMAGE018
The gray value of (a).
8. A video image color depth conversion system, comprising:
a parameter acquisition module configured to acquire a color depth of a source image sequence to be converted in a video
Figure 405619DEST_PATH_IMAGE001
And the color depth of the target image sequence on the video display side
Figure 155270DEST_PATH_IMAGE002
A color depth conversion module configured to convert the color depth into a color depth based on the color depth
Figure 421166DEST_PATH_IMAGE001
And said color depth
Figure 374209DEST_PATH_IMAGE002
Calculating the color level conversion relation between each frame image in the source image sequence and the corresponding frame image in the target image sequence, and performing color depth conversion of the source image sequence based on the conversion relation to obtain a target image sequence;
a jump judging module configured to be if
Figure 16543DEST_PATH_IMAGE003
If so, sending the target image sequence with the reduced color depth to an output display module; if it is
Figure 496066DEST_PATH_IMAGE004
Skipping to the image frame classification module;
an image frame classification module configured to, for each current frame target image in the target image sequence, base on a color depth of the source image sequence
Figure 57498DEST_PATH_IMAGE001
And the color depth of the target image sequence
Figure 223469DEST_PATH_IMAGE002
Classifying the pixel difference value of the current frame target image to obtain a target image sequence consisting of a non-change image, a step change image and a continuous image;
the image fine-tuning module is configured to perform fine tuning on the current pixel after quantization according to the position of the current pixel in the color level, the position of the previous color level and the position of the next color level of each frame of image of the continuous image, so as to obtain a continuous image with rich details;
and the output display module is configured to output and display the target image sequence with reduced color depth or the target image sequence with improved color depth formed by the unchanged image, the step change image and the continuous image with rich details.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to at least one of the processors; wherein the content of the first and second substances,
the memory stores instructions executable by the processor for performing the method of video image color depth transformation of any of claims 1-7.
10. A computer-readable storage medium storing computer instructions for execution by the computer to implement the video image color depth transformation method according to any one of claims 1 to 7.
CN202110267128.4A 2021-03-11 2021-03-11 Video image color depth transformation method, system and equipment Active CN112689139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110267128.4A CN112689139B (en) 2021-03-11 2021-03-11 Video image color depth transformation method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110267128.4A CN112689139B (en) 2021-03-11 2021-03-11 Video image color depth transformation method, system and equipment

Publications (2)

Publication Number Publication Date
CN112689139A true CN112689139A (en) 2021-04-20
CN112689139B CN112689139B (en) 2021-05-28

Family

ID=75455502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110267128.4A Active CN112689139B (en) 2021-03-11 2021-03-11 Video image color depth transformation method, system and equipment

Country Status (1)

Country Link
CN (1) CN112689139B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411668A (en) * 2021-06-16 2021-09-17 湖北亿咖通科技有限公司 Video playing system and method
CN114244968A (en) * 2021-12-20 2022-03-25 北京镁伽科技有限公司 Image conversion method, image conversion device and image signal generator
CN114245030A (en) * 2021-12-20 2022-03-25 北京镁伽科技有限公司 Method and device for displaying test image by upper computer and image signal generator
CN114268704A (en) * 2021-12-20 2022-04-01 北京镁伽科技有限公司 Image data conversion method, conversion device, signal generator, and storage medium
CN114428869A (en) * 2021-12-20 2022-05-03 北京镁伽科技有限公司 Test image output display method and device and image signal generator

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101765018A (en) * 2008-12-25 2010-06-30 中国移动通信集团公司 Method and apparatus for color depth transformation and image transmission thereafter
US20110134152A1 (en) * 2009-12-08 2011-06-09 Renesas Electronics Corporation Apparatus for simultaneously performing gamma correction and contrast enhancement in display device
CN102598114A (en) * 2009-09-01 2012-07-18 娱乐体验有限责任公司 Method for producing a color image and imaging device employing same
CN102592293A (en) * 2011-01-07 2012-07-18 北京四维图新科技股份有限公司 Color reducing method and device of true color image
CN103458242A (en) * 2013-07-02 2013-12-18 北京京北方信息技术有限公司 Method for compressing and uncompressing image based on color classification and cluster
CN104618701A (en) * 2015-01-13 2015-05-13 小米科技有限责任公司 Image processing method and device and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101765018A (en) * 2008-12-25 2010-06-30 中国移动通信集团公司 Method and apparatus for color depth transformation and image transmission thereafter
CN102598114A (en) * 2009-09-01 2012-07-18 娱乐体验有限责任公司 Method for producing a color image and imaging device employing same
US20110134152A1 (en) * 2009-12-08 2011-06-09 Renesas Electronics Corporation Apparatus for simultaneously performing gamma correction and contrast enhancement in display device
CN102592293A (en) * 2011-01-07 2012-07-18 北京四维图新科技股份有限公司 Color reducing method and device of true color image
CN103458242A (en) * 2013-07-02 2013-12-18 北京京北方信息技术有限公司 Method for compressing and uncompressing image based on color classification and cluster
CN104618701A (en) * 2015-01-13 2015-05-13 小米科技有限责任公司 Image processing method and device and electronic device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411668A (en) * 2021-06-16 2021-09-17 湖北亿咖通科技有限公司 Video playing system and method
CN113411668B (en) * 2021-06-16 2023-03-21 亿咖通(湖北)技术有限公司 Video playing system and method
CN114244968A (en) * 2021-12-20 2022-03-25 北京镁伽科技有限公司 Image conversion method, image conversion device and image signal generator
CN114245030A (en) * 2021-12-20 2022-03-25 北京镁伽科技有限公司 Method and device for displaying test image by upper computer and image signal generator
CN114268704A (en) * 2021-12-20 2022-04-01 北京镁伽科技有限公司 Image data conversion method, conversion device, signal generator, and storage medium
CN114428869A (en) * 2021-12-20 2022-05-03 北京镁伽科技有限公司 Test image output display method and device and image signal generator
CN114244968B (en) * 2021-12-20 2024-01-09 北京镁伽科技有限公司 Image conversion method, image conversion device and image signal generator

Also Published As

Publication number Publication date
CN112689139B (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN112689139B (en) Video image color depth transformation method, system and equipment
US11900852B2 (en) Method and device for obtaining display compensation information, and display compensation method and device
JP5273671B2 (en) Display signal converter
US10679544B2 (en) Digital image processing chain and processing blocks and a display including the same
KR100782818B1 (en) Method and system for luminance preserving color conversion from YUV to RGB
KR100818988B1 (en) Method and apparatus for processing image signal
US20180053290A1 (en) Method and apparatus for adjusting image brightness
US7064864B2 (en) Method and apparatus for compressing reproducible color gamut
US7554557B2 (en) Device and method for image compression and decompression
JPH03212685A (en) Apparatus and method for improving resolution of display
JP5037311B2 (en) Color reproduction system and method
JP4363720B2 (en) A device for creating color palettes
Tourancheau et al. Impact of subjective dataset on the performance of image quality metrics
KR20070019438A (en) Method and apparatus for displaying image signal
CN101471063A (en) Color signal generating device
CN108986769B (en) Method for maximally restoring content of Rec.2020 color gamut by display equipment with color gamut lower than Rec.2020 color gamut
CN115841794B (en) OLED display screen detection method and device, display image processing method and device
KR100869089B1 (en) Image processing apparatus
KR930005812B1 (en) Color information storage and processing system
KR20140049441A (en) Method of correcting colors, machine-implemented method for a multi-primary color matrix display apparatus, and imgae data signal processing apparatus
CN114930381A (en) Image processing method, image processing device, electronic equipment and storage medium
JPH08305330A (en) Error diffusion method, error diffusion device and halftone processing method
US20050083355A1 (en) Apparatus and method for image-processing, and display apparatus
CN113271449B (en) Conversion system, method and equipment for multiple HDR videos
CN113709437B (en) Display device, display control method, and recording medium

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
GR01 Patent grant
GR01 Patent grant