CN102118620B - Method for eliminating color dislocation for digital image - Google Patents

Method for eliminating color dislocation for digital image Download PDF

Info

Publication number
CN102118620B
CN102118620B CN200910258900A CN200910258900A CN102118620B CN 102118620 B CN102118620 B CN 102118620B CN 200910258900 A CN200910258900 A CN 200910258900A CN 200910258900 A CN200910258900 A CN 200910258900A CN 102118620 B CN102118620 B CN 102118620B
Authority
CN
China
Prior art keywords
color
pixel
brightness
dislocation
detects
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.)
Expired - Fee Related
Application number
CN200910258900A
Other languages
Chinese (zh)
Other versions
CN102118620A (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.)
Altek Corp
Original Assignee
Altek Corp
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 Altek Corp filed Critical Altek Corp
Priority to CN200910258900A priority Critical patent/CN102118620B/en
Publication of CN102118620A publication Critical patent/CN102118620A/en
Application granted granted Critical
Publication of CN102118620B publication Critical patent/CN102118620B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Of Color Television Signals (AREA)

Abstract

The invention relates to a method for eliminating color dislocation for digital image, wherein specific color detection, luminance detection and gradational color detection are utilized to analyze YCbCr signals of luminance and color separation of the digital images to judge whether the color dislocation occurs at pixels in the digital images, so as to correct the pixels with the color dislocation.

Description

The removing method of the color dislocation of digitized video
Technical field
The invention relates to the removing method of the color dislocation of a kind of image treatment method, particularly a kind of digitized video.
Background technology
Color dislocation (color fringe) is provided with wrong color on some position of image for image system.
On camera, the origin cause of formation of color dislocation mainly contains three: the dizzy of (aberration), transducer that differ of lens (lens) looses (blooming) and interior algorithm (the color filter arrayinterpolation of inserting of chromatic image; CFAI).
Because glass is different to the extent of refraction of the light of different wave length, so the image that lens (non-planar mirror) form has the color dislocation.Because differing of lens causes different colours accurately to calibrate, thereby causes the edge blurry of object unclear.
Transducer is the core component of digital camera.In digital camera, the function of transducer is that the signal of telecommunication is caught and converted into to the light that sees through camera lens.When light when camera lens converges on the transducer, the photoelectricity diode (photodiode) of transducer induces the electric charge of varying number and temporary by memory because of the difference of experiencing light intensity.After memory is temporary, read circuit by charge transfer circuit and charge information again and call over charge information, and be sent to A/D converter by clock pulse, form and the proportional binary digit of luminous intensity (being the signal of telecommunication) with conversion.And, the data of the promptly corresponding pixel of this binary digit.Yet each photoelectricity diode only can be accumulated certain quantity of electric charge between exposure period.At high-brightness region, on a pixel, when the amount of charge that produces too much and when reaching capacity, too much electric charge can overflow to contiguous pixel so that the data of neighborhood pixels makes a mistake, this phenomenon promptly is referred to as dizzy loosing.
When a pixel generation color dislocation, when carrying out CFAI, then can produce wrong pixel value, to cause neighborhood pixels thereby the color dislocation takes place according to the color of mistake.
On known technology, be mostly to detect, to find out the pixel that the color dislocation takes place with three primary colors (R/G/B) signal.Yet the color dislocation usually occurs in bright zone.Therefore, the method can cause the pixel of part generation color dislocation undiscovered, and then is not adapted to.
Moreover on known technology, modification method adopts colourity (Cb and Cr) to constrain method or redness (R) signal and blueness (B) signal is oppressive toward green (G) signal.These a little methods all can cause revised image ash partially.
Correlation technique can be with reference to patent application publication number the 2007/0153341st and No. 2007/0097267.
Summary of the invention
In view of above problem, the present invention provides a kind of removing method of color dislocation of digitized video, to solve the existing at least one problem of known technology.
The removing method of the color dislocation of the disclosed digitized video of the present invention comprises: obtain a digitized video; Utilize specific color detection, brightness detection and the brightness of color each pixel of check and analysis of gradual layer color and the signal of chrominance separation; Judging whether each pixel the color dislocation takes place in digitized video, and with specific color detect, brightness detection and the color result who detects of gradual layer color be judged to be the pixel that the color dislocation does not take place and be set at normal pixel; The color result who detects of specific color detection, brightness detection and gradual layer color all is judged to be the pixel that the color dislocation takes place is set at the color staggered pixels; And correction color staggered pixels.
Wherein, specific color detects and to comprise: the chromatic value of the brightness of the pixel of not setting according to the chromaticity range analysis of multiple color and the signal of chrominance separation; The interior pixel of chromaticity range that the judgement chromatic value drops on these a little colors misplaces for color takes place; And judge that the pixel that chromatic value drops on outside the chromaticity range of these a little colors misplaces for color takes place.
Wherein, brightness detects and to comprise: utilize the brightness value in the one K * brightness of the pixel that the analysis of K shade is not set and the signal of chrominance separation, to be arranged in high contrast areas in the pixel of finding out not setting and in the pixel of high-brightness region; And judge that the pixel generation color that is arranged in high contrast areas and high-brightness region misplaces.
At this, K is 2x+1, and x is the positive integer greater than 1, and the pixel of not setting that detects is positioned at the center of K * K shade.
Wherein, The color detection of gradual layer color comprises: utilize brightness value and chromatic value in the one M * brightness of the pixel that the analysis of M shade is not set and the signal of chrominance separation, with find out be not judged to be the color dislocation takes place the pixel meta in the non-flat zone, the gradual layer color zone, by bright be pixel in the zone of muted color to the dark zone that changes in gradient and vicinity highlights; And judge that the pixel that meets this condition is for the color dislocation takes place.
At this, M is 2y+1, and y is the positive integer greater than 1, and the pixel that is not judged to be the dislocation of generation color that detects is positioned at the center of M * M shade.
Can eliminate the color dislocation in the digitized video effectively according to the removing method of the color of digitized video of the present invention dislocation, and revised color is comparatively bright-coloured, for example: can be grey partially.
The explanation of above explanation and following execution mode about content of the present invention in order to demonstration with explain spirit of the present invention and principle, and the protection range explanation further of patent application of the present invention is provided.
Description of drawings
Fig. 1 is the flow chart of removing method of the color dislocation of digitized video according to an embodiment of the invention.
Fig. 2 A is the sketch map of the detection order of each pixel in the digitized video of an embodiment.
Fig. 2 B is the flow chart of detection of the color dislocation of an embodiment.
Fig. 3 is the flow chart that the specific color of an embodiment detects.
Fig. 4 is the sketch map of chromaticity range of the multiple color of an embodiment.
Fig. 5 A and Fig. 5 B are the flow chart that the brightness of an embodiment detects.
Fig. 6 A, 6B, 6C, 6D, 6E, 6F, 6G and 6H are the sketch map of eight directions under 5 * 5 shades.
Fig. 7 A, 7B, 7C and 7D are the color flow chart that detects of the gradual layer color of an embodiment.
Fig. 8 is the sketch map of the pixel that contains at 5 * 5 shades.
Fig. 9 is the flow chart of the revision program of an embodiment.
Figure 10 is the compensation method determination procedure of an embodiment and the flow chart of calcuating correction value.
Description of reference numerals
200 digitized videos
210 shades
The Po center pixel
The Pn neighborhood pixels
The P00 neighborhood pixels
The P01 neighborhood pixels
The P02 neighborhood pixels
The P03 neighborhood pixels
The P04 neighborhood pixels
The P10 neighborhood pixels
The P11 neighborhood pixels
The P12 neighborhood pixels
The P13 neighborhood pixels
The P14 neighborhood pixels
The P20 neighborhood pixels
The P21 neighborhood pixels
The P22 center pixel
The P23 neighborhood pixels
The P24 neighborhood pixels
The P30 neighborhood pixels
The P31 neighborhood pixels
The P32 neighborhood pixels
The P33 neighborhood pixels
The P40 neighborhood pixels
The P41 neighborhood pixels
The P42 neighborhood pixels
The P43 neighborhood pixels
The P44 neighborhood pixels
Embodiment
Removing method according to the dislocation of the color of digitized video of the present invention can be applicable to a computing electronics, the digitized video in the inputed to computing electronics is carried out the correcting process of color dislocation through this computing electronics.In other words; According to the removing method of the color of digitized video of the present invention dislocation can software or firmware program be stored in the storage element (for example: memory or hard disk etc.) of computing electronics, carry out the software that stores or firmware program by the processor of computing electronics again and realize.This computing electronics can be computer, mobile phone, personal digital assistant (personal digital assistant; PDA) or electronic equipment such as digital camera.
Fig. 1 is the flow chart of removing method of the color dislocation of digitized video according to an embodiment of the invention.
With reference to Fig. 1, step 110, computing electronics can have input unit, to obtain a digitized video.This input unit can be a video search unit, or is wired or wireless coffret.
Step 110, or processor can be read the digitized video that is stored in advance in the storage element from storage element, to obtain a digitized video.
Computing electronics more can have a signal conversion unit.This signal conversion unit receives digitized video, step 120, and be the signal of brightness and chrominance separation (YCbCr) with each pixel of this digitized video by three primary colors (RGB) conversion of signals.
In general 8 bits (bit) treatment system; The value of rgb signal is the positive integer between 0~255; And the scope of the value of YCbCr signal is that Y (brightness) signal is 0~255, and Cb and Cr (colourity) signal is-127~127, but Y, Cb and Cr signal are all integer value.The signal that this signal conversion unit is changed out is in order to analyze presentation content to detect and to revise the pixel that the color dislocation takes place.
Wherein, if the digitized video of obtaining has been the signal of brightness and chrominance separation (YCbCr), then can not need signal conversion unit.
At this, signal conversion unit can be incorporated in the processor, or realizes with another processor.
Then, carry out the detection of each color of pixel dislocation.Step 130; At this; Utilize specific color to detect color detect (the color detection) of (specific color detection), brightness detection (luminance detection) and gradual layer color and analyze the brightness of each pixel and the signal of chrominance separation; Step 140 is to judge whether each pixel the color dislocation takes place in this digitized video.
And step 150 is judged to be the pixel that the color dislocation does not take place with the color result who detects of specific color detection, brightness detection and gradual layer color and is set at normal pixel.Step 160 all is judged to be the pixel that the color dislocation takes place with the color result who detects of specific color detection, brightness detection and gradual layer color and is set at the color staggered pixels.
At last, step 180, the value of reservation normal pixel is revised the color staggered pixels, then to obtain revised digitized video.
In step 130, specific color detection, brightness detection and gradual layer color are color to be detected, and these three kinds of trace routines can be carried out in random order.
Explanation for ease, below with specific color detect, brightness detection and color detection of gradual layer color be implemented as example in regular turn.
With reference to Fig. 2 A, each pixel can be carried out the detection of color dislocation in regular turn in the digitized video 200 according to the signal of its brightness and chrominance separation.In brightness detection and the color detection of gradual layer color, can launch a shade 210 as center pixel Po with the pixel that detects, and utilize shade 210 to carry out the detection of this center pixel Po.
With reference to Fig. 2 B, at first, step 131 is selected a pixel from digitized video, and step 132, the pixel of selection can be carried out specific color earlier and detected, and whether step 142 has the pixel that the color dislocation takes place to judge each pixel.
Step 150, and, will in specific color detects, be judged to be the pixel that color dislocation does not take place and be set at normal pixel and this set point is recorded in the buffer.
Step 134, the pixel that in specific color detects, is judged to be the dislocation of generation color then continue and carry out the brightness detection, and whether step 144 has the pixel of generation color dislocation to judge each pixel of not setting.
Step 150 will be judged to be the pixel that color dislocation does not take place again and be set at normal pixel and this set point is recorded in the buffer in brightness detects.
Step 136, the pixel that in brightness detects, is judged to be the dislocation of generation color then continue and carry out the color detection of gradual layer color, and whether step 146 has the pixel that the color dislocation takes place with each pixel of judging not setting.
Step 150 will be judged to be the pixel that the color dislocation does not take place in detecting and be set at normal pixel and this set point is recorded in the buffer in that gradual layer color is color again.
Step 160, and, will in the color detection of gradual layer color, be judged to be the pixel that the color dislocation takes place and be set at the color staggered pixels; In other words, in the color detection of specific color detection, brightness detection and gradual layer color, all be judged to be the pixel that the color dislocation takes place and just be set at the color staggered pixels.
Step 170 then, confirms whether all pixels in the digitized video all accomplish setting, confirms promptly whether all pixels in the digitized video all carry out the detection of color dislocation.
If do not accomplish the setting (detection of color dislocation) of all pixels as yet, then select next pixel (step 172 and step 131) to utilize the color detection (step 132, step 142, step 134, step 144, step 136 and step 146) that detects the color of pixel dislocation of carrying out this selection of specific color detection, brightness detection and gradual layer color.
Step 180 when all pixels in the digitized video are all accomplished setting, is then carried out revision program,, keeps the value of normal pixel that is, revises the value of color staggered pixels then, to obtain revised digitized video.
At this, though be to be implemented as example in regular turn with color detection of specific color detection, brightness detection and gradual layer color, this execution sequence is not restriction of the present invention.That is to say; Also can the brightness detection, gradual layer color is color detects and order that specific color detects is carried out in regular turn; Promptly carrying out brightness earlier detects; The pixel that in brightness detects, is judged to be the dislocation of generation color is carried out the color detection of gradual layer color again, just carries out the specific color detection and in the color detection of gradual layer color, be judged to be the pixel that the color dislocation takes place.Or carry out in regular turn with the order that gradual layer color color detects, specific color detects and brightness detects; Promptly carry out the color detection of gradual layer color earlier; Be judged to be the pixel that the color dislocation takes place in detecting and carry out specific color again and detect in that gradual layer color is color, just carry out brightness and detect and in specific color detects, be judged to be the pixel that the color dislocation takes place.In like manner; Also can the brightness detection, specific color detects and the color order that detects of gradual layer color is carried out in regular turn; Or carry out in regular turn with the order that gradual layer color color detects, brightness detection and specific color detect, or with specific color detect, gradual layer color is color detects and order that brightness detects is carried out in regular turn.
At this, specific color detects (step 132) and utilizes the chrominance information of pixel and the chromaticity range of predefined multiple color to judge whether the pixel of selection the color dislocation takes place.
With reference to Fig. 3, step 321 is being carried out specific color when detecting (step 132), and whether the chromatic value of the pixel of not setting according to the chromaticity range analysis of predefined multiple color does not fall in the chromaticity range of definition with the chromatic value of the pixel confirming to set.This chromatic value can comprise chroma blue (Cb) signal and red color (Cr) signal in the signal of brightness and chrominance separation.
Wherein, when the specific color detection is the trace routine of carrying out at first, the pixel of the pixel of setting for selecting.When the specific color detection was not the trace routine of carrying out at first, the pixel of setting not was that previous trace routine is judged to be the pixel that the color dislocation takes place.
Step 323, and, chromatic value is dropped on pixel in the chromaticity range of multiple color of definition and be judged to be the color dislocation takes place; Otherwise, step 325, chromatic value drops on pixel outside the chromaticity range of multiple color of definition and then is judged to be the color dislocation does not take place.
Detect (step 132) to specific color, can define the chromaticity range of these a little colors in advance according to the zone that the color dislocation possibly take place.For instance; Fig. 4 shows the chromaticity range that the color dislocation possibly take place, wherein block A for the colourity block that the color dislocation possibly take place on the yellow area, block B for the colourity block that the color dislocation possibly take place on the red area, block C at the colourity block that the color dislocation possibly take place on the green area and block D for the colourity block of color dislocation possibly take place on pink zone.Therefore, can according to block A define reddish yellow chromaticity range, define red chromaticity range, define yellow chromaticity range according to block B according to block C, and define pinkish chromaticity range according to block D.
At this; Can the chromaticity range that define these a little colors that color dislocation possibly take place be set at corresponding a plurality of chromaticity range threshold values (chrominance range threshold), and whether the chromatic value of the chromaticity range threshold value that sees through chromatic value and the setting of the compared pixels pixel confirming to detect falls in the chromaticity range of definition.
In addition; Also can set a colourity range threshold in corresponding zone (chromaticity range that promptly can color misplace) these a little chromaticity range outside according to the chromaticity range that defines these a little colors that color dislocation possibly take place, then the chromatic value through compared pixels therewith the chromatic value of the threshold pixel confirming to detect whether fall in the chromaticity range of definition.With Fig. 4 is example, and the chromaticity range threshold value of setting corresponding zone outside the chromaticity range of the multiple color that the color dislocation possibly take place is sets the chromaticity range threshold value that comprises all chromatic values in the block E.
Detect in (step 134) in brightness, utilize the monochrome information of pixel to judge whether the pixel of selection the color dislocation takes place.At this, utilize K * K shade to find out not to be arranged in the pixel of setting high contrast areas and in the pixel of high-brightness region.K is 2x+1, and x is the positive integer greater than 1.
At this, K * K shade is for being the reference zone that K * K pixel launched to contain in the center with the pixel that detects.In other words, the pixel that detects is the center pixel of K * K shade, and the pixel under K * K shade beyond the center pixel then is referred to as neighborhood pixels.
Wherein, when the brightness detection is the trace routine of carrying out at first, the pixel of the pixel of setting for selecting.When the brightness detection was not the trace routine of carrying out at first, the pixel of setting not was that previous trace routine is judged to be the pixel that the color dislocation takes place.
In other words, detect in (step 134), can carry out 2 brightness and confirm program in brightness.Describe for ease, below be referred to as first brightness respectively and confirm that the program and second brightness confirms program.
The first brightness affirmation program is that whether the position is in high contrast areas for the pixel of confirming to detect.The second brightness affirmation program is that whether the position is at high-brightness region for the pixel of confirming to detect.
With reference to Fig. 5 A, step 341 in the first brightness affirmation program, is at first calculated in the brightness step value on eight directions under K * K shade, promptly calculates the summation of the difference of neighborhood pixels Pn and center pixel Po respectively to all directions.
For instance; With 5 * 5 shades is example; With reference to Fig. 6 A-6H, eight directions be respectively fill up in the diagram zone direction Dir0 that shows (right side), direction Dir1 (upper right), direction Dir2 (on), direction Dir3 (upper left), direction Dir4 (left side), direction Dir5 (left side time), direction Dir6 (descending) and direction Dir7 (bottom right).
Have center pixel Po and 2 neighborhood pixels Pn on each direction.
Wherein, the formula of brightness step value is sum_Dirj=(Y1-Yc)+(Y2-Yc).
J is an integer value one of in 0 to 7, promptly represents direction.Yc representes the brightness value of center pixel Po, and Y1 and Y2 represent the brightness value of two neighborhood pixels Pn respectively.
Step 342 is found out high-high brightness Grad and minimum brightness Grad again from eight brightness step values that obtain.
Step 343, the difference of calculating high-high brightness Grad and minimum brightness Grad.
Step 344 is compared the difference of high-high brightness Grad and minimum brightness Grad then with first threshold.
Step 345 when the difference of high-high brightness Grad and minimum brightness Grad during greater than first threshold, judges that center pixel Po is positioned at high contrast areas, and the pixel position of promptly detecting is in high contrast areas.
Step 346 when the difference of high-high brightness Grad and minimum brightness Grad is less than or equal to first threshold, judges that center pixel Po is positioned at high contrast areas, and the pixel that promptly detects is not that the position is in high contrast areas.
Then, confirming as the pixel of position in high contrast areas continues and carries out second brightness and confirm program (that is, continue carry out step 347).Confirm as and be not that the pixel of position in high contrast areas then is judged to be color dislocation (step 353) does not take place.
With reference to Fig. 5 B, step 347, in the second brightness affirmation program, at first will be under K * K shade all neighborhood pixels Pn brightness value respectively with one second threshold, step 348, and calculate the quantity of brightness value greater than the neighborhood pixels of second threshold value.
Then, step 349 is with quantity that calculates and the 3rd threshold.
Step 350 when the quantity that calculates during greater than the 3rd threshold value, judges that center pixel Po is positioned at high-brightness region, and the pixel position of promptly detecting is in high-brightness region.
Step 351 when the quantity that calculates is less than or equal to the 3rd threshold value, judges that center pixel Po is positioned at high-brightness region, and the pixel that promptly detects is not that the position is in high-brightness region.
Then, step 352 is judged to be the dislocation of generation color with confirming as the pixel of position in high-brightness region, and the pixel (pixel that detects) that is about to be arranged in high contrast areas and high-brightness region is judged to be the color dislocation takes place.Step 353 is not that the pixel of position in high-brightness region then is judged to be the color dislocation does not take place confirming as.
At this, first and second in order to distinguish two kinds of distinct programs, do not have the restriction of execution sequence.In other words, first brightness affirmation program and second brightness affirmation program implementation order can be changed arbitrarily.That is, carry out earlier second brightness and confirm program, in the second brightness affirmation program, confirm as the pixel of position in high-brightness region and continue and carry out first brightness and confirm program.
That is to say that in brightness detected, the pixel that is arranged in high contrast areas and high-brightness region in the pixel of not setting just was judged to be the color dislocation takes place.
In the color detection of gradual layer color (step 136), utilize the monochrome information of pixel and chrominance information to judge according to the gradually layer state of image whether the pixel of selection the color dislocation takes place.At this, the pixel meta that utilizes M * M shade to find out not to set in the non-flat zone, the position in the gradual layer color zone, the position bright in the dark zone that changes in gradient and the position be the pixel in the zone of muted color at contiguous highlights.M is 2y+1, and y is the positive integer greater than 1.At this, color detect (step 136) of gradual layer color can detect the shade that (step 134) used same size with brightness, and promptly M equals K.Color detect (step 136) of gradual layer color also can detect the shade that (step 134) used different size with brightness, and promptly M is not equal to K.
At this, launch to contain a M * M shade of M * M pixel with the center of detecting, pixel position.In other words, the pixel that detects is the center pixel of M * M shade, and the pixel under M * M shade beyond the center pixel then is referred to as neighborhood pixels.
Wherein, when the color detection of gradual layer color is the trace routine of carrying out at first, the pixel of the pixel of setting for selecting.When the color detection of gradual layer color was not the trace routine of carrying out at first, the pixel of setting not was that previous trace routine is judged to be the pixel that the color dislocation takes place.
In other words, in the color detection of gradual layer color (step 136), can carry out 4 gradually layer affirmation programs.Describe for ease, below be referred to as first layer affirmation program, second layer affirmation program, the 3rd layer affirmation program and the 4th layer affirmation program gradually gradually gradually gradually respectively.
First gradually layer affirmation program be that whether the position is in non-flat zone (non-smooth area) for the pixel of confirming to detect.Second gradually layer affirmation program be that whether the position is in gradual layer color zone (gradational color area) for the pixel of confirming to detect.The 3rd gradually layer affirmation program be the pixel confirming to detect whether the position by bright to the dark zone (area appearing gradational variation frombright to dark) of variation in gradient.The 4th gradually layer affirmation program be that whether the position is the zone (area appearing bright neutral color) of muted color at contiguous highlights to the pixel of confirming to detect.
First gradually in the layer affirmation program, see through to calculate under M * M shade in adjacent domain and judge the pixel that detects near the quantity of the pixel of muted color whether the position is in the non-flat zone.
With reference to Fig. 7 A and 8, at first, step 361 is calculated the difference (difference of the signal of brightness and chrominance separation) at neighborhood pixels P00, P02, P04, P20, P24, P40, P42, P44 and the center pixel P22 of the outermost on eight directions under M * M shade.In Fig. 8, be example with 5 * 5 shades, promptly M equals 5, however this non-restriction of the present invention.Wherein, P00, P01, P02, P03, P04, P10, P11, P12, P13, P14, P20, P21, P23, P24, P30, P31, P32, P33, P40, P41, P42, P43 and P44 are the neighborhood pixels of center pixel P22.
Step 362, and, with the difference of neighborhood pixels P00, P02, P04, P20, P24, P40, P42, P44 and the center pixel P22 of the outermost that obtains respectively with the 4th threshold.At this, the 4th threshold value can be single numerical value or is a numerical limits scope.When the 4th threshold value is single numerical value, absolute value and threshold that can difference.
Step 363 is calculated qualified quantity, that is, calculated difference (absolute value) is less than or equal to the quantity of the 4th threshold value, or calculated difference falls into the quantity of the 4th threshold value.
Step 364 is again with quantity that calculates and the 5th threshold.
Step 365 when the quantity that calculates during greater than the 5th threshold value, judges that center pixel P22 is positioned at smooth region, and the pixel that promptly detects is not that the position is in the non-flat zone.
Step 366 when the quantity that calculates is less than or equal to the 5th threshold value, judges that center pixel P22 is positioned at smooth region, and the pixel position of promptly detecting is in the non-flat zone.
Then, confirming as the pixel of position in the non-flat zone continues and carries out the second layer affirmation program (that is, continue carry out step 367) gradually.Confirm as and be not that the pixel of position in the non-flat zone then is judged to be color dislocation (step 384) does not take place.
Second gradually in the layer affirmation program, see through and detect whether judging the pixel that detects near muted color with respect to the pixel on the direction with high-high brightness Grad whether the position is in the gradual layer color zone under M * M shade.
With reference to Fig. 7 B; Step 367; At first, calculate on the relative direction of the direction that in eight directions, has the high-high brightness Grad under M * M shade the neighborhood pixels of outermost and the difference of center pixel (difference of the signal of brightness and chrominance separation); Step 368, and with this difference and the 6th threshold.
For instance, suppose that the direction with high-high brightness Grad is the direction Dir0 shown in Fig. 6 A, the relative direction with direction of high-high brightness Grad is the direction Dir4 shown in Fig. 6 E.Therefore, corresponding to Fig. 8, then be the difference of calculating neighborhood pixels P20 and center pixel P22.
Wherein, the acquisition mode that has a direction of high-high brightness Grad is same as abovementioned steps 341 and step 342 haply.In other words; When brightness detects (step 134) in that gradual layer color is color when detecting (step 136) and carrying out before, gradual layer color color detect can see through in (step 136) detect in (step 134) performed step 341 in brightness and learn direction with high-high brightness Grad.Otherwise; When brightness detects (step 134) when the color detection of gradual layer color (step 136) is carried out afterwards; Can first execution in step 341 color detect in (step 136) then of gradual layer color; Learning direction, and detect in brightness and then can omit directly execution in step 342 of step 341 in (step 134) with high-high brightness Grad.
Step 369 when difference during greater than the 6th threshold value, judges that center pixel P22 is positioned at the gradual layer color zone, and the pixel that promptly detects is that the position is in the gradual layer color zone.
Step 370 when difference is less than or equal to the 6th threshold value, judges that center pixel P22 is positioned at the gradual layer color zone, and the pixel that promptly detects is not that the position is in the gradual layer color zone.
Then, confirming as the pixel of position in the gradual layer color zone continues and carries out the 3rd layer affirmation program (that is, continue carry out step 371) gradually.Confirm as and be not that the pixel of position in the gradual layer color zone then is judged to be color dislocation (step 384) does not take place.
The 3rd gradually in the layer affirmation program, see through to calculate and judge the pixel that detects in the close quantity of color of direction that has the high-high brightness Grad under M * M shade and two neighbors on the relative direction thereof whether the position is in the gradual layer color zone.
With reference to Fig. 7 C; At first; Step 371, calculating has on the direction and relative direction thereof of high-high brightness Grad the difference (difference of the signal of brightness and chrominance separation) between all adjacent two pixels in eight directions under M * M shade; Step 372, and with these a little differences and the 7th threshold.
With reference to Fig. 8; With 5 * 5 shades is example; Supposing that the direction with high-high brightness Grad is the direction Dir0 shown in Fig. 6 A, promptly is to calculate in the difference (P20-P21, P21-P22, P22-P23 and P23-P24) between all adjacent two pixels on direction Dir0 and the direction Dir4.
At this, the 7th threshold value can be single numerical value or is a numerical limits scope.When the 7th threshold value is single numerical value, absolute value and threshold that can difference.
Step 373 is calculated qualified quantity, and for example: calculated difference (absolute value) is greater than the quantity of the 7th threshold value, or calculated difference drops on the quantity outside the 7th threshold value.
Step 374, again with quantity that calculates and the 8th threshold, and according to comparative result judge center pixel P22 whether the position by bright to the dark zone (that is, step 375 or step 376) of variation in gradient.
Step 375 when the quantity that calculates during greater than the 8th threshold value, judges that center pixel P22 is positioned at by bright to the dark zone that changes in gradient, the pixel that promptly detects be the position by bright in the zone of dark variation in gradient.
Step 376 when the quantity that calculates is less than or equal to the 8th threshold value, judges that center pixel P22 is positioned at by bright to the dark zone that changes in gradient, the pixel that promptly detects be not the position by bright in the zone of dark variation in gradient.
In addition, if step 373 is the quantity that calculated difference (absolute value) is less than or equal to the 7th threshold value, or calculated difference falls into the quantity of the 7th threshold value, and then the judged result of step 375 and step 376 then can be opposite.That is,, judge that center pixel P22 is positioned at by bright to the dark zone of variation in gradient when the quantity that calculates during greater than the 8th threshold value; Otherwise, judge that then center pixel P22 is arranged in by bright to the dark zone (not being presented at graphic) that changes in gradient.
Then, confirm as the position and carry out the 4th layer affirmation program (that is, continue carry out step 377) gradually continuing by bright pixel in the dark zone that changes in gradient.Confirm as and be not that the position color dislocation (step 384) does not take place then being judged to be by bright pixel in the dark zone that changes in gradient.
The 4th gradually in the layer affirmation program, see through the pixel that detects bright area under M * M shade and whether judge near muted color whether the position is the zone of muted color at contiguous highlights to the pixel that detects.
With reference to Fig. 7 D; At first; Step 377, calculating has on the direction of high-high brightness Grad the difference of neighborhood pixels and muted color (difference of chromatic value and muted color in the signal of brightness and chrominance separation) in eight directions under M * M shade; Step 378, and with this difference and the 9th threshold.
With reference to Fig. 8; With 5 * 5 shades is example; The direction of supposing to have the high-high brightness Grad is the direction Dir0 shown in 6A figure, promptly is to calculate the difference of all neighborhood pixels and muted color on direction Dir0 (as if Cb and Cr signal is-127~127, then is P23-0 and P24-0; If Cb and Cr signal are 0~255, then are P23-128 and P24-128).
At this, the 9th threshold value can be single numerical value or is a numerical limits scope.When the 9th threshold value is single numerical value, absolute value and threshold that can difference.
Step 379 is calculated qualified quantity, that is, calculated difference (absolute value) is less than or equal to the quantity of the 9th threshold value, or calculated difference falls into the quantity of the 9th threshold value.
Step 380 is again with quantity that calculates and the tenth threshold.
Step 381 when the quantity that calculates during greater than the tenth threshold value, judges that center pixel P22 is positioned at the zone that contiguous highlights is a muted color, and the pixel that promptly detects is that the position is in the zone of muted color at contiguous highlights.
Step 382 when the quantity that calculates is less than or equal to the tenth threshold value, judges that center pixel P22 is positioned at the zone that contiguous highlights is a muted color, and the pixel that promptly detects is not to be arranged in the zone that contiguous highlights is a muted color.
Then, step 383 is confirmed as the pixel of position in the zone that contiguous highlights is a muted color and is judged to be the dislocation of generation color.Yet step 384 is confirmed as and is not that the position is that pixel in the zone of muted color is judged to be the color dislocation does not take place at contiguous highlights.
At this, first, second, third and four-function with the difference distinct program, do not have the restriction of execution sequence.In other words, first gradually layer affirmation program, second gradually layer affirmation program, the 3rd gradually layer affirmation program and the 4th gradually layer confirm that program implementation order can change arbitrarily.In other words; In last gradually layer affirmation program, confirm as the position (promptly in the specific region of correspondence; Non-flat zone, gradual layer color be regional, by bright be the zone of muted color to dark zone that changes in gradient or contiguous highlights) in pixel continue and carry out next gradually layer affirmation program; And last gradually confirm as in the layer affirmation program position the specific region of correspondence (that is, non-flat zone, gradual layer color regional, by bright be the zone of muted color to dark zone that changes in gradient or contiguous highlights) in pixel just be judged to be the pixel that color misplaces take place.
That is to say, detect in that gradual layer color is color, in the pixel of not setting be arranged in non-flat zone, gradual layer color zone, by bright to the dark zone that changes in gradient and or the contiguous highlights pixel that is the achromatic region just be judged to be the color dislocation take place.
At this, can adopt two kinds of compensation methodes to revise.Describe for ease, what below divide another name is first compensation method and second compensation method.
First compensation method compensates with neighbor point.Second compensation method compensates with muted color.
And, see through to detect the smoothness of dark areas and the dislocation state of neighborhood pixels under N * N shade, decide each color staggered pixels to compensate with first compensation method or second compensation method.N is 2z+1, and z is the positive integer greater than 1.At this, revision program (that is, step 180) can detect the shade that (step 134) used same size with brightness, and promptly N equals K.Revision program (that is, step 180) also can detect the shade that (step 134) used different size with brightness, and promptly N is not equal to K.Likewise, revision program (that is, step 180) can be used the shade of same size with the color detection of gradual layer color (step 136), and promptly N equals M.Revision program (that is, step 180) also can be used the shade of different size with the color detection of gradual layer color (step 136), and promptly N is not equal to M.
With reference to Fig. 9, in revision program (that is, step 180), at first, step 181 is selected a color staggered pixels.
Step 182, the compensation method determination procedure of the color staggered pixels of carry out selecting is with the compensation method according to the dislocation state decision color staggered pixels of the smoothness of dark areas under N * N shade and neighborhood pixels.This N * N shade is the reference zone that N * N pixel launched to contain in the center for the color staggered pixels with selection.
Step 183, the correction value of the color staggered pixels of calculate selecting with the compensation method (that is, first compensation method or second compensation method) of decision.The correction value that calculates can be stored in earlier in the storage element, for example: be temporarily stored in the buffer.
Then, step 184 confirms whether all colours staggered pixels in the digitized video all accomplishes the calculating of correction value.
If do not accomplish the calculating (calculating of correction value) of all colours staggered pixels as yet, then select next color staggered pixels (step 185 and step 181) and continue and carry out step 182, step 183 and step 184.
Step 186; When all colours staggered pixels in the digitized video is all accomplished the calculating of correction value; Then constrain the color staggered pixels, that is, keep the value of normal pixel according to the correction value that calculates; Then according to the corresponding brightness of color staggered pixels and the signal of chrominance separation revised of the correction value that calculates, to obtain revised digitized video.
In compensation method determination procedure (step 182), can carry out 2 state confirmation programs.Describe for ease, below be referred to as the first state confirmation program and the second state confirmation program respectively.
The first state confirmation program is to analyze chrominance information whether the position is at dark smooth region with the color staggered pixels confirming to calculate.The second state confirmation program is whether the neighborhood pixels of the color staggered pixels confirming to calculate is the color staggered pixels.
Wherein, dark smooth region refers to that dark areas is level and smooth change color under shade.
With reference to Figure 10; At first; Step 821 is calculated on the relative direction of the direction that in eight directions, has the high-high brightness Grad under N * N shade the difference of all neighborhood pixels and center pixel (difference of chromatic value in the signal of brightness and chrominance separation); Step 822, and with this a little differences and the 11 threshold.
For instance, suppose that the direction with high-high brightness Grad is the direction Dir0 shown in Fig. 6 A, the relative direction with direction of high-high brightness Grad is the direction Dir4 shown in Fig. 6 E.Therefore, corresponding to Fig. 8, then be the difference of chromatic value of difference and neighborhood pixels P21 and center pixel P22 of calculating the chromatic value of neighborhood pixels P20 and center pixel P22.
Wherein, the acquisition mode that has a direction of high-high brightness Grad is same as abovementioned steps 341 and step 342 haply.
At this, the 11 threshold value can be single numerical value or is a numerical limits scope.When the 11 threshold value is single numerical value, absolute value and threshold that can difference.
Step 823 is carried out the second state confirmation program with qualified neighborhood pixels.For example: difference (absolute value) is carried out the second state confirmation program less than the neighborhood pixels of the 11 threshold value, or the neighborhood pixels that difference falls into the 11 threshold value is carried out the second state confirmation program.
Step 823 in the second state confirmation program, confirms whether qualified neighborhood pixels is the color staggered pixels.
Step 824 is with eligible and be not defined as reference pixel for the neighborhood pixels of color staggered pixels.
Step 825 confirms whether to have reference pixel.
Step 831 when having reference pixel, is calculated the correction value of the color staggered pixels of selecting with first compensation method.Wherein, first compensation method can be the mean value of the chromatic value that calculates all reference pixels, with the correction value as the color staggered pixels of selecting.
Step 832 when not having reference pixel, is then calculated the correction value of the color staggered pixels of selecting with second compensation method.
Second compensation method (that is step 832) can comprise the following steps.
At first, find out, have the neighborhood pixels of maximum brightness value in eight directions, having on the direction of high-high brightness Grad under N * N shade.Calculating has the difference of colourity between neighborhood pixels and the center pixel of maximum brightness value.According to the correction value of the difference computer center pixel (the color staggered pixels of selection) that calculates, so that center pixel constrains toward muted color.
At this, first and second in order to distinguish two kinds of distinct programs, do not have the restriction of execution sequence.In other words, the first state confirmation program and second state confirmation program implementation order can be changed arbitrarily.Promptly; Except that above-mentioned execution sequence; Also can carry out the second state confirmation program earlier, in the second state confirmation program, confirm to have on the relative direction of direction of high-high brightness Grad and be not the neighborhood pixels of the color staggered pixels execution first state confirmation program that continues.
At this, first compensation method (step 831) and second compensation method (step 832) can be carried out according to the equation preface respectively.
First compensation method (step 831) is carried out according to formula 1 and formula 2:
Cb_correction Po=Cb Average... ... ... .. formula 1
Cr_correction Po=Cr Average... ... ... formula 2
Second compensation method (step 832) is carried out according to formula 3 and formula 4:
Cb _ Correction Po = 128 + ( Cb Po - 128 ) × ( 256 - CbCr _ Diff ) 256 ; ... ... formula 3
Cr _ Correction Po = 128 + ( Cr Po - 128 ) × ( 256 - CbCr _ Diff ) 256 ; ... ... formula 4
Po represents center pixel, the color staggered pixels of promptly selecting.
Cb PoRepresent the chromatic value of the chroma blue of center pixel.
Cb AverageRepresent the mean value of the chroma blue value of all reference pixels.
Cr PoRepresent the chromatic value of the red color of center pixel.
Cr AverageRepresent the mean value of the red color value of all reference pixels.
Cb_correction PoRepresent the correction value of the chroma blue of center pixel.
Cr_correction PoRepresent the correction value of the red color of center pixel.
CbCr_Diff representative has the maximum difference of chroma blue and red color between neighborhood pixels and the center pixel of maximum brightness value.
Can eliminate the color dislocation in the digitized video effectively according to the removing method of the color of digitized video of the present invention dislocation, and revised color is comparatively bright-coloured, for example: can be grey partially.
Certainly; The present invention also can have other various embodiments; Under the situation that does not deviate from spirit of the present invention and essence thereof; Being familiar with those of ordinary skill in the art ought can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.

Claims (4)

1. the removing method of the color of digitized video dislocation comprises:
Obtain a digitized video, wherein this digitized video is made up of a plurality of pixel;
Utilize that a specific color detects, a brightness detects and the color check and analysis of a gradual layer color respectively a brightness of this pixel and the signal of chrominance separation; Judging in this digitized video respectively whether this pixel the color dislocation takes place, and with this specific color detect, this brightness detects and one of color result who detects of this gradual layer color is judged to be respectively this pixel that the color dislocation does not take place and is set at a normal pixel;
The result that this specific color detects with utilizing, this brightness detects and this gradual layer color coloured silk detects all is judged to be respectively this pixel that the color dislocation takes place and is set at a color staggered pixels; And
Revise this color staggered pixels;
Wherein, this specific color detects and comprises:
The chromatic value of this brightness of respectively this pixel of not setting according to the chromaticity range analysis of multiple color and the signal of chrominance separation;
Judge that this chromatic value drops on this pixel in this chromaticity range of this multiple color for the color dislocation takes place; And
Judge that this chromatic value drops on this pixel outside this chromaticity range of this multiple color for the color dislocation takes place;
Wherein, this brightness detects and comprises:
Utilize the brightness value in one K * this brightness of this pixel that the analysis of K shade is not set and the signal of chrominance separation; Be arranged in high contrast areas in this pixel of setting and in the pixel of high-brightness region to find out not; Wherein this K is 2x+1; This x is the positive integer greater than 1, and this pixel do not set that detects is positioned at the center of this K * K shade; And
Judge this pixel generation color dislocation that is arranged in this high contrast areas and this high-brightness region; And
Wherein, the color detection of this gradual layer color comprises:
Utilize this brightness value and this chromatic value in one M * this brightness of this pixel that the analysis of M shade is not set and the signal of chrominance separation; Be not judged to be the pixel of this pixel meta in non-flat zone, gradual layer color zone regional, that be muted color by bright regional and vicinity highlights that the generation color misplaces to find out to secretly variation in gradient; Wherein this M is 2y+1; This y is the positive integer greater than 1, and this pixel that is not judged to be the dislocation of generation color that detects is positioned at the center of this M * M shade; And
Judgement is arranged in this non-flat zone, this gradual layer color zone, should was that the color dislocation takes place by bright this pixel to the zone of dark variation in gradient and the zone that this vicinity highlights is a muted color;
Wherein, the step of this pixel of this correction generation color dislocation comprises:
From this color staggered pixels of setting, select a color staggered pixels;
Carry out a compensation method deciding step of this color staggered pixels of selecting; Wherein this compensation method deciding step is one of in one first compensation method and one second compensation method for the compensation method of this color staggered pixels of selecting according to the dislocation state decision of the smoothness of dark areas under one N * N shade and at least one neighborhood pixels; N is 2z+1; Z is the positive integer greater than 1; This color staggered pixels position of selecting is at the center of this N * N shade, and respectively this neighborhood pixels be one of in this color staggered pixels pixel in addition of selection under this N * N shade;
Calculate a correction value of this color staggered pixels of selecting with this compensation method of decision; And
According to corresponding this brightness of this color staggered pixels of selecting and the signal of chrominance separation revised of this correction value;
Wherein, this first compensation method is to constrain this color staggered pixels of selecting with this neighborhood pixels, and this second compensation method is that this color staggered pixels that will select constrains toward muted color.
2. the removing method of the color of digitized video according to claim 1 dislocation, wherein this M equals this K.
3. the removing method of the color of digitized video according to claim 1 dislocation, wherein this N equals at least one among this K and this M.
4. the removing method of the color of digitized video according to claim 1 dislocation more comprises:
Keep this brightness of this normal pixel and the signal of chrominance separation.
CN200910258900A 2009-12-30 2009-12-30 Method for eliminating color dislocation for digital image Expired - Fee Related CN102118620B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910258900A CN102118620B (en) 2009-12-30 2009-12-30 Method for eliminating color dislocation for digital image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910258900A CN102118620B (en) 2009-12-30 2009-12-30 Method for eliminating color dislocation for digital image

Publications (2)

Publication Number Publication Date
CN102118620A CN102118620A (en) 2011-07-06
CN102118620B true CN102118620B (en) 2012-09-19

Family

ID=44217188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910258900A Expired - Fee Related CN102118620B (en) 2009-12-30 2009-12-30 Method for eliminating color dislocation for digital image

Country Status (1)

Country Link
CN (1) CN102118620B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183755B (en) * 2015-07-17 2018-10-12 小米科技有限责任公司 A kind of display methods and device of picture

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038370A (en) * 2006-03-17 2007-09-19 株式会社理光 Optical scanning apparatus, image forming apparatus, and scanning-line-change correcting method
CN101127921A (en) * 2006-08-15 2008-02-20 联咏科技股份有限公司 Self-adapted video processing device and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101038370A (en) * 2006-03-17 2007-09-19 株式会社理光 Optical scanning apparatus, image forming apparatus, and scanning-line-change correcting method
CN101127921A (en) * 2006-08-15 2008-02-20 联咏科技股份有限公司 Self-adapted video processing device and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2002-358482A 2002.12.13

Also Published As

Publication number Publication date
CN102118620A (en) 2011-07-06

Similar Documents

Publication Publication Date Title
TWI394434B (en) The method of eliminating the color dislocation of digital images
CN100593320C (en) Method of processing noise in image data, noise reduction unit, and imaging apparatus
US7973850B2 (en) Image processing apparatus and image processing method
CN102835102B (en) Image processing apparatus and control method for image processing apparatus
US7551214B2 (en) Pixel interpolation method
TWI428025B (en) Image processing apparatus and image processing method, image capturing apparatus and computer program product
US8164649B2 (en) White balance adjusting device, imaging apparatus, and recording medium storing white balance adjusting program
TWI395468B (en) The method of eliminating the color dislocation of digital images
KR100916484B1 (en) Method for auto white balance
US8023010B2 (en) Defective pixel correction device
CN105744242B (en) Image processing equipment, picture pick-up device and image processing method
CN106488078A (en) Image processing equipment and image processing method
KR20170030933A (en) Image processing device and auto white balancing metohd thereof
JP2006191607A (en) Color interpolation method for digital photographing apparatus
CN101686321B (en) Method and system for reducing noise in image data
KR20070103229A (en) Method and apparatus for color interpolation
KR101650842B1 (en) Image processing apparatus, image processing method and recording medium storing program to execute the method
JP2013118526A (en) Imaging apparatus, image processing program, image processing method and image processor
CN102118620B (en) Method for eliminating color dislocation for digital image
KR101854432B1 (en) Method and apparatus for detecting and compensating back light frame
CN103297717A (en) Self-adaption image processing method and relevant device thereof
CN102118621B (en) Method for eliminating color dislocation for digital image
JP4975515B2 (en) Defective pixel correction device for solid-state imaging device, defective pixel correction method for solid-state imaging device, control program, readable recording medium, imaging device, and electronic information device
US7847822B2 (en) Sequential regression for calibration from residues
CN113766156B (en) Black level shift

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120919

Termination date: 20181230