CN105357430B - A kind of anti-flashing processing method and processing device - Google Patents

A kind of anti-flashing processing method and processing device Download PDF

Info

Publication number
CN105357430B
CN105357430B CN201410410658.XA CN201410410658A CN105357430B CN 105357430 B CN105357430 B CN 105357430B CN 201410410658 A CN201410410658 A CN 201410410658A CN 105357430 B CN105357430 B CN 105357430B
Authority
CN
China
Prior art keywords
pixel
brightness value
para
processed
edge direction
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.)
Active
Application number
CN201410410658.XA
Other languages
Chinese (zh)
Other versions
CN105357430A (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.)
Shenzhen ZTE Microelectronics Technology Co Ltd
Original Assignee
Shenzhen ZTE Microelectronics 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 Shenzhen ZTE Microelectronics Technology Co Ltd filed Critical Shenzhen ZTE Microelectronics Technology Co Ltd
Priority to CN201410410658.XA priority Critical patent/CN105357430B/en
Priority to PCT/CN2015/075959 priority patent/WO2016026305A1/en
Priority to MX2017002222A priority patent/MX2017002222A/en
Publication of CN105357430A publication Critical patent/CN105357430A/en
Application granted granted Critical
Publication of CN105357430B publication Critical patent/CN105357430B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/745Detection of flicker frequency or suppression of flicker wherein the flicker is caused by illumination, e.g. due to fluorescent tube illumination or pulsed LED illumination

Abstract

The invention discloses a kind of anti-flashing processing methods, comprising: determines the brightness value of more than one edge direction of pixel to be processed;According to the brightness value of determining one above edge direction, the adjustment edge direction of the pixel to be processed is determined;According to the brightness value of both ends pixel in the determining adjustment edge direction, the brightness value of the pixel to be processed is adjusted, and display processing is carried out to the pixel to be processed using brightness value adjusted.The present invention also discloses a kind of anti-flashing processing units.

Description

A kind of anti-flashing processing method and processing device
Technical field
The present invention relates to image processing techniques more particularly to a kind of anti-flashing processing method and processing devices.
Background technique
European Digital Video broadcast (DVB, the Digital Video Broadcasting) standard announced and the U.S. are high The DTV of the grade Television Systems committee (ATSC, Advanced Television Systems Committee) (DTV) standard is, it is specified that different interlacing and progressive scan specification.Simulated television and interleaved number for pal mode Word TV will be inevitably present interline flicker;Meanwhile it being connect in cathode-ray tube (CRT, Cathode Ray Tube) grating On receiving unit, since piece image is the image Chang Butai composed by the pixel fixed as some positions, shown by it It is ideal;Triangle as shown in Figure 1, it is clear that its edge-occurrence goes out undesirable zigzag.In Fig. 1, the major part of pixel A Area (being greater than 1/2 area) is except the ideal boundary of triangle, so it is not activated and (lights);And the major part of pixel B Area is activated within the ideal boundary of triangle.During drawing straight line, distance can be selected pixel by pixel The nearest point of ideal line indicates, but since correspondence figure of the straight line in raster plotter is series of identical brightness Pixel group;Therefore, as shown in Fig. 2, its non-horizontal and non-perpendicular straight line drawn will appear zigzag.It is this to use discrete magnitude It indicates to be distorted caused by continuous quantity, is known as losing shape.The aliasing of frequency spectrum is shown as on frequency domain.Eliminate the skill of this phenomenon of losing shape Art is just called Anti-aliasing Technology.
In the case of figure moves in animation, when its boundary line is scanned to pixel center, then the pixel horse back quilt Light and (be otherwise off) so that the original recessed part in ideal boundary protrudes from ideal boundary at once, or on the contrary, this Sample, which allows for graphic limit when moving, the feeling of flashing.
In addition, the electronic noise of television system can cause to change of both display point brightness and position, and luminance channel Random noise can generate a kind of " spiced salt " effect, be especially apparent in flat region.If noise is periodic, and is had Enough intensity can then generate the fish-bone pattern of a superposition on shown image;If believed with horizontally or vertically deflection Number synchronization, then can generate strip pattern.Interactional group of credit union of position noise and point of point generates sizable amplitude and changes, When position noise is random quantity, it will generate " pepper adds salt " effect on the image of display.
For it is above-mentioned lose shape, scintillation, can be solved at present by anti-aliasing and anti-scintillation technique;But this two Kind technology haves the defects that certain;Specifically, Anti-aliasing Technology is computationally intensive, is unfavorable for hardware realization;And anti-flashing skill Although art reduces scintillation, but also obscured final display image simultaneously.
Summary of the invention
To solve existing technical problem, the embodiment of the present invention provides a kind of anti-flashing processing method and processing device.
The present invention provides a kind of anti-flashing processing method, which comprises
Determine the brightness value of more than one edge direction of pixel to be processed;
According to the brightness value of determining one above edge direction, the adjustment edge of the pixel to be processed is determined Direction;
According to the brightness value of both ends pixel in the determining adjustment edge direction, to the bright of the pixel to be processed Angle value is adjusted, and carries out display processing to the pixel to be processed using brightness value adjusted.
In above scheme, the brightness value of more than one edge direction of the determination pixel to be processed, comprising:
More than one edge direction of the pixel to be processed is determined according to the matrix-block;
Brightness value and the picture to be processed according to both ends pixel in the edge direction each in the matrix-block The brightness value of vegetarian refreshments determines the brightness value of each edge direction.
In above scheme, the brightness value according to determining one above edge direction is determined described to be processed The adjustment edge direction of pixel, are as follows:
Using the smallest edge direction of brightness value in the brightness value of one above edge direction as the picture to be processed The adjustment edge direction of element.
In above scheme, the brightness value according to both ends pixel in the determining adjustment edge direction, to described The brightness value of pixel to be processed is adjusted, comprising:
Determine the average value of the brightness value of both ends pixel in the adjustment edge direction;
According to the average value and the brightness value of the pixel to be processed, adjusting parameter is determined;
According to adjusting parameter, the brightness value of the pixel to be processed is adjusted.
It is described according to the average value and the brightness value of the pixel to be processed in above scheme, determine adjusting parameter, Are as follows:
The brightness value of the pixel to be processed is subtracted into the average value, obtains the first value;
First value is sought into absolute value, obtains second value;
By adjusting parameter corresponding to the numberical range being arranged where the second value, as determining adjusting parameter.
In above scheme, the adjusting parameter of the determination includes: the first adjustment parameter and second adjustment parameter;The basis Adjusting parameter is adjusted the brightness value of the pixel to be processed, are as follows:
By the first adjustment parameter multiplied by the brightness value of the pixel to be processed, third value is obtained;
By the second adjustment parameter multiplied by the average value, the 4th value is obtained;
The third value is added with the 4th value, obtains the 5th value;
The first adjustment parameter is added with the second adjustment parameter, obtains the 6th value;
By the 5th value divided by the 6th value, the pixel to be processed brightness value adjusted is obtained.
In above scheme, the parameter of the determination includes: third adjusting parameter, the 4th adjusting parameter and the 5th adjustment ginseng Number;It is described that the brightness value of the pixel to be processed is adjusted according to adjusting parameter, are as follows:
By the third adjusting parameter multiplied by the brightness of a pixel in both ends pixel in the adjustment edge direction Value, obtains the 7th value;
By the 4th adjusting parameter multiplied by the brightness value of the pixel to be processed, the 8th value is obtained;
By the 5th adjusting parameter multiplied by the adjustment edge direction in the pixel of both ends one other pixel point it is bright Angle value obtains the 9th value;
7th value, the 8th value and the 9th value are added, the tenth value is obtained;
The third adjusting parameter, the 4th adjusting parameter and the 5th adjusting parameter are added, obtain the 11st Value;
Tenth value is obtained into the pixel to be processed brightness value adjusted divided by the 11st value.
The present invention provides a kind of anti-flashing processing unit, described device include: the first determination unit, the second determination unit, Adjustment unit and display processing unit;Wherein,
First determination unit, the brightness value of more than one edge direction for determining pixel to be processed;
Second determination unit, for the brightness value according to determining one above edge direction, determine described in The adjustment edge direction of pixel to be processed;
The adjustment unit, for the brightness value according to both ends pixel in the determining adjustment edge direction, to institute The brightness value for stating pixel to be processed is adjusted;
The display processing unit, for carrying out display processing to the pixel to be processed using brightness value adjusted.
In above scheme, first determination unit includes: that the first determining module, the second determining module and third determine mould Block;Wherein,
First determining module, for determining the matrix-block where the pixel to be processed;
Second determining module, for determining more than one edge of the pixel to be processed according to the matrix-block Direction;
The third determining module, for according in the edge direction each in the matrix-block both ends pixel it is bright The brightness value of angle value and the pixel to be processed determines the brightness value of each edge direction.
In above scheme, second determination unit is specifically used for: will be in the brightness value of one above edge direction Adjustment edge direction of the smallest edge direction of brightness value as the pixel to be processed.
In above scheme, the adjustment unit includes: the 4th determining module, the 5th determining module and adjustment module;Its In,
4th determining module, for determining that the brightness value of both ends pixel in the adjustment edge direction is averaged Value;
5th determining module is determined and is adjusted for the brightness value according to the average value and the pixel to be processed Whole parameter;
The adjustment module, for being adjusted to the brightness value of the pixel to be processed according to adjusting parameter.
Anti- flashing processing method and processing device provided in an embodiment of the present invention, determines more than one edge of pixel to be processed The brightness value in direction;According to the brightness value of determining one above edge direction, the tune of the pixel to be processed is determined Whole edge direction;According to the brightness value of both ends pixel in the determining adjustment edge direction, to the pixel to be processed Brightness value be adjusted, and display processing is carried out to the pixel to be processed using brightness value adjusted, is that one kind is based on The anti-flashing processing scheme of edge detection, in this way, the accuracy of anti-flashing processing can be effectively improved.
In addition, scheme is simple, it is convenient for hardware realization.
Detailed description of the invention
In attached drawing (it is not necessarily drawn to scale), similar appended drawing reference can describe phase in different views As component.Similar reference numerals with different letter suffix can indicate the different examples of similar component.Attached drawing with example and Unrestricted mode generally shows each embodiment discussed herein.
Fig. 1 is the triangular image that grating is shown;
Fig. 2 is Fig. 1 intermediate cam shape straightway that grating is shown;
Fig. 3 is the method flow schematic diagram of primary antibody of embodiment of the present invention flashing processing;
Fig. 4 is the anti-flashing edge detection schematic diagram of the embodiment of the present invention;
Fig. 5 is that secondary antibody of the embodiment of the present invention flashes processing device structure diagram;
Fig. 6 a-6e is data flow diagram of three video data of the embodiment of the present invention in hardware;
Fig. 7 is the hardware structural diagram of the anti-flashing processing unit of the embodiment of the present invention four.
Specific embodiment
The present invention is described in further detail again with reference to the accompanying drawings and embodiments.
Currently, the realization of Anti-aliasing Technology are as follows: using pixel as a finite region, adjust pixel to arda sampling Brightness reduces crenellated phenomena with fairing boundary.It is high using the accuracy of the anti-aliasing algorithm, but due to computationally intensive, so It is not easy to hardware realization.The application scenarios of Anti-aliasing Technology specifically include that application in Chinese character or vector graphics, map go out at present Application in version symbol, the application in visual instrument.And general anti-scintillation technique is used, such as parity rows are weighted and averaged Method while reducing scintillation, has also obscured final display image due to not fully considering the marginal information of image.
Based on this, in various embodiments of the present invention: determining the bright of more than one edge direction of pixel to be processed Angle value;According to the brightness value of determining one above edge direction, the adjustment edge side of the pixel to be processed is determined To;According to the brightness value of both ends pixel in the determining adjustment edge direction, to the brightness value of the pixel to be processed It is adjusted, and display processing is carried out to the pixel to be processed using brightness value adjusted.
Embodiment one
The method of the anti-flashing processing of the present embodiment, as shown in Figure 3, comprising the following steps:
Step 301: determining the brightness value of more than one edge direction of pixel to be processed;
Specifically, it is determined that the matrix-block where the pixel to be processed;
More than one edge direction of the pixel to be processed is determined according to the matrix-block;
Brightness value and the picture to be processed according to both ends pixel in the edge direction each in the matrix-block The brightness value of vegetarian refreshments determines the brightness value of each edge direction.
Wherein, the matrix, which can according to need, is determined, such as: it can be 3 × 3 matrix-block, or 4 × 4 matrix-block etc.;Pixel in matrix-block is more, can more determine the adjustment edge of the pixel to be processed more accurately Direction, but the requirement in processing to hardware is higher, the memory of occupancy is more, so in practical application, can be comprehensive The memory for considering accuracy and occupancy is closed, so that it is determined that the matrix-block.
For example for, as shown in figure 4, the matrix-block that the matrix-block is 3 × 3, A1, A2, A3 indicate 3 × 3 square Battle array block in lastrow three pixels, B1, B2, B3 indicate 3 × 3 matrix-block in current line three pixels, C1, C2, Three pixels of next line, B2 are pixel to be processed in the matrix-block of C3 expression 3 × 3, then the edge direction of B2 is respectively as follows: The connecting line of A1 and C3 is formed by first edge direction, and the connecting line of A2 and C2 are formed by second edge direction, A3 and C1 Connecting line be formed by third edge direction, then the brightness value of three edge directions is respectively as follows:
Edge_1=abs (a1+c3-2*b2);
Edge_2=abs (a2+c2-2*b2);
Edge_3=abs (a3+c1-2*b2).
Wherein, edge_1 indicates that the brightness value in first edge direction, edge_2 indicate the brightness value in second edge direction, Edge_3 indicates the brightness value of third edge direction, and abs expression takes absolute value, and a1 indicates that the brightness value of pixel A1, a2 indicate The brightness value of pixel A2, a3 indicate that the brightness value of pixel A3, c1 indicate that the brightness value of pixel C1, c2 indicate pixel C2 Brightness value, c3 indicate pixel C3 brightness value, b2 indicate pixel B2 brightness value.
Step 302: according to the brightness value of determining one above edge direction, determining the pixel to be processed Adjust edge direction;
Specifically, using the smallest edge direction of brightness value in the brightness value of one above edge direction as it is described to Handle the adjustment edge direction of pixel.
Here, the smallest edge direction of brightness value is the picture to be processed in the brightness value of one above edge direction The current immediate edge direction of vegetarian refreshments, so by the smallest edge of brightness value in the brightness value of one above edge direction Adjustment edge direction of the direction as the pixel to be processed.
Step 303: according to the brightness value of both ends pixel in the determining adjustment edge direction, to the picture to be processed The brightness value of vegetarian refreshments is adjusted, and carries out display processing to the pixel to be processed using brightness value adjusted.
Here, the brightness value according to both ends pixel in the determining adjustment edge direction, to described to be processed The brightness value of pixel is adjusted, and is specifically included:
Determine the average value of the brightness value of both ends pixel in the adjustment edge direction;
According to the average value and the brightness value of the pixel to be processed, adjusting parameter is determined;
According to adjusting parameter, the brightness value of the pixel to be processed is adjusted.
Wherein, described according to the average value and the brightness value of the pixel to be processed, determine adjusting parameter, specifically Are as follows:
The brightness value of the pixel to be processed is subtracted into the average value, obtains the first value;
First value is sought into absolute value, obtains second value;
By adjusting parameter corresponding to the numberical range being arranged where the second value, as determining adjusting parameter.
Here, the numberical range of the setting and the corresponding adjusting parameter of each numberical range can be rule of thumb arranged.
When practical application, the number of determining adjusting parameter can be two or more.
The adjusting parameter of the determination includes: the first adjustment parameter and second adjustment parameter;It is described according to adjusting parameter, it is right The brightness value of the pixel to be processed is adjusted, specifically:
By the first adjustment parameter multiplied by the brightness value of the pixel to be processed, third value is obtained;
By the second adjustment parameter multiplied by the average value, the 4th value is obtained;
The third value is added with the 4th value, obtains the 5th value;
The first adjustment parameter is added with the second adjustment parameter, obtains the 6th value;
By the 5th value divided by the 6th value, the pixel to be processed brightness value adjusted is obtained.
For above-mentioned example, it is assumed that the brightness value in first edge direction is minimum, so the first edge direction is made For the adjustment edge direction for the pixel B2 to be processed.
It averages to the brightness value of both ends pixel A1, C3 on the first edge direction, obtains adjust=(a1+ c3)/2;
The absolute difference between b2 and the average value is calculated, threshold=abs (b2-adjust) is obtained, according to exhausted To the numberical range of the setting where value difference, corresponding adjusting parameter para_1 and para_2 is selected;
Then by the adjusting parameter para_1 and para_2 of selection, following adjustment expression formula is substituted into, then is obtained described wait locate Manage pixel B2 brightness value adjusted:
B2_new=(para_1*b2+para_2*adjust)/(para_1+para_2).
Here, when practical application, if selection adaptive model, just according to numberical range locating for threshold to most The adjusting parameter para_1 and para_2 in adjustment expression formula are selected eventually;If selecting manual configuration mode, just artificially The value of given adjusting parameter para_1 and para_2;If selecting preset parameter mode, fixed adjusting parameter para_ is selected The value of 1 and para_2, to carry out final solution.
The parameter of the determination includes: third adjusting parameter, the 4th adjusting parameter and the 5th adjusting parameter;It is described according to tune Whole parameter is adjusted the brightness value of the pixel to be processed, specifically:
By the third adjusting parameter multiplied by the brightness of a pixel in both ends pixel in the adjustment edge direction Value, obtains the 7th value;
By the 4th adjusting parameter multiplied by the brightness value of the pixel to be processed, the 8th value is obtained;
By the 5th adjusting parameter multiplied by the adjustment edge direction in the pixel of both ends one other pixel point it is bright Angle value obtains the 9th value;
7th value, the 8th value and the 9th value are added, the tenth value is obtained;
The third adjusting parameter, the 4th adjusting parameter and the 5th adjusting parameter are added, obtain the 11st Value;
By the tenth value divided by the 11st value, the pixel to be processed brightness value adjusted is obtained.
For above-mentioned example, it is assumed that the brightness value in first edge direction is minimum, so the first edge direction is made For the adjustment edge direction for the pixel B2 to be processed, by adjusting parameter para_1, para_2 and para_3 of selection, generation Enter following adjustment expression formula, then obtain the pixel B2 brightness value adjusted to be processed:
B2_new=(para_1*a1+para_2*b2+para_3*c3)/(para_1+para_2+para_3).
Here, when practical application, the numerical value selection of adjusting parameter has three ways, such as follows:
Preset parameter mode: the system configuration mode of default, para_1=1, para_2=2, para_3=1 are directlyed adopt Global treatment is carried out to image;
Manual configuration mode: according to actual needs, the numerical value of three adjusting parameters is artificially set;
Adaptive adjustment mode: according to the minimum edge brightness value edge_min (being assumed to be edge_1) acquired with it is preset Threshold value threshold_0, threshold_1, threshold_2, threshold_3 fall in different threshold intervals to it, choosing Select corresponding configuration parameter.Specifically, when edge_min be in [0, threshold_0) range, select the 1st group of configuration coefficients; When edge_min be in [threshold_0, threshold_1) range, select the 2nd group of configuration coefficients;When edge_min is in [threshold_1, threshold_2) range, select the 3rd group of configuration coefficients;When edge_min be in [threshold_2, Threshold_3): the 4th group of configuration coefficients of selection.
Here, each group configuration coefficients are rule of thumb configured.
When carrying out display processing to the pixel to be processed using brightness value adjusted, it is desirable that the data of output must accord with The bit wide requirement for closing corresponding video data format, is implemented as those skilled in the art's conventional techniques, repeats no more.
When practical application, if the format of video data is YUV, in the edge direction for determining pixel B2 to be processed and absolutely When to difference threshold, calculated only for Y-component;Correspondingly, anti-flashing logic is also handled just for Y-component, Without handling UV component.If video counts are RGB888 according to format, in the edge side for determining pixel B2 to be processed When to absolute difference threshold, need to consider that the comprehensive function of tri- components of R, G, B (is by three component phases in practice Add summation), anti-flashing logic processes tri- components of R, G, B.Specifically, it is determined that three edges of pixel B2 to be processed When the brightness value in direction, a1, a2, a3, b2 in formula respectively indicate the sum of the brightness value of tri- components of R, G, B;It takes later bright Adjustment edge direction of the smallest edge direction of angle value (being assumed to be first edge direction) as the pixel B2 to be processed;So It averages, obtains to the brightness value of tri- components of R, G, B of both ends pixel A1, C3 on the first edge direction afterwards:
Ajust_r=(A1_R+C3_R)/2;
Ajust_g=(A1_G+C3_G)/2;
Ajust_b=(A1_B+C3_B)/2;
According to three adjusted values, corresponding adjusting parameter para_1 and para_2 is selected;
Finally, by then by the adjusting parameter para_1 and para_2 of selection, substituting into following adjustment expression formula, then obtaining institute State pixel B2 brightness value adjusted to be processed:
B2_r_new=(para_1*b2_r+para_2*adjust_r)/(para_1+para_2);
B2_g_new=(para_1*b2_g+para_2*adjust_g)/(para_1+para_2);
B2_b_new=(para_1*b2_b+para_2*adjust_b)/(para_1+para_2).
Anti- flashing processing method provided in an embodiment of the present invention, determines more than one edge direction of pixel to be processed Brightness value;According to the brightness value of determining one above edge direction, the adjustment edge of the pixel to be processed is determined Direction;Brightness according to the brightness value of both ends pixel in the determining adjustment edge direction, to the pixel to be processed Value is adjusted, and carries out display processing to the pixel to be processed using brightness value adjusted, is a kind of based on edge inspection The anti-flashing processing method surveyed, in this way, the accuracy of anti-flashing processing can be effectively improved.Moreover, scheme is simple, it is convenient for hardware It realizes.
Embodiment two
Method to realize embodiment one, the present embodiment provides a kind of anti-flashing processing units, as shown in figure 5, the device It include: the first determination unit 51, the second determination unit 52, adjustment unit 53 and display processing unit 54;Wherein,
First determination unit 51, the brightness value of more than one edge direction for determining pixel to be processed;
Second determination unit 52 determines institute for the brightness value according to determining one above edge direction State the adjustment edge direction of pixel to be processed;
The adjustment unit 53, it is right for the brightness value according to both ends pixel in the determining adjustment edge direction The brightness value of the pixel to be processed is adjusted;
The display processing unit 54, for being carried out at display using brightness value adjusted to the pixel to be processed Reason.
Wherein, first determination unit 51 may include: that the first determining module, the second determining module and third determine mould Block;Wherein,
First determining module, for determining the matrix-block where the pixel to be processed;
Second determining module, for determining more than one edge of the pixel to be processed according to the matrix-block Direction;
The third determining module, for according in the edge direction each in the matrix-block both ends pixel it is bright The brightness value of angle value and the pixel to be processed determines the brightness value of each edge direction.
Here, the matrix, which can according to need, is determined, such as: it can be 3 × 3 matrix-block, or 4 × 4 matrix-block etc.;Pixel in matrix-block is more, can more determine the adjustment edge of the pixel to be processed more accurately Direction, but the requirement in processing to hardware is higher, the memory of occupancy is more, so in practical application, can be comprehensive The memory for considering accuracy and occupancy is closed, so that it is determined that the matrix-block.
For example for, as shown in figure 4, the matrix-block that the matrix-block is 3 × 3, A1, A2, A3 indicate 3 × 3 square Battle array block in lastrow three pixels, B1, B2, B3 indicate 3 × 3 matrix-block in current line three pixels, C1, C2, Three pixels of next line, B2 are pixel to be processed in the matrix-block of C3 expression 3 × 3, then the edge direction of B2 is respectively as follows: The connecting line of A1 and C3 is formed by first edge direction, and the connecting line of A2 and C2 are formed by second edge direction, A3 and C1 Connecting line be formed by third edge direction, then the brightness value of three edge directions is respectively as follows:
Edge_1=abs (a1+c3-2*b2);
Edge_2=abs (a2+c2-2*b2);
Edge_3=abs (a3+c1-2*b2).
Wherein, edge_1 indicates that the brightness value in first edge direction, edge_2 indicate the brightness value in second edge direction, Edge_3 indicates the brightness value of third edge direction, and abs expression takes absolute value, and a1 indicates that the brightness value of pixel A1, a2 indicate The brightness value of pixel A2, a3 indicate that the brightness value of pixel A3, c1 indicate that the brightness value of pixel C1, c2 indicate pixel C2 Brightness value, c3 indicate pixel C3 brightness value, b2 indicate pixel B2 brightness value.
Second determination unit 52 is specifically used for: brightness value in the brightness value of one above edge direction is minimum Adjustment edge direction of the edge direction as the pixel to be processed.
Here, the smallest edge direction of brightness value is the picture to be processed in the brightness value of one above edge direction The current immediate edge direction of vegetarian refreshments, so by the smallest edge of brightness value in the brightness value of one above edge direction Adjustment edge direction of the direction as the pixel to be processed.
The adjustment unit 53 may include: the 4th determining module, the 5th determining module and adjustment module;Wherein,
4th determining module, for determining that the brightness value of both ends pixel in the adjustment edge direction is averaged Value;
5th determining module is determined and is adjusted for the brightness value according to the average value and the pixel to be processed Whole parameter;
The adjustment module, for being adjusted to the brightness value of the pixel to be processed according to adjusting parameter.
Wherein, the 5th determining module, it is described average specifically for subtracting the brightness value of the pixel to be processed Value, obtains the first value;
First value is sought into absolute value, obtains second value;
By adjusting parameter corresponding to the numberical range being arranged where the second value, as determining adjusting parameter.
Here, the numberical range of the setting and the corresponding adjusting parameter of each numberical range can be rule of thumb arranged.
When practical application, the number of determining adjusting parameter can be two or more.
The adjusting parameter of the determination includes: the first adjustment parameter and second adjustment parameter;The adjustment module is specifically used In: by the first adjustment parameter multiplied by the brightness value of the pixel to be processed, obtain third value;The second adjustment is joined Number obtains the 4th value multiplied by the average value;The third value is added with the 4th value, obtains the 5th value;By described One adjusting parameter is added with the second adjustment parameter, obtains the 6th value;And the 5th value is obtained divided by the 6th value The pixel to be processed brightness value adjusted.
For above-mentioned example, it is assumed that the brightness value in first edge direction is minimum, so the first edge direction is made For the adjustment edge direction for the pixel B2 to be processed.
4th determining module averages to the brightness value of both ends pixel A1, C3 on the first edge direction, Obtain adjust=(a1+c3)/2;
5th determining module calculates the absolute difference between b2 and the average value, obtains threshold=abs (b2-adjust), according to the numberical range of the setting where absolute difference, corresponding adjusting parameter para_1 and para_ is selected 2;
Then the adjustment module by the adjusting parameter para_1 and para_2 of selection, substitutes into following adjustment expression formula, then Obtain the pixel B2 brightness value adjusted to be processed:
B2_new=(para_1*b2+para_2*adjust)/(para_1+para_2).
Here, when practical application, if selection adaptive model, just by the 5th determining module according to threshold Locating numberical range selects the adjusting parameter para_1 and para_2 in final adjustment expression formula;If selection is manual Configuration mode just artificially gives the value of adjusting parameter para_1 and para_2, if selection preset parameter mode, selection are solid The value of fixed adjusting parameter para_1 and para_2, to carry out final solution.
The parameter of the determination includes: third adjusting parameter, the 4th adjusting parameter and the 5th adjusting parameter;The adjustment mould Block is specifically used for:
By the third adjusting parameter multiplied by the brightness of a pixel in both ends pixel in the adjustment edge direction Value, obtains the 7th value;
By the 4th adjusting parameter multiplied by the brightness value of the pixel to be processed, the 8th value is obtained;
By the 5th adjusting parameter multiplied by the adjustment edge direction in the pixel of both ends one other pixel point it is bright Angle value obtains the 9th value;
7th value, the 8th value and the 9th value are added, the tenth value is obtained;
The third adjusting parameter, the 4th adjusting parameter and the 5th adjusting parameter are added, obtain the 11st Value;
By the tenth value divided by the 11st value, the pixel to be processed brightness value adjusted is obtained.
For above-mentioned example, it is assumed that the brightness value in first edge direction is minimum, so the first edge direction is made For the adjustment edge direction for the pixel B2 to be processed, by adjusting parameter para_1, para_2 and para_3 of selection, generation Enter following adjustment expression formula, then obtain the pixel B2 brightness value adjusted to be processed:
B2_new=(para_1*a1+para_2*b2+para_3*c3)/(para_1+para_2+para_3).
Here, when practical application, the numerical value selection of adjusting parameter has three ways, such as follows:
Preset parameter mode: the system configuration mode of default, para_1=1, para_2=2, para_3=1 are directlyed adopt Global treatment is carried out to image;
Manual configuration mode: according to actual needs, the numerical value of three adjusting parameters is artificially set;
Adaptive adjustment mode: according to the minimum edge brightness value edge_min (being assumed to be edge_1) acquired with it is preset Threshold value threshold_0, threshold_1, threshold_2, threshold_3 fall in different threshold intervals to it, choosing Select corresponding configuration parameter.Specifically, when edge_min be in [0, threshold_0) range, select the 1st group of configuration coefficients; When edge_min be in [threshold_0, threshold_1) range, select the 2nd group of configuration coefficients;When edge_min is in [threshold_1, threshold_2) range, select the 3rd group of configuration coefficients;When edge_min be in [threshold_2, Threshold_3): the 4th group of configuration coefficients of selection.
Here, each group configuration coefficients are rule of thumb configured.
When the display processing unit 54 carries out display processing to the pixel to be processed using brightness value adjusted, It asks the data of output to have to comply with the bit wide requirement of corresponding video data format, is implemented as the usual skill of those skilled in the art Art means, repeat no more.
When practical application, if the format of video data is YUV, in the edge direction for determining pixel B2 to be processed and absolutely When to difference threshold, calculated only for Y-component;Correspondingly, anti-flashing logic is also handled just for Y-component, Without handling UV component.If video counts are RGB888 according to format, in the edge side for determining pixel B2 to be processed When to absolute difference threshold, need to consider that the comprehensive function of tri- components of R, G, B (is by three component phases in practice Add summation), anti-flashing logic processes tri- components of R, G, B.Specifically, it is determined that three edges of pixel B2 to be processed When the brightness value in direction, a1, a2, a3, b2 in formula respectively indicate the sum of the brightness value of tri- components of R, G, B;It takes later bright Adjustment edge direction of the smallest edge direction of angle value (being assumed to be first edge direction) as the pixel B2 to be processed;So It averages, obtains to the brightness value of tri- components of R, G, B of both ends pixel A1, C3 on the first edge direction afterwards:
Ajust_r=(A1_R+C3_R)/2;
Ajust_g=(A1_G+C3_G)/2;
Ajust_b=(A1_B+C3_B)/2;
According to three adjusted values, corresponding adjusting parameter para_1 and para_2 is selected;
Finally, by then by the adjusting parameter para_1 and para_2 of selection, substituting into following adjustment expression formula, then obtaining institute State pixel B2 brightness value adjusted to be processed:
B2_r_new=(para_1*b2_r+para_2*adjust_r)/(para_1+para_2);
B2_g_new=(para_1*b2_g+para_2*adjust_g)/(para_1+para_2);
B2_b_new=(para_1*b2_b+para_2*adjust_b)/(para_1+para_2).
When practical application, first determination unit 51, second determination unit 52, the adjustment unit 53 can be by resisting Flash display device in central processing unit (CPU, Central Processing Unit), digital signal processor (DSP, Digital Signal Processor) or programmable logic array (FPGA, Field-Programmable Gate Array it) realizes, the display processing unit 54 can be real by CPU, DSP or FPGA combination display in anti-flashing display device It is existing.
Anti- flashing processing unit provided in an embodiment of the present invention, first determination unit 51 determine pixel to be processed The brightness value of more than one edge direction;Second determination unit 52 is bright according to determining one above edge direction Angle value determines the adjustment edge direction of the pixel to be processed;The adjustment unit 53 is according to the determining adjustment edge The brightness value of both ends pixel on direction is adjusted the brightness value of the pixel to be processed, the display processing unit 54 carry out display processing to the pixel to be processed using brightness values adjusted, are at a kind of anti-flashing based on edge detection Reason scheme, in this way, the accuracy of anti-flashing processing can be effectively improved.Moreover, scheme is simple, it is convenient for hardware realization.
Embodiment three
The application scenarios of the present embodiment are as follows: the format of video data to be processed is YUV, mainly describes video data to be processed Y-component anti-flashing show process flow in hardware specific implementation process;The video counts that video data to be processed is 4 × 4 According to.Fig. 6 is data flow diagram of the video data of Y-component in hardware, in conjunction with Fig. 6, the place of the anti-flashing processing of the present embodiment Managing process includes:
Step 1: the first row data in 4 × 4 original video data to be processed are input to by anti-flashing processing unit In the first row caching ram_line_1 of row caching, as shown in Figure 6 a;
Step 2: it inputs and completes to the first row data, and first pixel Y-component of the second row data is input to capable caching The second row caching ram_line_2 in after, along with the input of subsequent video data, the first row is cached in ram_line_1 The first row data of storage export, as shown in Figure 6 b;
Here, the video data of output delays certain period than the video data of input, such as: delay row resolution ratio Hor adds the period of 1 pixel, that is, delays hor+1 period.
Step 3: inputting to the second row data and complete, and first pixel Y-component of the third line is input to the third of row caching After in row caching ram_line_3, from the first row caching ram_line_2, the second row caching ram_line_2 and the third line caching The matrix-block of output 3 × 3 carries out anti-flashing logical operation described in the embodiment of the present invention one in ram_line_3, then will calculate As a result it exports, as fig. 6 c;
Step 4: after the completion of the input of the third line data, the data of fourth line are input to the first row caching ram_line_ In 1, the calculating process similar to step 3 is carried out, then calculated result is exported, as shown in fig 6d;
Step 5: anti-flashing processing unit detects the input that last line data are completed, at this time from last line The data of last line are read in row caching, as shown in fig 6e.
It should be understood that the data of UV component are not processed under yuv format, row caching is needed remain for store phase The data answered, it is defeated by being synchronized together with the data of UV component corresponding with Y-component data after the data of Y-component calculate completion Out.
Example IV
On the basis of embodiment three, the hardware block diagram of the anti-flashing processing unit of the present embodiment is as shown in fig. 7, the device can To realize module (anti_flicker) by top-level module (anti_flicker_top), anti-flashing logic, be register configuration Module (apb_slave) and configuration four part synchronization module (clk_sync) composition.Wherein, clk_sync is mainly responsible for Clock between anti_flicker and apb_slave module is synchronous;Anti_flicker is cached by data input cell, row (ram) unit, reading ram unit, anti-flashing logic unit and five part of output unit composition.
The processing of software section the following steps are included:
Step 1: register is configured;
Specifically, the resolution ratio (resolution) of video resolution register, video format register are configured first The mode of format (format) (including YUV444, YUV422, YUV420 and RGB888) and anti-flash pattern register (mode_type);Here, the anti-flashing processing unit of the present embodiment supports following Three models: 1. preset parameter modes;2. manually Configuration mode;3. adaptive model;4. direct mode operation;When selecting preset parameter mode, parameter register para_ is needed to configure 1 and para_2.Enabled (enable) register is finally configured, enable register is set to high level, that is, is opened at anti-flashing Manage device.Here, the direct mode operation, which refers to, does not make anti-flashing processing to video data, directly exports.
Step 2: carrying out data processing according to the selected mode;
Specifically, under yuv format: the channel data_1_in inputs Y-component data, and the channel data_2_in inputs U component Data, the channel data_3_in input V component data;The channel data_1_out exports Y-component data, and the channel data_2_out is defeated U component data out, the channel data_3_out export V component data.
Under RGB888 format: the channel data_1_in inputs R component data, and the channel data_2_in inputs G component data, The channel data_3_in inputs B component data;The channel data_1_out exports R component data, and the channel data_2_out exports G points Data are measured, the channel data_3_out exports B component data.
Step 3: after frame data processing is completed, the interrupt register of anti-flashing processing unit can issue interrupt signal int.If anti-flashing processing unit needs for interrupt register to be set to high level there is still a need for processing data, removes and interrupt letter Number int, then reconfigures corresponding register, carries out the processing of next frame data.If believed when no data processing by interrupting Number int closes anti-flashing processing unit (being low level by enable register configuration) after removing.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, the shape of hardware embodiment, software implementation or embodiment combining software and hardware aspects can be used in the present invention Formula.Moreover, the present invention, which can be used, can use storage in the computer that one or more wherein includes computer usable program code The form for the computer program product implemented on medium (including but not limited to magnetic disk storage and optical memory etc.).
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.

Claims (2)

1. a kind of anti-flashing processing method, which is characterized in that the described method includes:
Determine the brightness value of more than one edge direction of pixel to be processed;
The brightness value of more than one edge direction of the determination pixel to be processed, comprising:
Matrix-block where the pixel to be processed determines more than one edge direction of the pixel to be processed;According to According to the brightness of the brightness value and the pixel to be processed of both ends pixel in the edge direction each in the matrix-block Value, determines the brightness value of each edge direction;
According to the brightness value of determining one above edge direction, the adjustment edge side of the pixel to be processed is determined To;
The brightness value according to determining one above edge direction, determines the adjustment edge side of pixel to be processed To, comprising: using the smallest edge direction of brightness value in the brightness value of one above edge direction as the picture to be processed The adjustment edge direction of element;
According to the brightness value of both ends pixel in the determining adjustment edge direction, to the brightness value of the pixel to be processed It is adjusted, and display processing is carried out to the pixel to be processed using brightness value adjusted;
Wherein, the brightness value according to both ends pixel in the determining adjustment edge direction, to the pixel to be processed The brightness value of point is adjusted, comprising:
The average value adjust of both ends pixel is determined according to adjust=(a+c)/2, wherein a, c are both ends in edge direction The brightness value of point;
Second value threshold is determined according to threshold=abs (b-adjust), wherein b is the bright of pixel to be processed Angle value, abs () are ABS function;
By adjusting parameter corresponding to the numberical range being arranged where the second value, as determining adjusting parameter;
If it is determined that adjusting parameter include the first adjustment parameter para_1 and second adjustment parameter para_2, according to b_new= (para_1*b+para_2*adjust)/(para_1+para_2) determines brightness value b_new adjusted;
Alternatively,
If it is determined that adjusting parameter include third adjusting parameter para_3, the 4th adjusting parameter para_4 and the 5th adjusting parameter Para_5 determines brightness value b_new adjusted according to the following formula:
B_new=(para_3*a+para_4*b+para_5*c)/(para_3+para_4+para_5).
2. a kind of anti-flashing processing unit, which is characterized in that described device includes: the first determination unit, the second determination unit, adjusts Whole unit and display processing unit;Wherein,
First determination unit, the brightness value of more than one edge direction for determining pixel to be processed;
First determination unit includes: the first determining module, the second determining module and third determining module;Wherein,
First determining module, for determining the matrix-block where the pixel to be processed;
Second determining module, for determining more than one edge side of the pixel to be processed according to the matrix-block To;
The third determining module, for the brightness value according to both ends pixel in the edge direction each in the matrix-block And the brightness value of the pixel to be processed, determine the brightness value of each edge direction;
Second determination unit determines described wait locate for the brightness value according to determining one above edge direction Manage the adjustment edge direction of pixel;
Second determination unit is also used to: by the smallest edge side of brightness value in the brightness value of one above edge direction To the adjustment edge direction as the pixel to be processed;
The adjustment unit, for the brightness value according to both ends pixel in the determining adjustment edge direction, to it is described to The brightness value of processing pixel is adjusted;
The display processing unit, for carrying out display processing to the pixel to be processed using brightness value adjusted;
The adjustment unit includes: the 4th determining module, the 5th determining module and adjustment module;Wherein,
4th determining module, for determining the average value of the brightness value of both ends pixel in the adjustment edge direction, In, the average value of the brightness value of both ends pixel in the determination adjustment edge direction, comprising:
The average value adjust of both ends pixel is determined according to adjust=(a+c)/2, wherein a, c are both ends in edge direction The brightness value of point;
5th determining module determines adjustment ginseng for the brightness value according to the average value and the pixel to be processed Number, wherein it is described according to the average value and the brightness value of the pixel to be processed, determine adjusting parameter, comprising:
Second value threshold is determined according to threshold=abs (b-adjust), wherein b is the bright of pixel to be processed Angle value, abs () are ABS function;
By adjusting parameter corresponding to the numberical range being arranged where the second value, as determining adjusting parameter;
The adjustment module, for being adjusted to the brightness value of the pixel to be processed, wherein institute according to adjusting parameter It states according to adjusting parameter, the brightness value of the pixel to be processed is adjusted, comprising:
If it is determined that adjusting parameter include the first adjustment parameter para_1 and second adjustment parameter para_2, according to b_new= (para_1*b+para_2*adjust)/(para_1+para_2) determines brightness value b_new adjusted;
Alternatively,
If it is determined that adjusting parameter include third adjusting parameter para_3, the 4th adjusting parameter para_4 and the 5th adjusting parameter Para_5 determines brightness value b_new adjusted according to the following formula:
B_new=(para_3*a+para_4*b+para_5*c)/(para_3+para_4+para_5).
CN201410410658.XA 2014-08-19 2014-08-19 A kind of anti-flashing processing method and processing device Active CN105357430B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201410410658.XA CN105357430B (en) 2014-08-19 2014-08-19 A kind of anti-flashing processing method and processing device
PCT/CN2015/075959 WO2016026305A1 (en) 2014-08-19 2015-04-07 Anti-flickering processing method, device and computer storage medium
MX2017002222A MX2017002222A (en) 2014-08-19 2015-04-07 Anti-flickering processing method, device and computer storage medium.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410410658.XA CN105357430B (en) 2014-08-19 2014-08-19 A kind of anti-flashing processing method and processing device

Publications (2)

Publication Number Publication Date
CN105357430A CN105357430A (en) 2016-02-24
CN105357430B true CN105357430B (en) 2019-11-15

Family

ID=55333283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410410658.XA Active CN105357430B (en) 2014-08-19 2014-08-19 A kind of anti-flashing processing method and processing device

Country Status (3)

Country Link
CN (1) CN105357430B (en)
MX (1) MX2017002222A (en)
WO (1) WO2016026305A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108009978B (en) * 2017-11-24 2021-04-20 中国航空工业集团公司西安航空计算技术研究所 Non-blocking parallel triangular rasterization unit structure
CN109842767B (en) * 2019-01-09 2020-07-14 上海芯仑光电科技有限公司 Anti-flash circuit assembly and image sensor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1525402A (en) * 2003-04-18 2004-09-01 北京中星微电子有限公司 A dynamic detecting and compensating method for faulty pixel
CN1620102A (en) * 2003-11-17 2005-05-25 北京中视联数字系统有限公司 Static image anti scintillation treatment method
CN101000758A (en) * 2006-06-29 2007-07-18 华为技术有限公司 Anti-flash display method and device
CN102005051A (en) * 2010-11-23 2011-04-06 华亚微电子(上海)有限公司 Edge detection method and related device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1263313C (en) * 2003-11-10 2006-07-05 华亚微电子(上海)有限公司 System and method for promoting marginal definition of video image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1525402A (en) * 2003-04-18 2004-09-01 北京中星微电子有限公司 A dynamic detecting and compensating method for faulty pixel
CN1620102A (en) * 2003-11-17 2005-05-25 北京中视联数字系统有限公司 Static image anti scintillation treatment method
CN101000758A (en) * 2006-06-29 2007-07-18 华为技术有限公司 Anti-flash display method and device
CN102005051A (en) * 2010-11-23 2011-04-06 华亚微电子(上海)有限公司 Edge detection method and related device

Also Published As

Publication number Publication date
WO2016026305A1 (en) 2016-02-25
CN105357430A (en) 2016-02-24
MX2017002222A (en) 2017-08-15

Similar Documents

Publication Publication Date Title
CN107274476B (en) Shadow map generation method and device
KR101922482B1 (en) Varying effective resolution by screen location by changing active color sample count within multiple render targets
EP3129973B1 (en) Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location
CN102612697B (en) A method and system for detection and enhancement of video images
US6717622B2 (en) System and method for scalable resolution enhancement of a video image
JP4412323B2 (en) Video processing apparatus and video display apparatus
JP6639877B2 (en) Image processing apparatus and method
US7088351B2 (en) Real time image enhancement with adaptive noise reduction and edge detection
JP2003526272A (en) System and method for improving video image sharpness
TWI300310B (en) Two stage interpolation apparatus and method for up-scaling an image on display device
US9565414B2 (en) Efficient stereo to multiview rendering using interleaved rendering
WO2005036468A1 (en) Image processor and method, computer program, and recording medium
JP2011154342A (en) Image processing apparatus and image processing method
CN105357430B (en) A kind of anti-flashing processing method and processing device
WO2014008329A1 (en) System and method to enhance and process a digital image
US6788312B1 (en) Method for improving quality in graphics pipelines through a frame's top and bottom field processing with conditional thresholding and weighting techniques
JP2015179503A (en) Image processing device and image processing method
JP2009290802A (en) Interpolation frame generating apparatus, interpolation frame generating method, and broadcast receiving apparatus
CN106303665A (en) Intelligent television third party's Video Applications window scaling and sound image quality parameter processing method
CN103686029B (en) A kind of video pixel opposite-angle interpolation method for the many optical projection systems of giant-screen
KR20080071377A (en) Rendering apparatus and method
US8212835B1 (en) Systems and methods for smooth transitions to bi-cubic magnification
TW201251461A (en) Image processing device and interpolated frame generation method
US7750974B2 (en) System and method for static region detection in video processing
CN112333401B (en) Method, device, system, medium and equipment for detecting motion subtitle area

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant