CN108615227A - A kind of suppressing method and equipment of image moire fringes - Google Patents

A kind of suppressing method and equipment of image moire fringes Download PDF

Info

Publication number
CN108615227A
CN108615227A CN201810433342.0A CN201810433342A CN108615227A CN 108615227 A CN108615227 A CN 108615227A CN 201810433342 A CN201810433342 A CN 201810433342A CN 108615227 A CN108615227 A CN 108615227A
Authority
CN
China
Prior art keywords
pixel
image
determined
preset
moire fringes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810433342.0A
Other languages
Chinese (zh)
Other versions
CN108615227B (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201810433342.0A priority Critical patent/CN108615227B/en
Publication of CN108615227A publication Critical patent/CN108615227A/en
Application granted granted Critical
Publication of CN108615227B publication Critical patent/CN108615227B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Color Television Image Signal Generators (AREA)
  • Color Image Communication Systems (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention discloses a kind of suppressing methods and equipment of image moire fringes, for providing a kind of method of new inhibition moire fringes, to improve the quality of image frame.The suppressing method of image moire fringes therein includes:Pending image is divided at least two image-regions;Each image-region at least two image-region is traversed using preset window, in ergodic process, determines whether image includes moire fringes pixel in the preset window;If it is determined that comprising moire fringes pixel, then according to comprising moire fringes pixel quantity, determine whether each image-region is moire fringes region;If any image region is moire fringes region, the original pixel value after the moire fringes pixel removal moire fringes for including in the moire fringes region is determined;The moire fringes in each image-region are eliminated into row interpolation to the moire fringes pixel using the original pixel value.

Description

A kind of suppressing method and equipment of image moire fringes
Technical field
The present invention relates to technical field of image processing, more particularly to a kind of the suppressing method and equipment of image moire fringes.
Background technology
Moire fringes refer in the equipment such as digital camera or scanner, and the high frequency that the photosensitive element in equipment occurs is dry The striped disturbed is a kind of irregular striped of high-frequency that picture can be made colour occur, this allows for finally obtained image production Raw puppet color anomaly.
Currently, being typically to inhibit the moire fringes of image by adding a low-pass filter before the camera lens of equipment.But This method simultaneously also can also filter the pixel of non-moire fringes in image, this will so that image is fuzzy, reduce image Clarity so that image frame it is second-rate.
As it can be seen that after being inhibited to image moire fringes by current image moire fringes suppressing method, obtained image frame It is second-rate.
Invention content
The embodiment of the present invention provides a kind of suppressing method and equipment of image moire fringes, rubs for providing a kind of new inhibition The method of your line, to improve the quality of image frame.
In a first aspect, providing a kind of suppressing method of image moire fringes, this method includes:
Pending image is divided at least two image-regions;
Each image-region at least two image-region is traversed using preset window, in ergodic process, is determined Whether image includes moire fringes pixel in the preset window;
If it is determined that comprising moire fringes pixel, then according to comprising moire fringes pixel quantity, determine each image district Whether domain is moire fringes region;
If any image region is moire fringes region, determine that the moire fringes pixel for including in moire fringes region removal rubs Original pixel value after your line;
Rubbing in each image-region is eliminated into row interpolation to the moire fringes pixel using the original pixel value That line.
Optionally, the preset window is j × k windows, wherein j and k is the odd number more than or equal to 3;
Each image-region at least two image-region is traversed using preset window, in ergodic process, is determined Whether image includes moire fringes pixel in the preset window, including:
Judge whether the central pixel point of image in the preset window is the first color component, and obtains judging result; Wherein, first color component is any one in red component, green component and blue component;
Determine whether image includes mole in the preset window using different preset rules according to the judging result Line pixel.
Optionally, if the judging result indicates that the central pixel point is first color component, it is determined that described Whether image includes moire fringes pixel in preset window, including:
Judge four of image in the preset window it is diagonal on corresponding four values of pixel in maximum value Whether meet the first preset relation with minimum value;If it is determined that meeting first preset relation, it is determined that the central pixel point Default variation whether occurs compared with not including at least one of every a line of central point pixel in the preset window;If It determines and the default variation occurs, it is determined that the pixel of two adjacent different colours is in every a line of the preset window The second preset relation of no satisfaction;If it is determined that meeting the second preset relation, it is determined that image includes moire fringes in the preset window Pixel;
Or, judge four of the image in the preset window it is diagonal on corresponding four values of pixel in most Whether big value and minimum value meet the first preset relation;If it is determined that meeting first preset relation, it is determined that the middle imago Whether vegetarian refreshments occurs default change compared with not including at least one of each row of central point pixel in the preset window Change;If it is determined that the default variation occurs, it is determined that the pixel of two neighboring different colours in each row of the preset window Whether point meets the second preset relation;If it is determined that meeting the second preset relation, it is determined that image includes and rubs in the preset window That line pixel;
Or, judge four of the image in the preset window it is diagonal on corresponding four values of pixel in most Whether big value and minimum value meet the first preset relation;If it is determined that meeting first preset relation, it is determined that the default window Whether the central pixel point occurs compared with other at least one pixels on the oblique line on each oblique line that mouth includes Default variation;If it is determined that the default variation occurs, it is determined that two adjacent pixels on each oblique line of the preset window Whether point meets third preset relation;If it is determined that meeting the third preset relation, it is determined that image packet in the preset window Pixel containing moire fringes;Wherein, the oblique line is to include the diagonal line of central point in the preset window, and put down with the diagonal line Other capable oblique lines.
Optionally, if the judging result indicates that the central pixel point is not first color component, it is determined that institute State whether image in preset window includes moire fringes pixel, including:
The preset window horizontally and vertically on, respectively determine the preset window in image respectively with The central pixel point is adjacent, and the situation of change of identical two pixels of color;
If it is determined that horizontally and vertically the upper situation of change occurred meets the 4th preset relation, it is determined that described pre- If whether any second pixel occurs default variation compared with third pixel in window;Wherein, second pixel Color is identical as the color of the central pixel point, and the third pixel is that the color adjacent with second pixel is divided Amount, and the color of the two is identical;
If it is determined that the default variation occurs, it is determined that the phase on every a line of the preset window, each row and oblique line Whether two adjacent pixels meet the 5th preset relation;Wherein, it includes the diagonal of central point that the oblique line, which is on the window, Line and other oblique lines parallel with the diagonal line;
If it is determined that meeting the 5th preset relation, it is determined that image includes moire fringes pixel in the preset window.
Optionally, however, it is determined that include moire fringes pixel, then according to comprising moire fringes pixel quantity, determine described each Whether image-region is moire fringes region, including:
If the sum of quantity of moire fringes pixel in any image region is more than predetermined threshold value, it is determined that any image Region is the moire fringes region.
Second aspect, provides a kind of inhibition equipment of image moire fringes, which includes:
Division unit, for pending image to be divided at least two image-regions;
Determination unit, for traversing each image-region at least two image-region using preset window, time During going through, determine whether image includes moire fringes pixel in the preset window;If it is determined that comprising moire fringes pixel, then basis Including moire fringes pixel quantity, determine whether each image-region is moire fringes region;If any image region is Moire fringes region determines the original pixel value after the moire fringes pixel removal moire fringes for including in the moire fringes region;
Unit is eliminated, for utilizing the original pixel value into row interpolation, to eliminate described each the moire fringes pixel Moire fringes in image-region.
Optionally, the preset window is j × k windows, wherein j and k is the odd number more than or equal to 3;It is described determining single Member is specifically used for:
Judge whether the central pixel point of image in the preset window is the first color component, and obtains judging result; Wherein, first color component is any one in red component, green component and blue component;
Determine whether image includes mole in the preset window using different preset rules according to the judging result Line pixel.
Optionally, if the judging result indicates that the central pixel point is first color component, it is determined that unit It is specifically used for:
Judge four of image in the preset window it is diagonal on corresponding four values of pixel in maximum value Whether meet the first preset relation with minimum value;If it is determined that meeting first preset relation, it is determined that the central pixel point Default variation whether occurs compared with not including at least one of every a line of central point pixel in the preset window;If It determines and the default variation occurs, it is determined that the pixel of two adjacent different colours is in every a line of the preset window The second preset relation of no satisfaction;If it is determined that meeting the second preset relation, it is determined that image includes moire fringes in the preset window Pixel;
Or, judge four of the image in the preset window it is diagonal on corresponding four values of pixel in most Whether big value and minimum value meet the first preset relation;If it is determined that meeting first preset relation, it is determined that the middle imago Whether vegetarian refreshments occurs default change compared with not including at least one of each row of central point pixel in the preset window Change;If it is determined that the default variation occurs, it is determined that the pixel of two neighboring different colours in each row of the preset window Whether point meets the second preset relation;If it is determined that meeting the second preset relation, it is determined that image includes and rubs in the preset window That line pixel;
Or, judge four of the image in the preset window it is diagonal on corresponding four values of pixel in most Whether big value and minimum value meet the first preset relation;If it is determined that meeting first preset relation, it is determined that the default window Whether the central pixel point occurs compared with other at least one pixels on the oblique line on each oblique line that mouth includes Default variation;If it is determined that the default variation occurs, it is determined that two adjacent pixels on each oblique line of the preset window Whether point meets third preset relation;If it is determined that meeting the third preset relation, it is determined that image packet in the preset window Pixel containing moire fringes;Wherein, the oblique line is to include the diagonal line of central point in the preset window, and put down with the diagonal line Other capable oblique lines.
Optionally, if the judging result indicates that the central pixel point is not first color component, it is determined that single Member is specifically used for:
The preset window horizontally and vertically on, respectively determine the preset window in image respectively with The central pixel point is adjacent, and the situation of change of identical two pixels of color;
If it is determined that horizontally and vertically the upper situation of change occurred meets the 4th preset relation, it is determined that described pre- If whether any second pixel occurs default variation compared with third pixel in window;Wherein, second pixel Color is identical as the color of the central pixel point, and the third pixel is that the color adjacent with second pixel is divided Amount, and the color of the two is identical;
If it is determined that the default variation occurs, it is determined that the phase on every a line of the preset window, each row and oblique line Whether two adjacent pixels meet the 5th preset relation;Wherein, it includes the diagonal of central point that the oblique line, which is on the window, Line and other oblique lines parallel with the diagonal line;
If it is determined that meeting the 5th preset relation, it is determined that image includes moire fringes pixel in the preset window.
Optionally, the determination unit is specifically used for:
If the sum of quantity of moire fringes pixel in any image region is more than predetermined threshold value, it is determined that any image Region is the moire fringes region.
The third aspect, provides a kind of inhibition equipment of image moire fringes, which includes:
At least one processor, and
The memory being connect at least one processor;
Wherein, the memory is stored with the instruction that can be executed by least one processor, at least one place It manages device and realizes such as first aspect any one of them method by executing the instruction of the memory storage.
Fourth aspect provides a kind of computer storage media, is stored thereon with computer program, the computer program quilt Such as first aspect any one of them method is realized when processor executes.
An embodiment of the present invention provides a kind of suppressing method of new image moire fringes, which utilizes preset window Pending image is traversed, and in ergodic process, determine whether the image in preset window includes moire fringes pixel.Pass through Piecemeal is carried out to image, is determining whether every piece of image-region includes moire fringes pixel, so that it is determined that whether image-region rubs That line region.It is more accurate to the judgement in moire fringes region in this way.If it is judged that moire fringes region, then can utilize original image Element is worth to moire fringes pixel into row interpolation, to eliminate the moire fringes in image-region.I.e. just for moire fringes pixel at Reason, and for non-moire fringes pixel without processing, the image picture quality obtained in this way is more preferable.
Description of the drawings
Fig. 1 is the flow chart of the suppressing method of image moire fringes provided in an embodiment of the present invention;
Fig. 2 is that the image that the prior art provides carries out the pixel name figure after color gamut conversion;
Fig. 3 is a kind of structural schematic diagram of preset window provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of preset window provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of preset window provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of preset window provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of the inhibition equipment of image moire fringes provided in an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of the inhibition equipment of image moire fringes provided in an embodiment of the present invention.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described.
Currently, inhibiting the moire fringes of image by adding a low-pass filter before the camera lens of equipment.But this side Method simultaneously also can also filter the pixel of non-moire fringes in image, this will so that image is fuzzy, reduce the clear of image Degree so that image frame it is second-rate.
In consideration of it, an embodiment of the present invention provides a kind of suppressing methods and equipment of image moire fringes, wherein suppressing method Pending image is traversed using preset window, and in ergodic process, determine whether the image in preset window includes mole Line pixel.I.e. by carrying out piecemeal to image, determining whether every piece of image-region includes moire fringes pixel, so that it is determined that image Whether region is moire fringes region.It is more accurate to the judgement in moire fringes region in this way.If it is judged that moire fringes region, then may be used To utilize original pixel value to moire fringes pixel into row interpolation, to eliminate the moire fringes in image-region.I.e. just for mole Line pixel is handled, and for non-moire fringes pixel without processing, the image picture quality obtained in this way is more preferable.
Technical solution provided in an embodiment of the present invention is introduced with reference to the accompanying drawings of the specification.
Fig. 1 is referred to, an embodiment of the present invention provides a kind of suppressing method of image moire fringes, which can lead to The electronic equipment with computing capability is crossed to execute.The flow of the suppressing method is described as follows:
S101:Pending image is divided at least two image-regions;
S102:Each image-region at least two image-regions is traversed using preset window, in ergodic process, is determined Whether image includes moire fringes pixel in preset window;
S103:If it is determined that comprising moire fringes pixel, then according to comprising moire fringes pixel quantity, determine each image district Whether domain is moire fringes region;
S104:If any image region is moire fringes region, the moire fringes pixel removal for including in moire fringes region is determined Original pixel value after moire fringes;
S105:The moire fringes in each image-region are eliminated into row interpolation to moire fringes pixel using original pixel value.
In general, in image processing process, image can be inevitably amplified, be exactly to change a pixel in image Or map to another position.Image size change need increase either reduce total pixel number and increase pixel or Reduce pixel, it is necessary to realize by the means of image interpolation.Image interpolation is exactly unknown with known pixel point estimation Pixel, to be compensated to certain pixels.And image is during interpolation, is easy to certain scenes, such as shutter, Clarity card etc. generates moire fringes false colour so that image is that not enough clearly, or even can not identify these for these scenes Scene.
It should be noted that the image in the embodiment of the present invention refers to the original image inside camera sensor, i.e., The image of bayer raw formats.And a pixel of the image of bayer raw formats only has a kind of color, usually to bayer The image of raw formats is into after row interpolation so that a pixel includes three kinds of colors, such as red, green and blue, to aobvious A variety of colors is shown.
The embodiment of the present invention, into before row interpolation, can carry out moire fringes identification, and inhibit image to image to image On moire fringes, to obtain clearly image frame.
Specifically, pending image can be divided at least two image-regions by the embodiment of the present invention, be recycled pre- If window traverse at least two image-regions in each image-region, in ergodic process determine preset window in image whether Including moire fringes pixel, and then determine the moire fringes region that image includes, to mole for determining to include in moire fringes region Line pixel is inhibited.
In possible embodiment, pending image can be divided at least by the embodiment of the present invention by rectangular window Two image-regions.For example, inventive embodiments can be n by length, the rectangular window division of width m, i.e. n × m are pending Image, obtain at least two graphics fields, wherein the length of each image-region is n, and width m, n and m may each be pre- It first sets, the value of n and m may each be rule of thumb or test obtained possible values.
Each image-region that the embodiment of the present invention can obtain after division carries out the judgement of moire fringes, that is, judges each Whether image-region is moire fringes region.It is that regionally, i.e. moire fringes pixel is generally focused on since moire fringes generally occur within Subregion in one image-region.Only simply judge whether an image-region includes moire fringes pixel, so that it may It can cause to judge by accident or fail to judge.
For example, refer to Fig. 2, Fig. 2 be the prior art provide to moire fringes region decision when, colour gamut is carried out to image and is turned Pixel name figure after change.In the prior art, when to moire fringes region decision, the first image was subjected to color gamut conversion before this, To generate the second image based on RGB colour gamut, as shown in Figure 2.Then, it if the first image has moire fringes region, is directed to The multiple sub-pixels of part in the moire fringes region of the second image compensate, to generate the second image, wherein the second image rubs Your line region corresponds to the moire fringes region of the first image.
In fig. 2, the prior art is by judging certain color in piece image region, such as the difference of green pixel values The difference of other green pixel values determines whether the region is moire fringes region in value and the region.Only it is only simple in this way Ground compares the difference of the difference of certain green pixel values and other green pixel values in the region in a region, for area in flakes The judgement of the moire fringes pixel in domain, then it is non-moire fringes pixel that a part of moire fringes pixel, which is possible to be judged to be broken into,.Example Such as, a part of moire fringes pixel just account for the total pixel in certain subregion ratio it is smaller, then this part moire fringes pixel is just It can be identified as normal moire fringes pixel, to cause to fail to judge or misjudge.
In consideration of it, the embodiment of the present invention can traverse each image district at least two image-regions by preset window Domain traverses the image-region in the window of each n × m, and in ergodic process, determine in preset window image whether include Moire fringes pixel.Each image-region is traversed by preset window in this way, so that it may to traverse mole that each image-region includes Line pixel can accurately identify the moire fringes pixel that the image-region includes, to reach for each image-region The accurate judgement in moire fringes region.
In possible embodiment, Fig. 3 is referred to, Fig. 3 is a kind of schematic diagram of preset window.Preset window can be j × k windows, wherein it can be preferably odd number that the value of j and k, which is more than or equal to 3, j and k, and certain j and k can also be even number.j Can be experience or experiment gained with the specific values of k.Fig. 3 in the embodiment of the present invention is by taking the value of j and k is 3 as an example.
During the embodiment of the present invention traverses each image-region using preset window, determine that image is in preset window No includes moire fringes pixel, can be determined from following three directions of preset window, the corresponding determining method in different directions Also different.Wherein, first direction is the horizontal direction of preset window, such as the line direction of preset window, such as Fig. 3 levels Shown in direction arrow.Second direction is the vertical direction of preset window, such as the column direction of preset window, such as Fig. 3 Vertical Squares Shown in arrow.Third direction is the oblique line directions of preset window, such as preset window includes the diagonal line place of central point Direction, as shown in Fig. 4 dotted lines direction.
And it is directed to different directions, during the embodiment of the present invention traverses each image-region using preset window, really Determine whether image in preset window includes moire fringes pixel, it is also different according to the difference of preset window central pixel point.This In inventive embodiments, the corresponding pixel of preset window central point is known as central pixel point.The embodiment of the present invention may determine that Whether the central pixel point of image is the first color component in preset window, and obtains judging result.Wherein, the first color component For any one in red component, green component and blue component.It is true using different preset rules further according to judging result Determine whether image in preset window includes moire fringes pixel.
In order to make it easy to understand, being directed to respectively so that the first color component is green component as an example in the embodiment of the present invention below Whether different directions, central pixel point are the first color components, how are introduced according to the different default windows of preset rules determination Whether image includes the mode of moire fringes pixel in mouthful.But the first color component is not limited to green component, can be red Component or blue component.
The first situation:
Judging result Deictic Center pixel is the first color component, then right respectively according to the different directions from preset window Answer different preset rules determine image in preset window whether the mode comprising moire fringes pixel have three ways, such as it is following.
In order to make it easy to understand, how the embodiment of the present invention by taking preset window shown in Fig. 3 as an example determines preset window if being introduced Whether interior image includes the mode of moire fringes pixel.Fig. 3 is referred to, Fig. 3 is a preset window by taking j=k=3 as an example. In Fig. 3, green component is indicated with letter " g ", red component is indicated with letter " r ", blue component is indicated with letter " b ".Fig. 3 In, the corresponding pixel of central point of preset window is " g3 " component, is green component.
The first method of determination:Determine whether image includes moire fringes in preset window from the horizontal direction of preset window Pixel.
After the embodiment of the present invention determines that central pixel point is the first color component, it can be determined that image in preset window Four it is diagonal on pixel it is whether similar, i.e., four it is diagonal on corresponding four values of pixel in maximum value and most Whether small value meets the first preset relation.In order to make it easy to understand, continuing with referring to Fig. 3, that is, judge " g1 " point in preset window Whether amount, " g2 " component, " g4 " component and " g5 " component are similar.
Specifically, it is first determined in " g1 " component, " g2 " component, " g4 " component four values corresponding with " g5 " component most Big value Vmax and minimum value Vmin.By judging whether Vmax and Vmin meets the first preset relation, so that it is determined that default window Whether " g1 " component, " g2 " component, " g4 " component and " g5 " component in mouthful are similar.In possible embodiment, if minimum value It is less than Vmax with the product of the first predetermined threshold value Tsim_thrd_g, it may be considered that " g1 " component, " g2 " component, " g4 " component Maximum value and minimum value in corresponding four values of " g5 " component meet the first preset relation, i.e., the four of image in preset window It is a it is diagonal on pixel it is similar.Wherein, the first predetermined threshold value Tsim_thrd_g can be a value being previously set, the value Size can be rule of thumb or specific experiment obtained by.
If in preset window four of image it is diagonal on pixel it is dissimilar, the central point of preset window corresponds to Pixel be not just moire fringes pixel.If in preset window four of image it is diagonal on pixel it is similar, it may be considered that The corresponding pixel of central point of preset window may be exactly moire fringes pixel, so as to continue to the corresponding pixel of central point into Row judges.
Specifically, the embodiment of the present invention if it is determined that in preset window four of image it is diagonal on pixel it is corresponding Maximum value and minimum value in four values meet the first preset relation, then continue to determine central pixel point and do not wrap in preset window At least one of every a line of central point pixel is included compared to whether default variation occurring, to further determine that in preset window Whether image includes moire fringes pixel.
In order to make it easy to understand, continuing with referring to Fig. 3, determining central pixel point and not including the every of central point in preset window At least one of a line pixel compared to whether default variation occurring, i.e., judge central point " g3 " component in preset window and The pixel of other rows in preset window, i.e. " g1 " component and " g2 " component, and compared with " g4 " component and " g5 " component whether Default variation occurs.For example, the embodiment of the present invention can determine in " g1 " component, " g2 " component and three pixels of " g3 " component Maximum value Vgmax1 and minimum value Vgmin1, and judge that whether meet Vgmax1 between Vgmax1 and Vgmin1 presets more than second The product of threshold value Tvar_thrd1 and Vgmin1.If Vgmax1 is more than the product of Tvar_thrd1 and Vgmin1, it may be considered that Default variation occurs for " g1 " component, " g2 " component and " g3 " component.Divide at this point, comparing " g3 " component, " g4 " component and " g5 " again Measure the maximum value Vgmax2 and minimum value Vgmin2 in three pixels, if meet Vgmax2 and be more than third predetermined threshold value Tvar_ The product of thrd2 and Vgmin2, if Vgmax2 is more than the product of Tvar_thrd2 and Vgmin2, it may be considered that " g3 " component, Default variation occurs for " g4 " component and " g5 " component.Default variation occurs for " if g1 " component, " g2 " component and " g3 " component, and Default variation also has occurred in " g3 " component, " g4 " component and " g5 " component, then can determine that " g3 " component in preset window can It can be moire fringes pixel, otherwise not be just moire fringes pixel.
The embodiment of the present invention can then continue to determine if it is determined that " g3 " component in preset window may be moire fringes pixel Whether the pixel of two adjacent different colours meets the second preset relation in every a line of preset window, if it is determined that meets Second preset relation can then determine that image includes moire fringes pixel in preset window.
Specifically, in order to make it easy to understand, continuing with referring to Fig. 3, adjacent in every a line of preset window two are determined not Whether the pixel with color meets the second preset relation, such as " g1 " component in the first row in preset window or " g2 " point Whether amount meets the second preset relation with " r0 " component.For example, the embodiment of the present invention can determine " g1 " component and " r0 " component Corresponding higher value Vgxmax0 and smaller value Vgxmin0, if it is default with third less than or equal to Vgxmin0 to meet Vgxmax0 The product of threshold value Tsim_thrd0 can determine if Vgxmax0 is less than or equal to the product of Vgxmin0 and Tsim_thrd0 " g1 " component and " r0 " component meet the second preset relation, it is understood that for the value phase of the value and " r0 " component of " g1 " component Seemingly.Wherein, Tsim_thrd0 can be rule of thumb or the value that obtains of experiment.
Similarly, the embodiment of the present invention can determine " g2 " component and " r0 " component, " g3 " component and " b1 " component, " g3 " point Whether amount and " b2 " component, " r3 " component and " g4 " component and " r3 " component and " g5 " component all meet the second default pass respectively System, it is similar whether method of determination and determination " g1 " component and " r0 " component meet the second preset relation, here in order to save length, It repeats no more.
The embodiment of the present invention is if it is determined that the pixel of two different colours adjacent in every a line of preset window all meets Second preset relation can then determine that the corresponding pixel of central point in preset window is moire fringes pixel.
The first above-mentioned method of determination is mainly described determines image in preset window from the horizontal direction of preset window Whether include moire fringes pixel.It is described below and determines whether image includes to rub in preset window from the vertical direction of preset window That line pixel, referring specifically to following second of method of determination.
Second of method of determination:Determine whether image includes moire fringes in preset window from the vertical direction of preset window Pixel.
After the embodiment of the present invention determines that central pixel point is the first color component, it can be determined that image in preset window Four it is diagonal on pixel it is whether similar, i.e., four it is diagonal on corresponding four values of pixel in maximum value and most Whether small value meets the first preset relation.It is specifically right respectively with the pixel in the determination four diagonally in the first method of determination It is identical whether maximum value in four values answered with minimum value meets the first preset relation.
In order to make it easy to understand, continuing with referring to Fig. 3, that is, judge " g1 " component, " g2 " component, " g4 " point in preset window Whether amount and " g5 " component are similar.Specifically, it is first determined " g1 " component, " g2 " component, " g4 " component are corresponding with " g5 " component Four value in maximum value Vmax and minimum value Vmin.By judging whether Vmax and Vmin meets the first preset relation, So that it is determined that whether " g1 " component, " g2 " component, " g4 " component and " g5 " component in preset window are similar.Possible embodiment party In formula, if minimum value and the product of the first predetermined threshold value Tsim_thrd_g are less than Vmax, it may be considered that " g1 " component, " g2 " Maximum value and minimum value in component, " g4 " component four values corresponding with " g5 " component meet the first preset relation, i.e., default Pixel on four of image in window are diagonal is similar.Wherein, the first predetermined threshold value Tsim_thrd_g can be previously set A value, the size of the value can be rule of thumb or obtained by specific experiment.
If in preset window four of image it is diagonal on pixel it is dissimilar, the central point of preset window corresponds to Pixel be not just moire fringes pixel.If in preset window four of image it is diagonal on pixel it is similar, it may be considered that The corresponding pixel of central point of preset window may be exactly moire fringes pixel, so as to continue to the corresponding pixel of central point into Row judges.
Specifically, the embodiment of the present invention if it is determined that in preset window four of image it is diagonal on pixel it is corresponding Maximum value and minimum value in four values meet the first preset relation, then continue to determine central pixel point and do not wrap in preset window At least one of each row of central point pixel is included compared to whether default variation occurring, to further determine that in preset window Whether image includes moire fringes pixel.
In order to make it easy to understand, continuing with referring to Fig. 3, determining central pixel point and not including the every of central point in preset window At least one of one row pixel compared to whether default variation occurring, i.e., judge central point " g3 " component in preset window and The pixel of other rows in preset window, i.e. " g1 " component and " g2 " component, and compared with " g4 " component and " g5 " component whether Default variation occurs.For example, the embodiment of the present invention can determine in " g1 " component, " g2 " component and three pixels of " g3 " component Maximum value Vgmax1 and minimum value Vgmin1, and judge that whether meet Vgmax1 between Vgmax1 and Vgmin1 presets more than second The product of threshold value Tvar_thrd1 and Vgmin1.If Vgmax1 is more than the product of Tvar_thrd1 and Vgmin1, it may be considered that Default variation occurs for " g1 " component, " g2 " component and " g3 " component.Divide at this point, comparing " g3 " component, " g4 " component and " g5 " again Measure the maximum value Vgmax2 and minimum value Vgmin2 in three pixels, if meet Vgmax2 and be more than third predetermined threshold value Tvar_ The product of thrd2 and Vgmin2, if Vgmax2 is more than the product of Tvar_thrd2 and Vgmin2, it may be considered that " g3 " component, Default variation occurs for " g4 " component and " g5 " component.Default variation occurs for " if g1 " component, " g2 " component and " g3 " component, and Default variation also has occurred in " g3 " component, " g4 " component and " g5 " component, then can determine that " g3 " component in preset window can It can be moire fringes pixel, otherwise not be just moire fringes pixel.
The embodiment of the present invention can then continue to determine if it is determined that " g3 " component in preset window may be moire fringes pixel Whether the pixel of two adjacent different colours meets the second preset relation in each row of preset window, if it is determined that meets Second preset relation can then determine that image includes moire fringes pixel in preset window.
Specifically, in order to make it easy to understand, continuing with referring to Fig. 3, adjacent in each row of preset window two are determined not Whether the pixel with color meets the second preset relation, such as " g1 " component in the first row in preset window or " g4 " point Whether amount meets the second preset relation with " b1 " component.For example, the embodiment of the present invention can determine " g1 " component and b1 " component pair The higher value Vgxmax0 and smaller value Vgxmin0 answered, if meet Vgxmax0 and be less than or equal to Vgxmin0 and the 4th default threshold The product of value Tsim_thrd0 can determine if Vgxmax0 is less than or equal to the product of Vgxmin0 and Tsim_thrd0 " g1 " component and " b1 " component meet the second preset relation, it is understood that for the value phase of the value and " b1 " component of " g1 " component Seemingly.Wherein, Tsim_thrd0 can be rule of thumb or the value that obtains of experiment.
Similarly, the embodiment of the present invention can determine " g3 " component and " r0 " component, " g3 " component and " r3 " component, " g2 " point Whether amount and " b2 " component, " g5 " component and " b2 " component all meet the second preset relation, method of determination and determination " g1 " respectively It is similar whether component and " b1 " component meet the second preset relation, here in order to save length, repeats no more.
The embodiment of the present invention is if it is determined that the pixel of two different colours adjacent in each row of preset window all meets Second preset relation can then determine that the corresponding pixel of central point in preset window is moire fringes pixel.
Above-mentioned second of method of determination is mainly described determines image in preset window from the vertical direction of preset window Whether include moire fringes pixel.It is described below and determines whether image includes to rub in preset window from the oblique line directions of preset window That line pixel, referring specifically to the third method of determination.In the embodiment of the present invention, the oblique line directions of preset window refer to default window Mouth includes the direction where the diagonal line of central point, and the direction of the oblique line parallel with diagonal line.Wherein, oblique line can be for example Dotted line shown in Fig. 4, oblique line more than one, oblique line shown in Fig. 4 share 5, use oblique line 1, oblique line 2, oblique line 3, oblique line 4 respectively And oblique line 5 is illustrated.
The third method of determination:Determine whether image includes moire fringes in preset window from the oblique line directions of preset window Pixel.
After the embodiment of the present invention determines that central pixel point is the first color component, it can be determined that image in preset window Four it is diagonal on pixel it is whether similar, i.e., four it is diagonal on corresponding four values of pixel in maximum value and most Whether small value meets the first preset relation.It is specifically diagonal with the determination four in the first method of determination or second of method of determination On corresponding four values of pixel in maximum value with minimum value whether to meet the first preset relation identical.
In order to make it easy to understand, continuing with referring to Fig. 3, that is, judge " g1 " component in preset window and " g5 " component, and Whether " g2 " component and this two group component of " g4 " component are similar.Specifically, it is first determined in " g1 " component and " g5 " component most Big value Vmax and minimum value Vmin.By judging whether Vmax and Vmin meets the first preset relation, so that it is determined that default window Whether " g1 " component and " g5 " component in mouthful are similar.Similarly, it may be determined that " g2 " component maximum value corresponding with " g4 " component Vmax and minimum value Vmin.By judging whether Vmax and Vmin meets the first preset relation, so that it is determined that in preset window " g1 " component and " g4 " component it is whether similar.In possible embodiment, if minimum value and the first predetermined threshold value Tsim_ The product of thrd_g is less than Vmax, it may be considered that " g1 " component maximum value corresponding with " g5 " component and minimum value meet first Preset relation, " g2 " component maximum value corresponding with " g4 " component and minimum value meet the first preset relation, i.e., in preset window Pixel on four of image are diagonal is similar.Wherein, the first predetermined threshold value Tsim_thrd_g can be one be previously set The size of value, the value can be rule of thumb or obtained by specific experiment.
If in preset window four of image it is diagonal on pixel it is dissimilar, the central point of preset window corresponds to Pixel be not just moire fringes pixel.If in preset window four of image it is diagonal on pixel it is similar, it may be considered that The corresponding pixel of central point of preset window may be exactly moire fringes pixel, so as to continue to the corresponding pixel of central point into Row judges.
Specifically, the embodiment of the present invention if it is determined that in preset window four of image it is diagonal on pixel it is corresponding Maximum value and minimum value in four values meet the first preset relation, then in continuing on each oblique line that determining preset window includes Whether imago vegetarian refreshments occurs default variation compared with other at least one pixels on oblique line, to further determine that preset window Whether interior image includes moire fringes pixel.
In order to make it easy to understand, Fig. 4 is referred to, on each oblique line for illustrating introduction how to determine that preset window includes with Fig. 4 Whether central pixel point occurs default variation compared with other at least one pixels on oblique line.Fig. 4 is by taking j=k=3 as an example A preset window.In Fig. 4, green component is indicated with letter " g ", red component is indicated with letter " r ", with alphabetical " b " Indicate blue component.In Fig. 4, the corresponding pixel of central point of preset window is " g3 " component, is green component.In Fig. 4 In, determine on each oblique line that preset window includes central pixel point compared with other at least one pixels on oblique line whether Default variation occurs, in actually determining on a certain oblique line in oblique line 1, oblique line 2, oblique line 3, oblique line 4 and oblique line 5 Whether imago vegetarian refreshments occurs default variation compared at least one pixel on other oblique lines.
In Fig. 4, since oblique line 1 and oblique line 5 are there are one pixel, oblique line 1 and oblique line 5 are not just made herein Consider.And just without central pixel point, i.e. green component on oblique line 2 and oblique line 4, therefore, oblique line 2 and oblique line 4 are herein It is not considered.So only having on oblique line 3 has 3 green components, therefore, in the embodiment of the present invention, determines what preset window included Whether central pixel point occurs default variation compared with other at least one pixels on oblique line on each oblique line, that is, judges pre- If whether " g2 " component on central point " g3 " component oblique line 3 in window is compared with " g4 " component occurs default variation.For example, The embodiment of the present invention can determine maximum value Vgmax1 and minimum in " g2 " component, " g3 " component and three pixels of " g4 " component Value Vgmin1, and judge whether to meet between Vgmax1 and Vgmin1 Vgmax1 more than the 5th predetermined threshold value Tvar_thrd1 with The product of Vgmin1.If Vgmax1 is more than the product of Tvar_thrd1 and Vgmin1, it may be considered that " g2 " component, " g3 " component Default variation occurs for " g4 " component.At this point, can then determine that " g3 " component in preset window may be moire fringes pixel, it is no It is not just then moire fringes pixel.
The embodiment of the present invention can then continue to determine if it is determined that " g3 " component in preset window may be moire fringes pixel Whether two adjacent pixels meet the second preset relation on each oblique line of preset window, if the embodiment of the present invention determines Two adjacent pixels meet the second preset relation on each oblique line of preset window, then the embodiment of the present invention can determine Image includes moire fringes pixel in preset window.
Specifically, in order to make it easy to understand, continuing with referring to Fig. 4, in Fig. 4, since there are one pictures for oblique line 1 and oblique line 5 Vegetarian refreshments, therefore, oblique line 1 and oblique line 5 are just not considered herein.Include two pixels for oblique line 2 and oblique line 4. By taking oblique line 2 as an example, oblique line 2 includes " r0 " component and " b1 " component.The embodiment of the present invention determines on each oblique line of preset window Whether two adjacent pixels meet the second preset relation, and it is pre- to be just to determine whether " r0 " component and " b1 " component meet second If relationship.
For example, the embodiment of the present invention can determine " r0 " component higher value Vgxmax0 corresponding with " b1 " component and smaller Value Vgxmin0, if meet the product that Vgxmax0 is less than or equal to Vgxmin0 and the 4th predetermined threshold value Tsim_thrd0, if Vgxmax0 is less than or equal to the product of Vgxmin0 and Tsim_thrd0, then can determine that " r0 " component and " b1 " component meet the Two preset relations, it is understood that similar with the value of " b1 " component for the value of " r0 " component.Wherein, Tsim_thrd0 can be root The value obtained according to experience or experiment.
Similarly, the embodiment of the present invention can determine " g3 " point on " r3 " component and " b2 " component, oblique line 3 on oblique line 4 Whether amount and " g2 " component and " g3 " component and " g4 " component all meet the second preset relation, method of determination and determination respectively It is similar whether " r0 " component and " b1 " component meet the second preset relation, here in order to save length, repeats no more.
The embodiment of the present invention is if it is determined that two pixels satisfaction second adjacent on each oblique line of preset window is default Relationship, then the embodiment of the present invention can determine that the corresponding pixel of central point in preset window is moire fringes pixel.
If it is the first color component that front describes judging result Deictic Center pixel respectively, according to from preset window Different directions correspond to different preset rules and determine whether image in preset window includes three kinds of determinations of moire fringes pixel respectively Mode.The embodiment of the present invention can determine whether image wraps in preset window by any one in above-mentioned three kinds of methods of determination Pixel containing moire fringes.Alternatively, in possible embodiment, the embodiment of the present invention can be in conjunction with two in above-mentioned three kinds of methods of determination Whether image includes moire fringes pixel in kind or three kinds of determining preset windows.
If it is not the first color component that judging result Deictic Center pixel, which is described below, according to the difference from preset window Direction corresponds to how different preset rules determine whether image includes moire fringes pixel in preset window respectively.
The second situation:
Judging result Deictic Center pixel is not the first color component, then distinguishes according to from the different directions of preset window Corresponding different preset rules determine in preset window image whether the mode comprising moire fringes pixel have three ways, such as it is following.For Be easy to understand, below the embodiment of the present invention introduce how to determine image in preset window by taking preset window shown in fig. 5 as an example Whether the mode of moire fringes pixel is included.Fig. 5 is referred to, Fig. 5 is a preset window by taking j=k=3 as an example.In Figure 5, Green component is indicated with letter " g ", red component is indicated with letter " r ", and blue component is indicated with letter " b ".In Fig. 5, preset The corresponding pixel of central point of window is " g3 " component, is green component.
The first method of determination:Determine whether image includes moire fringes in preset window from the horizontal direction of preset window Pixel.
It, can be in the level side of preset window after the embodiment of the present invention determines central pixel point not and be the first color component To in vertical direction, judge that image is adjacent with central pixel point respectively in preset window respectively, and identical two pictures of color The situation of change of vegetarian refreshments, and determine preset window horizontally and vertically on, image is respectively in preset window Imago vegetarian refreshments is adjacent, and whether the situation of change of identical two pixels of color is consistent.If for example, in the level of preset window On direction and vertical direction, image is adjacent with central pixel point respectively in preset window, and identical two pixels of color Value is all decreased or increased, it is believed that is that the two situation of change is consistent.It the above is only citing, situation of change unanimously specifically can root It is determined according to actual conditions.Wherein, identical two pixels of color refer to identical as the color of the first color component.
In order to make it easy to understand, continuing with referring to Fig. 5, the embodiment of the present invention determines pre- in the horizontal direction of preset window If image in window is adjacent with central pixel point respectively, and the situation of change of identical two pixels of color, it can be understood as The situation of change of " g2 " component adjacent with " b2 " component in preset window and " g3 " component is judged in the horizontal direction.The present invention Embodiment determines that image is adjacent with central pixel point respectively in preset window, and color phase in the vertical direction of preset window The situation of change of two same pixels, it can be understood as judge in vertical direction adjacent with " b2 " component in preset window The situation of change of " g1 " component and " g4 " component.
Specifically, by taking Fig. 5 as an example, the embodiment of the present invention can determine the higher value Vxmax0 of " g2 " component and " g3 " component With smaller value Vxmin0, compare the product whether Vxmax0 is less than or equal to the 6th predetermined threshold value Txsim_thrd0 and Vxmin0.Together Reason, the embodiment of the present invention can determine the higher value Vxmax1 and smaller value Vxmin1 of " g1 " component and " g4 " component, compare Whether Vxmax1 is less than or equal to the product of the 7th predetermined threshold value Txsim_thrd1 and Vxmin1.If Vxmax0 is less than or equal to The product of Txsim_thrd0 and Vxmin0, and Vxmax1 is less than or equal to the product of Txsim_thrd1 and Vxmin1, then can recognize For pixel adjacent with central pixel point in preset window, the situation of change occurred in the horizontal direction and the vertical direction meets 4th preset relation.
If it is determined that the interior pixel adjacent with central pixel point of preset window occurred in the horizontal direction and the vertical direction Situation of change meets the 4th preset relation, then can continue to judge any second pixel and third pixel phase in preset window Than whether default variation occurring.Wherein, the color of the second pixel and the color of central pixel point are identical, third pixel be with The adjacent color component of second pixel, and the color of the two is identical.In order to make it easy to understand, continuing with referring to Fig. 5, that is, judge pre- If the situation of change of the value of g components g components adjacent with other in window.
Corresponding horizontal direction:If the value of " g2 " component is more than the value of " g1 " component, the embodiment of the present invention judges to preset window Whether any second pixel occurs default variation compared with third pixel in mouthful, exactly judges whether the value of " g2 " component is big In the product of the value and predetermined threshold value Tgvar_thrd0 of " g1 " component, and judge whether the value of " g2 " component is more than " g4 " component Product, the value of " g3 " component of value and predetermined threshold value Tgvar_thrd0 whether be more than the value and predetermined threshold value of " g1 " component Whether the product of Tgvar_thrd0 and the value of " g2 " component are more than the value of " g4 " component and multiplying for predetermined threshold value Tgvar_thrd0 Product.If above-mentioned condition meets simultaneously, it may be considered that the central pixel point of the image in preset window may be moire fringes pixel, Judge at this point, the embodiment of the present invention can carry out subsequent moire fringes pixel.Tgvar_thrd0 is preset parameter value.
On the contrary, if the value of " g2 " component is less than the value of " g1 " component, the embodiment of the present invention judges any in preset window Whether the second pixel occurs default variation compared with third pixel, exactly judges whether the value of " g1 " component is more than " g2 " point The product of the value and predetermined threshold value Tgvar_thrd0 of amount, and judge the value of " g1 " component whether be more than the value of " g3 " component with it is pre- If whether the product of threshold value Tgvar_thrd0, the value of " g4 " component are more than the value and predetermined threshold value Tgvar_thrd0 of " g2 " component Product and " g4 " component value whether be more than " g3 " component value and predetermined threshold value Tgvar_thrd0 product.If above-mentioned item Part meets simultaneously, it may be considered that the central pixel point of the image in preset window may be moire fringes pixel, at this point, of the invention Embodiment can carry out subsequent moire fringes pixel and judge.Tgvar_thrd0 is preset parameter value.
If above-mentioned condition meets simultaneously, the embodiment of the present invention can determine adjacent two in every a line of preset window Whether a pixel meets the 5th preset relation, if the embodiment of the present invention determines adjacent two in every a line of preset window Pixel meets the 5th preset relation, then can determine that image includes moire fringes pixel in preset window.
In order to make it easy to understand, continuing with referring to Fig. 5, the embodiment of the present invention determines adjacent in every a line of preset window Whether two pixels meet the 5th preset relation, it can be understood as are to determine unidirectional green g components and other pixels Whether the value of component is similar.For example, in Figure 5, the embodiment of the present invention can determine the higher value of " g1 " component and " r0 " component Vbmax0 and smaller value Vbmin0, judges whether Vbmax0 is less than or equal to the product of Vbmin0 and Tbvar_thrd0, if Vbmax0 Less than or equal to the product of Vbmin0 and Tbvar_thrd0, then it can determine that " g1 " component is similar with " r0 " component.Similarly, this hair Bright embodiment can determine " g1 " component and " r1 " component, " g1 " component and " r3 " component and " g1 " component and " r4 " component respectively Whether similar, whether method of determination and determination " g1 " component and " r0 " component are similar identical.
If it is determined that unidirectional green g components and the value of other pixel components are all similar, then the embodiment of the present invention can be with Determine that the corresponding pixel of the central point of preset window may be moire fringes pixel.In order to further determine the central point of preset window Whether corresponding pixel is moire fringes pixel, and the embodiment of the present invention can also determine the corresponding pixel component of central point i.e. " b2 " points The higher value Vbmax2 and smaller value Vbmin2 of amount and " g2 " component, judge whether Vbmax2 is less than or equal to Vbmin2 and Tbvar_ The product of thrd2, if Vbmax2 be less than or equal to Vbmin2 and Tbvar_thrd2 product, can determine " b2 " component with " g2 " component is similar, can determine that the corresponding pixel of the central point of preset window is moire fringes pixel at this time.
The first above-mentioned method of determination is mainly described determines image in preset window from the horizontal direction of preset window Whether include moire fringes pixel.It is described below and determines whether image includes to rub in preset window from the vertical direction of preset window That line pixel, referring specifically to second of method of determination.
Second of method of determination:Determine whether image includes moire fringes in preset window from the vertical direction of preset window Pixel.
It, can be in the level side of preset window after the embodiment of the present invention determines central pixel point not and be the first color component To in vertical direction, judge that image is adjacent with central pixel point respectively in preset window respectively, and identical two pictures of color The situation of change of vegetarian refreshments.In order to make it easy to understand, continuing with referring to Fig. 5, i.e., judge in the horizontal direction in preset window with " b2 " The situation of change of component adjacent " g2 " component and " g3 " component, and judge in vertical direction in preset window with " b2 " component The situation of change of adjacent " g1 " component and " g4 " component.
Specifically, the embodiment of the present invention can determine the higher value Vxmax0 and smaller value of " g2 " component and " g3 " component Vxmin0 compares the product whether Vxmax0 is less than or equal to the 6th predetermined threshold value Txsim_thrd0 and Vxmin0.Similarly, this hair Bright embodiment can determine the higher value Vxmax1 and smaller value Vxmin1 of " g1 " component and " g4 " component, whether compare Vxmax1 Less than or equal to the product of the 7th predetermined threshold value Txsim_thrd1 and Vxmin1.If Vxmax0 be less than or equal to Txsim_thrd0 with The product of Vxmin0, and Vxmax1 be less than or equal to Txsim_thrd1 and Vxmin1 product, it may be considered that preset window in The adjacent pixel of central point, by taking green component as an example, the situation of change occurred in the horizontal direction and the vertical direction meets Fig. 5 4th preset relation.
If it is determined that the variation that the pixel adjacent with central point occurs in the horizontal direction and the vertical direction in preset window Situation meets the 4th preset relation, then can continue to judge that any second pixel is compared with third pixel in preset window It is no that default variation occurs.Wherein, the color of the second pixel and the color of central pixel point are identical, and third pixel is and second The adjacent color component of pixel, and the color of the two is identical.In order to make it easy to understand, continuing with referring to Fig. 5, that is, judge to preset window The situation of change of the value of g components g components adjacent with other in mouthful.
Corresponding vertical direction, if the value of " g1 " component is more than the value of " g2 " component, judge " g1 " component value whether More than the product of the value and predetermined threshold value Tgvar_thrd0 of " g2 " component, and judge whether the value of " g1 " component is more than " g3 " point Whether the value of amount is more than the value and predetermined threshold value of " g2 " component with the product of predetermined threshold value Tgvar_thrd0, the value of " g4 " component Whether the product of Tgvar_thrd0 and the value of " g4 " component are more than the value of " g3 " component and multiplying for predetermined threshold value Tgvar_thrd0 Product.If above-mentioned condition meets simultaneously, carries out subsequent moire fringes pixel and judge.Tgvar_thrd0 is preset parameter value.
If the value of " g1 " component is less than the value of " g2 " component, judge whether the value of " g2 " component is more than " g1 " component The product of value and predetermined threshold value Tgvar_thrd0, and judge whether the value of " g2 " component is more than the value of " g4 " component and default threshold Whether the product of value Tgvar_thrd0, the value of " g3 " component are more than the value of " g1 " component and multiplying for predetermined threshold value Tgvar_thrd0 Whether product and the value of " g3 " component are more than the product of the value and predetermined threshold value Tgvar_thrd0 of " g4 " component.If above-mentioned condition is same When meet, then carry out subsequent moire fringes pixel and judge.Tgvar_thrd0 is preset parameter value.
If above-mentioned condition meets simultaneously, it is determined that whether two adjacent pixels in every a line of preset window meet 5th preset relation, however, it is determined that two adjacent pixels in every a line of preset window meet the 5th preset relation, then may be used To determine, image includes moire fringes pixel in preset window.
In order to make it easy to understand, continuing with referring to Fig. 5, determine that two adjacent pixels on each row of preset window are The 5th preset relation of no satisfaction determines whether unidirectional green g components are similar to the value of other pixel components.For example, The embodiment of the present invention can determine the higher value Vbmax0 and smaller value Vbmin0 of " r0 " component and " g2 " component, judge Vbmax0 Whether the product of Vbmin0 and Tbvar_thrd0 is less than or equal to, if Vbmax0 multiplying less than or equal to Vbmin0 and Tbvar_thrd0 Product, then can determine that " r0 " component is similar with " g2 " component.Similarly, the embodiment of the present invention can determine respectively " r1 " component and Whether " g2 " component, " r3 " component and " g2 " component and " r4 " component and " g2 " component are similar, method of determination and determination " r0 " point Whether amount and " g2 " component are similar.
If it is determined that unidirectional green g components and the value of other pixel components are all similar, then the embodiment of the present invention can be with Determine that the corresponding pixel of the central point of preset window may be moire fringes pixel.In order to further determine the central point of preset window Whether corresponding pixel is moire fringes pixel, and the embodiment of the present invention can also determine central pixel point i.e. " b2 " component and " g2 " point The higher value Vbmax2 and smaller value Vbmin2 of amount, judge whether Vbmax2 is less than or equal to multiplying for Vbmin2 and Tbvar_thrd2 Product can determine " b2 " component and " g2 " component phase if Vbmax2 is less than or equal to the product of Vbmin2 and Tbvar_thrd2 Seemingly, it can determine that the corresponding pixel of the central point of preset window is moire fringes pixel at this time.
Above-mentioned second of method of determination is mainly described determines image in preset window from the vertical direction of preset window Whether include moire fringes pixel.It is described below and determines whether image includes to rub in preset window from the oblique line directions of preset window That line pixel, referring specifically to the third method of determination.
The third method of determination:Determine whether image includes moire fringes in preset window from the oblique line directions of preset window Pixel.
It, can be in the level side of preset window after the embodiment of the present invention determines central pixel point not and be the first color component To in vertical direction, the situation of change of the pixel in preset window in image oblique line directions is determined respectively.For the ease of reason Solution, it is adjacent with central pixel point respectively with image in preset window in Fig. 5 continuing with referring to Fig. 5, and identical two pictures of color For vegetarian refreshments.The variation of " g2 " component adjacent with " b2 " component in preset window and " g3 " component is judged in the horizontal direction Situation, and the variation feelings of " g1 " component adjacent with " b2 " component in preset window and " g4 " component are judged in vertical direction Condition.
Specifically, the embodiment of the present invention can determine the higher value Vxmax0 and smaller value of " g2 " component and " g3 " component Vxmin0 compares the product whether Vxmax0 is less than or equal to the 6th predetermined threshold value Txsim_thrd0 and Vxmin0.Similarly, this hair Bright embodiment can determine the higher value Vxmax1 and smaller value Vxmin1 of " g1 " component and " g4 " component, whether compare Vxmax1 Less than or equal to the product of the 7th predetermined threshold value Txsim_thrd1 and Vxmin1.If Vxmax0 be less than or equal to Txsim_thrd0 with The product of Vxmin0, and Vxmax1 be less than or equal to Txsim_thrd1 and Vxmin1 product, it may be considered that preset window in The adjacent pixel of central point, by taking green component as an example, the situation of change occurred in the horizontal direction and the vertical direction meets Fig. 5 4th preset relation.
If it is determined that horizontally and vertically the upper situation of change occurred meets the 4th preset relation, then can continue Determine whether any second pixel occurs default variation compared with third pixel in preset window.Specific method of determination referring to The first method of determination and second of method of determination, which is not described herein again.
If it is determined that default variation occurs, then it can determine whether is two adjacent pixels on the oblique line of preset window Meet the 5th preset relation.Here oblique line may refer to oblique line as shown in FIG. 6.
In order to make it easy to understand, Fig. 6 is referred to, it is adjacent on the oblique line of preset window with how Fig. 6 signal introductions determine Whether two pixels meet the 5th preset relation.Fig. 6 is a preset window by taking j=k=3 as an example.In figure 6, with word Female " g " indicates green component, and red component is indicated with letter " r ", and blue component is indicated with letter " b ".In Fig. 6, preset window The corresponding pixel of central point be " g3 " component, be green component.In figure 6, the phase on the oblique line of preset window is determined Whether two adjacent pixels meet the 5th preset relation, actually determine oblique line 1, oblique line 2, oblique line 3, oblique line 4 and tiltedly Whether two adjacent pixels on every oblique line in line 5 meet the 5th preset relation.
In figure 6, since oblique line 1 and oblique line 5 are there are one pixel, oblique line 1 and oblique line 5 are not just made herein Consider.Therefore, just illustrate whether two adjacent pixels on oblique line meet by taking oblique line 2, oblique line 4 and oblique line 5 as an example here 5th preset relation.By taking oblique line 2 as an example, oblique line 2 includes " g1 " component and " g2 " component, is determined on each oblique line of preset window Whether two adjacent pixels meet the 5th preset relation, and it is pre- to be just to determine whether " g1 " component and " g2 " component meet the 5th If relationship.For example, the embodiment of the present invention can determine " g1 " component higher value Vgxmax0 corresponding with " g2 " component and smaller value Vgxmin0, if meet the product that Vgxmax0 is less than or equal to Vgxmin0 and predetermined threshold value Tsim_thrd0, if Vgxmax0 Less than or equal to the product of Vgxmin0 and Tsim_thrd0, then it is default can to determine that " g1 " component and " g2 " component meet second Relationship, it is understood that similar with the value of " g2 " component for the value of " g1 " component.Wherein, Tsim_thrd0 can be rule of thumb Or the value that experiment obtains.
Similarly, the embodiment of the present invention can determine that " g3 " component on oblique line 4 is preset with whether " g4 " component meets the 5th Relationship.It, then can be after if it is determined that " g1 " component and " g2 " component, and " g3 " component and " g4 " component meet the 5th preset relation It is continuous to determine whether " g1 " component and " g3 " component occur default variation.With continued reference to Fig. 6, that is, determine whether the value of " g1 " component is big In the product of the value and predetermined threshold value Tgvar_thrd0 of " g3 " component, if more than, it is determined that " g1 " component and " g3 " component occur Default variation.
Alternatively, the embodiment of the present invention can also determine " g1 " component and " g3 " component, and " g2 " component and " g4 " component Whether fiveth preset relation is met.If it is determined that " g1 " component and " g3 " component, and " g2 " component and " g4 " component meet the 5th Preset relation can then continue to determine whether " g1 " component and " g2 " component occur default variation.
The embodiment of the present invention then may be used if it is determined that pixel on each oblique line of preset window meets the 5th preset relation With continue to determine in preset window four of image it is diagonal on pixel it is whether similar, i.e., four it is diagonal on pixel whether Meet the first preset relation, so that it is determined that the corresponding pixel of the central point in preset window whether moire fringes pixel.
Continuing with referring to Fig. 6, that is, determine " r0 " component and " r4 " component in preset window, and " r1 " component and " r3 " Whether this two group component of component is similar.Specifically, it is first determined the maximum value Vmax in " r0 " component and " r4 " component, and most Small value Vmin.By judging whether Vmax and Vmin meets the first preset relation, so that it is determined that " r0 " component in preset window Whether " r4 " component is similar.Similarly, it may be determined that " r1 " component maximum value Vmax corresponding with " r3 " component and minimum value Vmin.By judging whether Vmax and Vmin meets the first preset relation, so that it is determined that " r1 " component in preset window and Whether " r3 " component is similar.In possible embodiment, if minimum value and the product of predetermined threshold value Tsim_thrd_g are less than Vmax, it may be considered that " r0 " component maximum value corresponding with " r4 " component and minimum value meet the first preset relation, " r1 " point Corresponding with " r3 " the component maximum value of amount and minimum value meet the first preset relation, i.e., in preset window four of image diagonally on Pixel it is similar.Wherein, the first predetermined threshold value Tsim_thrd_g can be a value being previously set, and the size of the value can To be rule of thumb or obtained by specific experiment.
Front is by taking the first color component is green component as an example, in the case where central pixel point is the first color component, It provides three kinds of methods of determination and determines whether the corresponding pixel of preset window central point is moire fringes pixel.And in central pixel point In the case of not being the first color component, provide three kinds of methods of determination determine the corresponding pixel of preset window central point whether be Moire fringes pixel.And since moire fringes pixel has sheet of characteristic under normal conditions.By presetting window in the embodiment of the present invention Mouth traverses each n × m image-regions, and by judging in ergodic process, the moire fringes pixel of image further may be used in preset window Whether it is moire fringes region with each n × m image-regions of determination, to carry out moire fringes pixel inhibition to moire fringes region.
In possible embodiment, the embodiment of the present invention can obtain preset window and traverse each n × m image-regions institute really The total quantity of fixed moire fringes pixel, if the sum of the quantity of moire fringes pixel in any n × m image-regions is preset more than some Threshold value, it is determined that any n × m image-regions may be moire fringes region.Wherein, some predetermined threshold value can be previously set One value, it is preferred that predetermined threshold value is the half of the quantity of the moire fringes pixel in any n × m image-regions.
Further, if the sum of the quantity of moire fringes pixel in any n × m image-regions is more than some predetermined threshold value, The embodiment of the present invention may further determine that whether the corresponding pixel of central point of any n × m image-regions meets above-mentioned be directed to Preset window, the judgement of the first method of determination or second of method of determination or the third method of determination to preset window, to Further determine that whether the corresponding pixel of central point of any n × m image-regions is moire fringes pixel.
If the sum of quantity of moire fringes pixel in any n × m image-regions is more than some predetermined threshold value, and the n × m Whether the corresponding pixel of central point of image-region is moire fringes pixel, then the embodiment of the present invention can determine n × m image districts Domain is moire fringes region.
Since the reacting condition of pixel value only has the distance of interlacing on the image, in this way to image into just leading after row interpolation There may be fresh after having caused the result after interpolation inevitably to there is error message, such as the subject image interpolation of original grayscale Gorgeous false colour, such as moire fringes.In order to avoid such case occurs, after the embodiment of the present invention determines some moire fringes region, It can determine the original pixel value after the moire fringes pixel removal moire fringes for including in the moire fringes region, it is original to utilize Pixel value is to moire fringes pixel into row interpolation.And original pixel value for pixel itself information expression be most accurately, because This, can eliminate moire fringes pixel into row interpolation by original pixel value the moire fringes in each image-region so that most The image frame obtained eventually is clear.
In possible embodiment, the embodiment of the present invention can be to nxm image-regions using high after obtaining original pixel value This spectral window or medium filtering window are filtered, and filter result is substituted to the original pixel value of the pixel, and what is obtained in this way is final Image frame can be more clear.
In conclusion an embodiment of the present invention provides a kind of suppressing method of new image moire fringes, suppressing method profit Pending image is traversed with preset window, and in ergodic process, determine whether the image in preset window includes moire fringes Pixel.I.e. by carrying out piecemeal to image, determining whether every piece of image-region includes moire fringes pixel, so that it is determined that image district Whether domain is moire fringes region.It is more accurate to the judgement in moire fringes region in this way.It, then can be with if it is judged that moire fringes region Using original pixel value to moire fringes pixel into row interpolation, to eliminate the moire fringes in image-region.I.e. just for moire fringes Pixel is handled, and for non-moire fringes pixel without processing, the image picture quality obtained in this way is more preferable.
The embodiment of the present invention carries out piecemeal processing to whole image first when determining moire fringes region, obtains at least one A nxm image-regions, then each nxm image-regions are traversed by preset window, and can be by presetting window in ergodic process Horizontal direction, vertical direction or the oblique line directions of mouth judge whether each nxm image-regions are moire fringes regions.To image block Processing, the characteristic to be occurred in flakes according to moire fringes so that the result of judgement is more accurate.And from the level side of preset window To, vertical direction and oblique line directions it is any it is reversed judge whether each nxm image-regions are moire fringes regions, judgment mode compared with To be flexible, diversification.
After the embodiment of the present invention determines moire fringes region, directly moire fringes pixel is inserted using original pixel value Value reduces to operate by color gamut conversion in the prior art and realizes that moire fringes inhibit the erroneous judgement being easy to cause and exception, to not It will produce image abnormity caused by inhibiting due to moire fringes.
Equipment provided in an embodiment of the present invention is introduced with reference to the accompanying drawings of the specification.
Fig. 7 is referred to, same inventive concept is based on, one embodiment of the invention provides a kind of inhibition of image moire fringes and sets Standby, which may include:Division unit 701, determination unit 702 and elimination unit 703.Wherein, division unit 701 can be used In pending image is divided at least two image-regions.Determination unit 702 can be used for using preset window traverse to Each image-region in few two image-regions in ergodic process, determines whether image includes moire fringes picture in preset window Element;If it is determined that comprising moire fringes pixel, then according to comprising moire fringes pixel quantity, determine whether each image-region is to rub That line region;If any image region is moire fringes region, the moire fringes pixel removal mole for including in moire fringes region is determined Original pixel value after line.Unit 703 is eliminated to can be used for using original pixel value eliminating moire fringes pixel into row interpolation Moire fringes in each image-region.
Optionally, preset window is j × k windows, wherein j and k is the odd number more than or equal to 3;Determination unit 702 has Body is used for:
Judge whether the central pixel point of image in preset window is the first color component, and obtains judging result;Wherein, Central pixel point is the corresponding pixel of central point of image in preset window, and the first color component is red component, green point Amount and any one in blue component;
Determine whether image includes moire fringes pixel in preset window using different preset rules according to judging result.
Optionally, if judging result Deictic Center pixel is the first color component, it is determined that unit 702 is specifically used for:
Judge four of image in preset window it is diagonal on corresponding four values of pixel in maximum value and most Whether small value meets the first preset relation;If it is determined that meeting the first preset relation, it is determined that in central pixel point and preset window Do not include that at least one of every a line of central point pixel compares default variation whether occurs;If it is determined that default become occurs Change, it is determined that whether the pixel of two adjacent different colours meets the second preset relation in every a line of preset window;If It determines and meets the second preset relation, it is determined that image includes moire fringes pixel in preset window;
Or, judge four of the image in preset window it is diagonal on corresponding four values of pixel in maximum value Whether meet the first preset relation with minimum value;If it is determined that meeting the first preset relation, it is determined that central pixel point and default window Do not include that at least one of each row of central point pixel compares default variation whether occurs in mouthful;If it is determined that occurring default Variation, it is determined that whether the pixel of two neighboring different colours meets the second preset relation in each row of preset window;If It determines and meets the second preset relation, it is determined that image includes moire fringes pixel in preset window;
Or, judge four of the image in preset window it is diagonal on corresponding four values of pixel in maximum value Whether meet the first preset relation with minimum value;If it is determined that meeting the first preset relation, it is determined that preset window each of includes Whether central pixel point occurs default variation compared with other at least one pixels on oblique line on oblique line;If it is determined that occurring pre- If variation, it is determined that whether two adjacent pixels meet third preset relation on each oblique line of preset window;If it is determined that Meet third preset relation, it is determined that image includes moire fringes pixel in preset window;Wherein, oblique line be preset window on include The diagonal line of central point, and other oblique lines parallel with diagonal line.
Optionally, if judging result Deictic Center pixel is not the first color component, it is determined that unit 702 is specifically used In:
Preset window horizontally and vertically on, respectively determine preset window in image respectively with center pixel Point is adjacent, and the situation of change of identical two pixels of color;
If it is determined that horizontally and vertically the upper situation of change occurred meets the 4th preset relation, it is determined that default window Whether any second pixel occurs default variation compared with third pixel in mouthful;Wherein, the color of the second pixel is in The color of imago vegetarian refreshments is identical, and third pixel is the color component adjacent with the second pixel, and the color of the two is identical;
If it is determined that default variation occurs, it is determined that adjacent two on every a line of preset window, each row and oblique line Whether pixel meets the 5th preset relation;Wherein, it includes the diagonal line of central point and parallel with diagonal line that oblique line, which is on window, Other oblique lines;
If it is determined that meeting the 5th preset relation, it is determined that image includes moire fringes pixel in preset window.
Optionally, determination unit 702 is specifically used for:
If the sum of quantity of moire fringes pixel in any image region is more than predetermined threshold value, it is determined that any image region For moire fringes region.
Fig. 8 is referred to, same inventive concept is based on, one embodiment of the invention provides a kind of inhibition of image moire fringes and sets Standby, which can be any electronic equipment with computing capability, which may include:At least one processor 801, place Reason device 801 when executing the computer program stored in memory for realizing figure as shown in Figure 1 provided in an embodiment of the present invention As moire fringes suppressing method the step of.
Optionally, processor 801 can be specifically central processing unit, application-specific integrated circuit (English: Application Specific Integrated Circuit, referred to as:ASIC), can be that one or more is used to control journey The integrated circuit that sequence executes.
Optionally, which further includes the memory 802 being connect at least one processor, and memory 802 may include Read-only memory (English:Read Only Memory, referred to as:ROM), random access memory (English:Random Access Memory, referred to as:) and magnetic disk storage RAM.Memory 802 is used to store data required when processor 801 is run, that is, deposits The instruction that can be executed by least one processor 801 is contained, what at least one processor 801 was stored by executing memory 802 Instruction, executes method as shown in Figure 1.Wherein, the quantity of memory 802 is one or more.Wherein, memory 802 is in Fig. 8 In show together, but it is understood that memory 802 is not essential function module, therefore shown in dotted line in fig. 8.
Wherein, the entity device corresponding to division unit 701, determination unit 702 and elimination unit 703 may each be aforementioned Processor 801.The image processing equipment can be used for executing the method that embodiment shown in FIG. 1 is provided.Therefore about this The function that each function module can be realized in equipment can refer to the corresponding description in embodiment shown in FIG. 1, seldom repeat.
The embodiment of the present invention also provides a kind of computer storage media, wherein computer storage media is stored with computer Instruction, when computer instruction is run on computers so that computer executes as the method for figure 1.
It is apparent to those skilled in the art that for convenience and simplicity of description, only with above-mentioned each function The division progress of module, can be as needed and by above-mentioned function distribution by different function moulds for example, in practical application Block is completed, i.e., the internal structure of device is divided into different function modules, to complete all or part of work(described above Energy.The specific work process of the system, apparatus, and unit of foregoing description can refer to corresponding in preceding method embodiment Journey, details are not described herein.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the module or unit It divides, only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be the indirect coupling by some interfaces, device or unit It closes or communicates to connect, can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the application The all or part of step of embodiment the method.And storage medium above-mentioned includes:General serial bus USB (Universal Serial Bus flash disk), mobile hard disk, read-only memory (Read-Only Memory, ROM), Random access memory (Random Access Memory, RAM), magnetic disc or CD etc. are various can to store program code Medium.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (12)

1. a kind of suppressing method of image moire fringes, which is characterized in that including:
Pending image is divided at least two image-regions;
Traverse each image-region at least two image-region using preset window, in ergodic process, determine described in Whether image includes moire fringes pixel in preset window;
If it is determined that comprising moire fringes pixel, then according to comprising moire fringes pixel quantity, determine that each image-region is No is moire fringes region;
If any image region is moire fringes region, the moire fringes pixel removal moire fringes for including in the moire fringes region are determined Original pixel value later;
Mole in each image-region is eliminated into row interpolation to the moire fringes pixel using the original pixel value Line.
2. the method as described in claim 1, which is characterized in that the preset window is j × k windows, wherein j and k is big In the odd number equal to 3;
Traverse each image-region at least two image-region using preset window, in ergodic process, determine described in Whether image includes moire fringes pixel in preset window, including:
Judge whether the central pixel point of image in the preset window is the first color component, and obtains judging result;Wherein, First color component is any one in red component, green component and blue component;
Determine whether image includes moire fringes picture in the preset window using different preset rules according to the judging result Element.
3. method as claimed in claim 2, which is characterized in that if the judging result indicates that the central pixel point is described First color component, it is determined that whether image includes moire fringes pixel in the preset window, including:
Judge four of image in the preset window it is diagonal on corresponding four values of pixel in maximum value and most Whether small value meets the first preset relation;If it is determined that meeting first preset relation, it is determined that the central pixel point and institute State in preset window does not include that at least one of every a line of central point central pixel point compares default variation whether occurs;If It determines and the default variation occurs, it is determined that the pixel of two adjacent different colours is in every a line of the preset window The second preset relation of no satisfaction;If it is determined that meeting the second preset relation, it is determined that image includes moire fringes in the preset window Pixel;
Or, judge four of the image in the preset window it is diagonal on corresponding four values of pixel in maximum value Whether meet the first preset relation with minimum value;If it is determined that meeting first preset relation, it is determined that the central pixel point Default change whether occurs compared with not including at least one of each row of central point central pixel point in the preset window Change;If it is determined that the default variation occurs, it is determined that the pixel of two neighboring different colours in each row of the preset window Whether point meets the second preset relation;If it is determined that meeting the second preset relation, it is determined that image includes and rubs in the preset window That line pixel;
Or, judge four of the image in the preset window it is diagonal on corresponding four values of pixel in maximum value Whether meet the first preset relation with minimum value;If it is determined that meeting first preset relation, it is determined that the preset window packet Whether the central pixel point is preset compared with other at least one pixels on the oblique line on each oblique line included Variation;If it is determined that the default variation occurs, it is determined that two adjacent pixels are on each oblique line of the preset window It is no to meet third preset relation;If it is determined that meeting the third preset relation, it is determined that image includes and rubs in the preset window That line pixel;Wherein, the oblique line is to include the diagonal line of central point in the preset window, and parallel with the diagonal line Other oblique lines.
4. method as claimed in claim 3, which is characterized in that if the judging result indicates that the central pixel point is not institute State the first color component, it is determined that whether image includes moire fringes pixel in the preset window, including:
The preset window horizontally and vertically on, respectively determine the preset window in image respectively with it is described Central pixel point is adjacent, and the situation of change of identical two pixels of color;
If it is determined that horizontally and vertically the upper situation of change occurred meets the 4th preset relation, it is determined that the default window Whether any second pixel occurs default variation compared with third pixel in mouthful;Wherein, the color of second pixel Identical as the color of the central pixel point, the third pixel is the color component adjacent with second pixel, and The color of the two is identical;
If it is determined that the default variation occurs, it is determined that adjacent on every a line of the preset window, each row and oblique line Whether two pixels meet the 5th preset relation;Wherein, the oblique line be the window on include central point diagonal line and Other oblique lines parallel with the diagonal line;
If it is determined that meeting the 5th preset relation, it is determined that image includes moire fringes pixel in the preset window.
5. method as described in claim 3 or 4, which is characterized in that if it is determined that comprising moire fringes pixel, then according to comprising rub The quantity of your line pixel, determines whether each image-region is moire fringes region, including:
If the sum of quantity of moire fringes pixel in any image region is more than predetermined threshold value, it is determined that any image region For the moire fringes region.
6. a kind of inhibition equipment of image moire fringes, which is characterized in that including:
Division unit, for pending image to be divided at least two image-regions;
Determination unit, it is traversed for traversing each image-region at least two image-region using preset window Cheng Zhong determines whether image includes moire fringes pixel in the preset window;If it is determined that comprising moire fringes pixel, then according to comprising Moire fringes pixel quantity, determine whether each image-region is moire fringes region;If any image region is mole Line region determines the original pixel value after the moire fringes pixel removal moire fringes for including in the moire fringes region;
Unit is eliminated, for utilizing the original pixel value, into row interpolation, to eliminate each image to the moire fringes pixel Moire fringes in region.
7. equipment as claimed in claim 6, which is characterized in that the preset window is j × k windows, wherein j and k is big In the odd number equal to 3;The determination unit is specifically used for:
Judge whether the central pixel point of image in the preset window is the first color component, and obtains judging result;Wherein, First color component is any one in red component, green component and blue component;
Determine whether image includes moire fringes picture in the preset window using different preset rules according to the judging result Element.
8. equipment as claimed in claim 7, which is characterized in that if the judging result indicates that the central pixel point is described First color component, it is determined that unit is specifically used for:
Judge four of image in the preset window it is diagonal on corresponding four values of pixel in maximum value and most Whether small value meets the first preset relation;If it is determined that meeting first preset relation, it is determined that the central pixel point and institute State in preset window does not include that at least one of every a line of central point pixel compares default variation whether occurs;If it is determined that The default variation occurs, it is determined that whether the pixel of two adjacent different colours is full in every a line of the preset window The second preset relation of foot;If it is determined that meeting the second preset relation, it is determined that image includes moire fringes pixel in the preset window;
Or, judge four of the image in the preset window it is diagonal on corresponding four values of pixel in maximum value Whether meet the first preset relation with minimum value;If it is determined that meeting first preset relation, it is determined that the central pixel point Default variation whether occurs compared with not including at least one of each row of central point pixel in the preset window;If It determines and the default variation occurs, it is determined that whether the pixel of two neighboring different colours in each row of the preset window Meet the second preset relation;If it is determined that meeting the second preset relation, it is determined that image includes moire fringes picture in the preset window Element;
Or, judge four of the image in the preset window it is diagonal on corresponding four values of pixel in maximum value Whether meet the first preset relation with minimum value;If it is determined that meeting first preset relation, it is determined that the preset window packet Whether the central pixel point is preset compared with other at least one pixels on the oblique line on each oblique line included Variation;If it is determined that the default variation occurs, it is determined that two adjacent pixels are on each oblique line of the preset window It is no to meet third preset relation;If it is determined that meeting the third preset relation, it is determined that image includes and rubs in the preset window That line pixel;Wherein, the oblique line is to include the diagonal line of central point in the preset window, and parallel with the diagonal line Other oblique lines.
9. equipment as claimed in claim 8, which is characterized in that if the judging result indicates that the central pixel point is not institute State the first color component, it is determined that unit is specifically used for:
The preset window horizontally and vertically on, respectively determine the preset window in image respectively with it is described Central pixel point is adjacent, and the situation of change of identical two pixels of color;
If it is determined that horizontally and vertically the upper situation of change occurred meets the 4th preset relation, it is determined that the default window Whether any second pixel occurs default variation compared with third pixel in mouthful;Wherein, the color of second pixel Identical as the color of the central pixel point, the third pixel is the color component adjacent with second pixel, and The color of the two is identical;
If it is determined that the default variation occurs, it is determined that adjacent on every a line of the preset window, each row and oblique line Whether two pixels meet the 5th preset relation;Wherein, the oblique line be the window on include central point diagonal line and Other oblique lines parallel with the diagonal line;
If it is determined that meeting the 5th preset relation, it is determined that image includes moire fringes pixel in the preset window.
10. equipment as claimed in claim 8 or 9, which is characterized in that the determination unit is specifically used for:
If the sum of quantity of moire fringes pixel in any image region is more than predetermined threshold value, it is determined that any image region For the moire fringes region.
11. a kind of inhibition equipment of image moire fringes, which is characterized in that including:
At least one processor, and
The memory being connect at least one processor;
Wherein, the memory is stored with the instruction that can be executed by least one processor, at least one processor Method as described in any one in claim 1-5 is realized in instruction by executing the memory storage.
12. a kind of computer storage media, is stored thereon with computer program, which is characterized in that the computer program is located Reason device realizes method as described in any one in claim 1-5 when executing.
CN201810433342.0A 2018-05-08 2018-05-08 Image moire inhibition method and device Active CN108615227B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810433342.0A CN108615227B (en) 2018-05-08 2018-05-08 Image moire inhibition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810433342.0A CN108615227B (en) 2018-05-08 2018-05-08 Image moire inhibition method and device

Publications (2)

Publication Number Publication Date
CN108615227A true CN108615227A (en) 2018-10-02
CN108615227B CN108615227B (en) 2021-02-26

Family

ID=63662431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810433342.0A Active CN108615227B (en) 2018-05-08 2018-05-08 Image moire inhibition method and device

Country Status (1)

Country Link
CN (1) CN108615227B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110517206A (en) * 2019-09-05 2019-11-29 昆山锐芯微电子有限公司 Colored moire fringes removing method and device
CN111340714A (en) * 2019-08-29 2020-06-26 杭州海康慧影科技有限公司 Moire pattern processing method and device and electronic equipment
CN111340863A (en) * 2019-08-29 2020-06-26 杭州海康慧影科技有限公司 Moire pixel point determination method and device and electronic equipment
CN111383186A (en) * 2018-12-29 2020-07-07 Tcl集团股份有限公司 Image processing method and device and terminal equipment
CN111798380A (en) * 2019-04-09 2020-10-20 Tcl集团股份有限公司 Image processing method, image processing device and terminal equipment
CN112598600A (en) * 2020-09-30 2021-04-02 安谋科技(中国)有限公司 Image moire correction method, electronic device and medium therefor
CN112967182A (en) * 2019-12-12 2021-06-15 杭州海康威视数字技术股份有限公司 Image processing method, device and equipment and storage medium
CN113129389A (en) * 2019-12-30 2021-07-16 瑞昱半导体股份有限公司 Moire pattern judging method, Moire pattern inhibiting method and circuit system
WO2022088882A1 (en) * 2020-10-30 2022-05-05 中兴通讯股份有限公司 Photographing method and apparatus, and terminal, and computer readable storage medium
CN114972127A (en) * 2022-07-29 2022-08-30 武汉精立电子技术有限公司 Moire pattern elimination method, device, equipment and readable storage medium
CN115049760A (en) * 2022-08-16 2022-09-13 杭州海康威视数字技术股份有限公司 Moore effect enhancement-based video privacy protection method, device and equipment

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06245069A (en) * 1993-02-19 1994-09-02 Tokyo Electric Power Co Inc:The Method for removing moire of picture data
CN102934447A (en) * 2010-06-16 2013-02-13 索尼公司 Image processing device, image processing method, and program
CN103985320A (en) * 2014-05-27 2014-08-13 利亚德光电股份有限公司 Method for restraining moire and display device capable of restraining moire
CN104010174A (en) * 2009-10-13 2014-08-27 佳能株式会社 Image processing device and image processing method
CN104159091A (en) * 2014-07-30 2014-11-19 广东顺德中山大学卡内基梅隆大学国际联合研究院 Color interpolation method based on edge detection
CN104486534A (en) * 2014-12-16 2015-04-01 西安诺瓦电子科技有限公司 Moire detecting and suppression method and device
CN104717474A (en) * 2013-12-16 2015-06-17 瑞昱半导体股份有限公司 Image processing method and module
CN105160628A (en) * 2015-09-07 2015-12-16 努比亚技术有限公司 Method and device for acquiring RGB data
CN105654898A (en) * 2016-02-25 2016-06-08 西安诺瓦电子科技有限公司 Image acquisition device imaging moire inhibition method and application thereof
CN106875346A (en) * 2016-12-26 2017-06-20 奇酷互联网络科技(深圳)有限公司 image processing method, device and terminal device
CN107424123A (en) * 2017-03-29 2017-12-01 北京粉笔未来科技有限公司 A kind of moire fringes minimizing technology and device
US20170359508A1 (en) * 2016-06-08 2017-12-14 Chiun Mai Communication Systems, Inc. Capturing apparatus and method for capturing images using the capturing apparatus
CN107578392A (en) * 2017-09-25 2018-01-12 华北电力大学 A kind of convolutional neural networks demosaicing algorithms based on remaining interpolation
CN107948498A (en) * 2017-10-30 2018-04-20 维沃移动通信有限公司 One kind eliminates camera Morie fringe method and mobile terminal

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06245069A (en) * 1993-02-19 1994-09-02 Tokyo Electric Power Co Inc:The Method for removing moire of picture data
CN104010174A (en) * 2009-10-13 2014-08-27 佳能株式会社 Image processing device and image processing method
CN102934447A (en) * 2010-06-16 2013-02-13 索尼公司 Image processing device, image processing method, and program
CN104717474A (en) * 2013-12-16 2015-06-17 瑞昱半导体股份有限公司 Image processing method and module
CN103985320A (en) * 2014-05-27 2014-08-13 利亚德光电股份有限公司 Method for restraining moire and display device capable of restraining moire
CN104159091A (en) * 2014-07-30 2014-11-19 广东顺德中山大学卡内基梅隆大学国际联合研究院 Color interpolation method based on edge detection
CN104486534A (en) * 2014-12-16 2015-04-01 西安诺瓦电子科技有限公司 Moire detecting and suppression method and device
CN105160628A (en) * 2015-09-07 2015-12-16 努比亚技术有限公司 Method and device for acquiring RGB data
CN105654898A (en) * 2016-02-25 2016-06-08 西安诺瓦电子科技有限公司 Image acquisition device imaging moire inhibition method and application thereof
US20170359508A1 (en) * 2016-06-08 2017-12-14 Chiun Mai Communication Systems, Inc. Capturing apparatus and method for capturing images using the capturing apparatus
CN106875346A (en) * 2016-12-26 2017-06-20 奇酷互联网络科技(深圳)有限公司 image processing method, device and terminal device
CN107424123A (en) * 2017-03-29 2017-12-01 北京粉笔未来科技有限公司 A kind of moire fringes minimizing technology and device
CN107578392A (en) * 2017-09-25 2018-01-12 华北电力大学 A kind of convolutional neural networks demosaicing algorithms based on remaining interpolation
CN107948498A (en) * 2017-10-30 2018-04-20 维沃移动通信有限公司 One kind eliminates camera Morie fringe method and mobile terminal

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
CARAMAN, S 等: "Automatic moire pattern removal in microscopic images", 《2015 19TH INTERNATIONAL CONFERENCE ON SYSTEM THEORY, CONTROL AND COMPUTING (ICSTCC)》 *
FANGLEI LIU 等: "Moire pattern removal from texture images via low-rank and sparse matrix decompositon", 《2015 VISUAL COMMUNICATIONS AND IMAGE PROCESSING(VCIP),IEEE》 *
ZHOUPING WEI 等: "A median-Gaussian filtering framework for Moire pattern noise removal from X-ray microscopy image", 《MICRON》 *
王强: "彩色图像预处理算法研究", 《中国优秀硕士学位论文全文数据库_信息科技辑》 *
邱菊: "基于插值算法的去彩色摩尔纹效应的研究", 《中国优秀硕士学位论文全文数据库-信息科技辑》 *
邱香香: "基于CCD静态图像的摩尔纹去除算法研究", 《中国优秀硕士学位论文全文数据库-信息科技辑》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111383186A (en) * 2018-12-29 2020-07-07 Tcl集团股份有限公司 Image processing method and device and terminal equipment
CN111798380A (en) * 2019-04-09 2020-10-20 Tcl集团股份有限公司 Image processing method, image processing device and terminal equipment
CN111340714B (en) * 2019-08-29 2023-08-08 杭州海康慧影科技有限公司 Moire pattern processing method and device and electronic equipment
CN111340714A (en) * 2019-08-29 2020-06-26 杭州海康慧影科技有限公司 Moire pattern processing method and device and electronic equipment
CN111340863A (en) * 2019-08-29 2020-06-26 杭州海康慧影科技有限公司 Moire pixel point determination method and device and electronic equipment
CN111340863B (en) * 2019-08-29 2023-12-05 杭州海康慧影科技有限公司 Moire pixel point determination method and device and electronic equipment
CN110517206B (en) * 2019-09-05 2021-10-15 锐芯微电子股份有限公司 Method and device for eliminating color moire
CN110517206A (en) * 2019-09-05 2019-11-29 昆山锐芯微电子有限公司 Colored moire fringes removing method and device
CN112967182B (en) * 2019-12-12 2022-07-29 杭州海康威视数字技术股份有限公司 Image processing method, device and equipment and storage medium
CN112967182A (en) * 2019-12-12 2021-06-15 杭州海康威视数字技术股份有限公司 Image processing method, device and equipment and storage medium
CN113129389A (en) * 2019-12-30 2021-07-16 瑞昱半导体股份有限公司 Moire pattern judging method, Moire pattern inhibiting method and circuit system
CN112598600B (en) * 2020-09-30 2023-03-10 安谋科技(中国)有限公司 Image moire correction method, electronic device and medium therefor
CN112598600A (en) * 2020-09-30 2021-04-02 安谋科技(中国)有限公司 Image moire correction method, electronic device and medium therefor
WO2022088882A1 (en) * 2020-10-30 2022-05-05 中兴通讯股份有限公司 Photographing method and apparatus, and terminal, and computer readable storage medium
CN114972127A (en) * 2022-07-29 2022-08-30 武汉精立电子技术有限公司 Moire pattern elimination method, device, equipment and readable storage medium
CN114972127B (en) * 2022-07-29 2022-10-25 武汉精立电子技术有限公司 Moire pattern elimination method, device, equipment and readable storage medium
CN115049760A (en) * 2022-08-16 2022-09-13 杭州海康威视数字技术股份有限公司 Moore effect enhancement-based video privacy protection method, device and equipment
CN115049760B (en) * 2022-08-16 2022-12-02 杭州海康威视数字技术股份有限公司 Moore effect enhancement-based video privacy protection method, device and equipment

Also Published As

Publication number Publication date
CN108615227B (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN108615227A (en) A kind of suppressing method and equipment of image moire fringes
KR101342806B1 (en) Interpolation of panchromatic and color pixels
US7835573B2 (en) Method and apparatus for edge adaptive color interpolation
CN102273208B (en) Image processing device and image processing method
CN100380915C (en) Image processing apparatus and image processing method as well as computer program
CN101652798B (en) Edge mapping using panchromatic pixels
US7876956B2 (en) Noise reduction of panchromatic and color image
CN102362501B (en) Method for modifying color and panchromatic channel CFA image
CN102158660B (en) For removing the apparatus and method of defect pixel
US20080123997A1 (en) Providing a desired resolution color image
US9111365B2 (en) Edge-adaptive interpolation and noise filtering method, computer-readable recording medium, and portable terminal
JP2007201530A (en) Pixel defect correction apparatus
CN107464251A (en) The black edge detection method and device of a kind of image
CN105049679A (en) Image processing device and image processing method
CN111510692B (en) Image processing method, terminal and computer readable storage medium
EP3855387A1 (en) Image processing method and apparatus, electronic device, and readable storage medium
CN102055882B (en) Image processing apparatus, image forming apparatus and image processing method
CN108122201A (en) A kind of Bayer interpolation slide fastener effect minimizing technology
CN104717474A (en) Image processing method and module
US20050190200A1 (en) Image processing method, image processing device, semiconductor device, electronic apparatus, image processing program, and computer-readable storage medium
CN101854462A (en) Image processing equipment, image processing method and computer program
US20140293088A1 (en) Image processing apparatus and method, and program
CN112435182B (en) Image noise reduction method and device
CN113781334A (en) Method, device, terminal and storage medium for comparing difference between images based on colors
JP2000175208A (en) Interpolation processing unit and recoding medium recording interpolation processing program

Legal Events

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