A kind of method that is used to improve contour distortion of plasma display panel
Technical field
The invention belongs to image display process field, relate to the demonstration of adopting sub-displaying mode to realize many grades gray scale of PDP display display image, be specifically related to a kind of method that is used to improve contour distortion of plasma display panel.
Background technology
AC plasma display screen (AC PDP:AC Plasma Display Panel), multi-grayscale for display image, normally a two field picture being divided into many sons field shows, different son fields have different weights, the son of different weights is corresponding to different luminance weights, promptly the son of different weights corresponding in circuit is realized the different umber of pulses of keeping.
AC PDP display screen is divided into 8 sons (SF:subfield) with the image of a frame, and the pass of a son weight is SF1: SF2: SF3: SF4: SF5: SF6: SF7: SF8=1: 2: 4: 8: 16: 32: 64: 128.These 8 a son different combination of process just can realize the demonstration of totally 256 grades of gray shade scales between 0~255, and for example: SF1 when realizing gray shade scale 0~SF8 is all extinguished, do not produce discharge; SF1~SF7 all lights and produces discharge when realizing gray shade scale 127, and SF8 extinguishes and do not produce discharge; SF1~SF7 all extinguishes and does not produce discharge when realizing gray shade scale 128, and SF8 lights, and produces discharge; When producing gray shade scale 255, SF1~SF8 all lights and produces discharge.
But can cause the phenomenon of dynamic false contours to produce when adopting the son field to realize many grades gray scale of image, promptly when showing the dynamic color image, can produce the phenomenon of color disorder.The generation of dynamic false contours is the vision physiological feature of human eye and the result who adopts sub-displaying mode combined action.
Human eye has following physiological characteristic, and the one, observer's viewpoint is understood the accompany movement object and is moved; The 2nd and since vision persist effect, causing human eye is impression to the summation of brightness in a period of time or color to the impression of the gray scale of image or color.So, when the moving image of the multi-grey level that observe to adopt sub-field type to show, in some part of image bright or dark false image, i.e. dynamic false contours can appear, observer's sight also can be along with stop motion after the moving image stop motion, and false contouring will disappear.This be since the decision of the physiological characteristic of human eye be the factor that can't overcome.Adopt sub-field type to realize that it is to produce dynamically to be another reason of profile that many grades gray scale shows, one moving image that moves is from left to right for example arranged on screen, show 127 and 128 grade gray scales on moving image, 128 grade gray scales are on a left side, and 127 grade gray scales are on the right side.According to son displaying principle, SF1~SF7 lights and SF8 extinguishes when showing 127 grade gray scales, and anharmonic ratio as a matter of expediency shows that at each two field picture the first half of time shows as can be seen; SF1~SF7 extinguishes SF8 and lights when showing 128 grade gray scales, anharmonic ratio as a matter of expediency shows that at each frame the latter half of time shows as can be seen, and this just time distributes goes up the uneven luminous disorder that can occur gray shade scale at the critical place of grade gray scale that caused.Tangible dark space but occurred at 128 and 127 two grade gray scale intersections, show the grade gray scale this moment is 0.This is because viewpoint when the accompany movement image moves, has been passed through the reason of non-luminous pixel, Here it is dynamic false contour continuously.This situation be because the grade gray scale of visual phenomenon less than the grade gray scale of original image, is referred to as the dynamic false contours of negative polarity.If image is when moving from right to left, the intersection in grade gray scale 128 and 127, what pixel do not occur extinguishes (OFF) state continuously, has occurred (ON) state of lighting continuously of pixel on the contrary.In such cases, tangible clear zone has appearred at 128 and 127 two grade gray shade scale intersections, show the grade gray scale of 128+127=255 this moment, this is because human eye is being followed image when moving, and has passed through the reason of all luminous pixel of a field time continuously.This situation is because the grade gray scale of visual phenomenon greater than the grade gray scale of original image, is referred to as the dynamic false contours of positive polarity.
The phenomenon of dynamic false contours is a kind of disadvantage of principle, can't fundamentally eliminate completely, can only take certain measure to be suppressed, and makes human eye be not easy to feel out in the observation process.At present there has been a lot of methods to reduce the influence of dynamic false contours, such as CLEAR method, compensated pulse method, cut apart authority baryon field method, adjust a son DISPLAY ORDER method, error-diffusion method, reduce son fluorescent lifetime method or the like to image quality.The advantage that diverse ways has himself is some weak point also.
During with less son field or the high grey scale image of gray level display, if do not adopt image enhancement technique tangible false contouring phenomenon can occur, especially at the large tracts of land homogeneous area.Conventional error diffusion method is by the false contouring of obfuscation removal of images large tracts of land homogeneous area, but because therefore aforesaid defective has also lost the true profile that reflects image detail simultaneously.According to the principle of error diffusion, hope can improve on existing conventional error diffusion method basis, can not only keep the half-tone information of original image, and can reduce because profile information loss and the false contouring that conventional method defective and other reasons cause.
Summary of the invention
The objective of the invention is to, a kind of method that is used for improving the plasma panel contour distortion is provided, this method adopts the dynamic error method of diffusion based on rim detection, can not only reduce the contour distortion phenomenon largely, and can keep the detailed information of image, especially the detailed information of large tracts of land homogeneous area makes the quality of AC PDP display image can approach original image preferably.
In order to realize above-mentioned task, of the present inventionly take following technical scheme to be achieved:
A kind of method of improving the contour distortion of plasma panel is characterized in that this method comprises the following steps:
1) at first increases an edge contour detection module, the pixel of input is carried out rim detection, obtain the contour distortion degree by the edge contour detection module at error diffusion module front end;
2) the contour distortion degree that obtains is adopted edge detection algorithm in the error diffusion module, when the edge false contouring occurs, the fraction part of gray shade scale is spread to contiguous sub-pixel according to certain dispersal direction and diffusion weight;
3) determine the error diffusion coefficient sets that current processed pixels adopts according to rim detection.Simultaneously, in carrying out the error diffusion processing procedure, the error diffusion coefficient of all directions is dynamically adjusted based on edge detection results, rather than adopts fixed coefficient.
4) pixel after diffusion is sent into display control module output.
Every two field picture all adopts the mode of son field to show, the sub-pixel of the m bit byte of sub-number of fields is transformed to the data of 8 byte wides through error diffusion; The error of sub-pixel respectively with the diffusion weight selected by four different dispersal directions toward adjacent sub-pixel diffusion, at first, R, G, B as three independently sub-pixel to adjacent R, G, the diffusion of B sub-pixel; Secondly, in a field picture be from left to right, error is spread from top to bottom; Sub-pixel all was the error that its front sub-pixel diffusion comes that added up before diffusion, carried out the error diffusion of self again;
Above-mentioned edge detection algorithm is to carry out improved algorithm on the basis of ELA (Edge Directional Line Averaging) algorithm.
Described edge detection algorithm is to carry out improved algorithm on the basis of ELA algorithm, is defined as follows:
If a, b, c, d be represent pixel Pi respectively, the j and the edge difference of processed pixels all around, then:
a=|P(i,j-1)-P(i,j)|
b=|P(i-1,j-1)-P(i,j)|
c=|P(i-1,j)-P(i,j)|
d=|P(i-1,j-1)-P(i,j)|
In the formula: Pi, j are (i, the original image gray-scale value of j) locating;
After obtaining the rim detection difference of each dispersal direction, just determine the error diffusion coefficient sets of current process points and the error diffusion coefficient of all directions;
A, b, c, d by ordering from big to small, are made T=max{a, b, c, d} selects threshold value if G is a coefficient sets, if T>G then adopts one group of coefficient of diffusion; Otherwise, adopt another group coefficient of diffusion;
After the selected error diffusion coefficient sets, determine all directions error diffusion coefficient according to edge detection results; A, b, c, d is corresponding with 4 deflection error coefficient of diffusion, be respectively left, upper left, last and upper right, the error diffusion coefficient minimum of maximum direction difference correspondence, otherwise the error diffusion coefficient maximum of minimum direction difference correspondence.
The weight between adjacent two pixels changes the appearance that judges whether to have the contour distortion phenomenon to method of the present invention in the same son field by detecting owing to introduced the edge contour detection module, and the mode that adopts error diffusion reduces the contour distortion phenomenon of plasma panel with the false contouring value diffusion that obtains.
Description of drawings
Fig. 1 is weight ratio of a two field picture each son when being divided into 8 sons and showing;
Fig. 2 is the luminous distribution plan on time and space of pixel cell discharge when producing the positive polarity dynamic false contours;
Fig. 3 is the luminous distribution plan on time and space of pixel cell discharge when producing the negative polarity dynamic false contours;
Fig. 4 is the synoptic diagram that shows still image;
Fig. 5 is the image border contour pixel;
Fig. 6 is by 11 a sons weight ratio that shows;
Fig. 7 detects the false contouring value of statistical indicant that obtains by edge contour;
Fig. 8 is that edge contour detects the data flow diagram of eliminating dynamic false contours.
For a more clear understanding of the present invention, be described in further detail below in conjunction with accompanying drawing.
Embodiment
According to method of the present invention, increase the edge contour detection module at error diffusion module front end, dynamically obtained the contour distortion degree; The contour distortion degree that obtains is adopted edge detection algorithm in the error diffusion module, when the edge false contouring occurs, again broadcast algorithm is applied to improve image quality, the fraction part of gray shade scale is spread to contiguous sub-pixel according to certain dispersal direction and diffusion weight; The sub-pixel that mbit (m bit wide bit depends on the sub-number of fields of selection) is wide is transformed to the wide data of 8bit through error diffusion and has guaranteed image quality simultaneously again.Error diffusion algorithm mainly is to consider the direction of diffusion and the weight of diffusion, and the error of sub-pixel is pressed four different dispersal directions toward adjacent sub-pixel diffusion with 7/16,1/16,5/16,3/16 diffusion weight respectively.At first, R, G, B as three independently sub-pixel to adjacent R, G, the diffusion of B sub-pixel; Secondly, in a field picture be from left to right, error is spread from top to bottom; Sub-pixel all was the error that its front sub-pixel diffusion comes that added up before diffusion, carried out the error diffusion of self again.
Conventional error diffusion method is applied among the AC PDP, though reduced the false contouring phenomenon to a certain extent, but because coefficient of diffusion is constant all the time in processing procedure, make the profile detailed information of display image lose, thereby brought new contour distortion, and this method adopts the dynamic error method of diffusion based on rim detection, can avoid above-mentioned phenomenon, can not only reduce the false contouring phenomenon largely, and can keep the detailed information of image, especially the detailed information of large tracts of land homogeneous area makes the quality of AC PDP display image can approach original image preferably.
Determine the error diffusion coefficient sets that current processed pixels adopts according to rim detection.Simultaneously, in carrying out the error diffusion processing procedure, the error diffusion coefficient of all directions is dynamically adjusted based on edge detection results, rather than gets fixed value.
Can find out by Fig. 7, between the two adjacent pixels of edge contour when son occurring and change the edge contour sign just change, also just determined the false contouring value.For example, adjacent two pixel Pi among the SF1 among Fig. 7, it is 0 that j and Pi-1, j divide other weight, promptly extinguishes in SF1, and Pi so just is described, and the variation of gray shade scale does not take place in j and Pi-1 between the j, so the profile detection flag is 0, and false contouring also is 0; In SF2, Pi, j and Pi-1, the weight of j is 0 and 2, i.e. Pi in SF2, j extinguishes, Pi-1, j is luminous, and the profile detection flag is 1 so, and false contouring is 2.
Edge detection algorithm a, b, c, d after the improvement have represented pixel Pi respectively, the j and the edge difference of processed pixels all around; Be defined as follows
a=|P(i,j-1)-P(i,j)|
b=|P(i-1,j-1)-P(i,j)|
c=|P(i-1,j)-P(i,j)|
d=|P(i-1,j-1)-P(i,j)|
In the formula: Pi, j are (i, the original image gray-scale value of j) locating.After obtaining the rim detection difference of each dispersal direction, just can determine the error diffusion coefficient of the error diffusion coefficient sets and all directions of current process points.A, b, c, d by ordering from big to small, are made T=max{a, b, c, d} selects threshold value if G is a coefficient sets, if T>G then adopts one group of coefficient of diffusion; Otherwise, adopt another group coefficient of diffusion.After the selected error diffusion coefficient sets, determine all directions error diffusion coefficient according to edge detection results.A, b, c, d is corresponding with 4 deflection error coefficient of diffusion, be respectively K1 (left side), K2 (upper left), K3 (on) and K4 (upper right).The error diffusion coefficient minimum of maximum direction difference correspondence, otherwise the error diffusion coefficient maximum of minimum direction difference correspondence.For example, the error diffusion of having selected current pixel according to the T value adopts A group coefficient, and a<b<c<d, and then this moment, coefficient of diffusion was K1=KA, and 4; K2=KA, 3; K3=KA, 2; K4=KA, the 1 pair of error diffusion coefficient is adjusted dynamically by the result of rim detection, can avoid the distortion of the aforementioned image outline information that causes owing to the fixed error coefficient of diffusion.After obtaining the error diffusion coefficient of current processed pixels, can carry out the processing of error diffusion.
In AC PDP, when showing high grey scale image, use above-mentioned error diffusion method based on rim detection with less son field.With modal 8 byte input pictures is example, and when showing with 8 son fields, the structure of handling based on the rim detection error diffusion on conventional error diffusion method basis as shown in Figure 8.Error diffusion module among Fig. 8 is carried out error diffusion handle, its processing procedure is identical with conventional error diffusion method.The edge contour detection module carries out rim detection among Fig. 8, and dynamically determines the error diffusion coefficient of all directions of current processed pixels.