CN103049886B - A kind of image texture repair method and system - Google Patents

A kind of image texture repair method and system Download PDF

Info

Publication number
CN103049886B
CN103049886B CN201110308150.5A CN201110308150A CN103049886B CN 103049886 B CN103049886 B CN 103049886B CN 201110308150 A CN201110308150 A CN 201110308150A CN 103049886 B CN103049886 B CN 103049886B
Authority
CN
China
Prior art keywords
pixel
value
image
region
brightness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110308150.5A
Other languages
Chinese (zh)
Other versions
CN103049886A (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.)
Fangzhu Wuhan Technology Co ltd
Founder International Co Ltd
Original Assignee
Founder International Co Ltd
Founder International Beijing 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 Founder International Co Ltd, Founder International Beijing Co Ltd filed Critical Founder International Co Ltd
Priority to CN201110308150.5A priority Critical patent/CN103049886B/en
Publication of CN103049886A publication Critical patent/CN103049886A/en
Application granted granted Critical
Publication of CN103049886B publication Critical patent/CN103049886B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention discloses a kind of image texture repair method, comprise the following steps: the region to be adjusted of first determining to need in image to carry out texture repairing; Then adopting to make the filtering method that image brightness distribution is consistent with grain distribution carry out filtering to described region to be adjusted, obtains the filtered brightness value of each pixel in described region to be adjusted; Again according to the gradient-norm of each pixel in described region to be adjusted, fusion is weighted to the filtered brightness value of each pixel and original luminance value in described region to be adjusted, obtains the image after repairing.The invention also discloses a kind of image texture repair system corresponding with said method, and another kind of image texture repair method and system.The present invention achieves the reparation of image texture well, and compared with manual repair method, substantially increases the remediation efficiency of image texture.

Description

A kind of image texture repair method and system
Technical field
The invention belongs to technical field of image processing, be specifically related to a kind of image texture repair method and system.
Background technology
" class " is frequent produced problem in printed matter image." class " region is the single outstanding element within unit pattern, not obvious when figure large less than split, but assembles after the large figure of split or continuous printing and put into line, causes the overall inaesthetic region of picture." class " shows as the inconsistency of image brightness distribution and grain distribution, but this inconsistency is not obvious at image local, needs under the guidance of globality, by the careful adjustment of local, while finally reaching the natural transition in local, the effect that overall distribution is consistent.
In prior art, the functions such as the constituency in usual employing Photoshop software, curve adjust, fuzzy, the artificial continuous switching by entire and part, under the guidance of entirety, once and again trickle adjustment is carried out to local, finally obtain the image not having " class " that Luminance Distribution is all very consistent with grain distribution.Because above-mentioned manual operation requires that operating personnel can both understanding and grasping well to the content of image and texture, veteran operating personnel are therefore needed to complete.Artificial reparation " class " image, workload is huge, easily in " my god ".
At present, the method still not having document to carry out repairing for image " class " problem is specially recorded, and does not also have the special application software designed for image " class " problem in practice.
Summary of the invention
For the defect existed in prior art, technical matters to be solved by this invention is to provide high, the effective image texture repair method of a kind of efficiency and system.
For solving the problems of the technologies described above, the technical solution used in the present invention is as follows:
A kind of image texture repair method, comprises the following steps:
Determine the region to be adjusted needing to carry out texture repairing in image;
Employing can make the filtering method that image brightness distribution is consistent with grain distribution carry out filtering to described region to be adjusted, obtains the filtered brightness value of each pixel in described region to be adjusted;
Fusion is weighted to the filtered brightness value of each pixel and original luminance value in described region to be adjusted, obtains the image after repairing.
Image texture repair method as above, wherein, the process of filtering comprises the following steps:
Determine sample areas, and calculate target mean and the target variance of described sample areas;
Travel through all pixels in described region to be adjusted, calculate neighboring mean value and the neighborhood variance of each pixel; The span of the described radius of neighbourhood is between 30 pixel ~ 500 pixels;
According to target mean and the target variance of described sample areas, and the original luminance value of each pixel, neighboring mean value and neighborhood variance in described region to be adjusted, calculate the filtered brightness value of each pixel in described region to be adjusted.
Image texture repair method as above, wherein, adopts the filtered brightness value of each pixel in region to be adjusted described in following formulae discovery:
I w ( i , j ) = M d + S d S ( i , j ) ( I ( i , j ) - M ( i , j ) )
Wherein, I w(i, j) represents filtered brightness value, M dand S drepresent target mean and target variance respectively, I (i, j) represents at (i, j) original luminance value of place's pixel, M (i, j) and S (i, j) neighboring mean value and the neighborhood variance of (i, j) place pixel is represented respectively.
Image texture repair method as above, if described image exists dark side, then the distribution of the overall brightness of appointed area in image is first adjusted to and distributes consistent with the overall brightness of sample areas by described method.The process of described adjustment comprises the following steps:
Specifying in image and need region and the sample areas of carrying out brightness adjustment, being designated as appointed area by needing the region of carrying out brightness adjustment in image;
Calculate the histogram of described sample areas and appointed area respectively, column hisgram of going forward side by side mates, and obtains the brightness mapping relations from described appointed area to described sample areas;
Described brightness mapping relations are applied to each pixel in described appointed area.
Image texture repair method as above, wherein, the process of Weighted Fusion comprises the following steps:
Calculate the gradient modulus value of each pixel in described region to be adjusted, and calculate the Sigmoid functional value about described gradient modulus value, described Sigmoid function is as follows:
ζ ( | | G ( i , j ) | | ) = 1 1 + exp ( α × | | G ( i , j ) | | + β )
Wherein, || G (i, j) || be independent variable, represent the gradient-norm of (i, j) place pixel on image; α and β is constant, preferably, and α=-0.15, β=-10, the respectively pace of change of control Sigmoid curve and degrees of offset;
To each pixel in described region to be adjusted, carrying out with described Sigmoid functional value is weight about the Weighted Fusion of original luminance value and filtered brightness value.Fusion formula is as follows:
I′(i,j)=ζ(||G(i,j)||)×I w(i,j)+(1-ζ(||G(i,j)||))×I(i,j)
Wherein, I ' (i, j) represents the end value merging rear (i, j) place pixel, I w(i, j) represents the filtered brightness value of (i, j) place pixel, and I (i, j) represents the original luminance value of (i, j) place pixel.
A kind of image texture repair method, comprises the following steps:
Determine the region to be adjusted and the sample areas that need to carry out texture repairing in image;
Calculate the histogram of described sample areas;
Travel through all pixels in described region to be adjusted, each pixel is handled as follows: the histogram 1. calculating neighborhood of pixel points, 2. according to the brightness mapping relations of the histogram of described sample areas and the histogram calculation neighborhood of pixel points of neighborhood and described sample areas, the brightness mapping value of all pixels in neighborhood is 3. calculated according to described brightness mapping relations; Preferably, the span of the described radius of neighbourhood is between 20 pixel ~ 100 pixels;
After traversal terminates, one group of brightness mapping value that each pixel is tried to achieve is weighted on average, obtains the final brightness mapping value of this pixel;
Fusion is weighted to the final brightness mapping value of each pixel in described region to be adjusted and original luminance value, obtains the image after repairing.
Image texture repair method as above, wherein, the process of Weighted Fusion comprises the following steps:
Calculate the gradient modulus value of each pixel in described region to be adjusted, and calculate the Sigmoid functional value about described gradient modulus value, described Sigmoid function is as follows:
ζ ( | | G ( i , j ) | | ) = 1 1 + exp ( α × | | G ( i , j ) | | + β )
Wherein, || G (i, j) || be independent variable, represent the gradient-norm of (i, j) place pixel on image; α and β is constant, α=-0.15, β=-30, respectively the pace of change of control Sigmoid curve and degrees of offset;
To each pixel in described region to be adjusted, carrying out with described Sigmoid functional value is weight about the Weighted Fusion of original luminance value and described final brightness mapping value.Fusion formula is as follows:
I′(i,j)=ζ(||G(i,j)||)×I w(i,j)+(1-ζ(||G(i,j)||))×(i,j)
Wherein, I ' (i, j) represents the end value merging rear (i, j) place pixel, I w(i, j) represents the final brightness value of (i, j) place pixel during step 4., and I (i, j) represents the original luminance value of (i, j) place pixel.
A kind of image texture repair system, comprises the determining device for determining the region to be adjusted needing to carry out texture repairing in image;
The image brightness distribution filtering method consistent with grain distribution can be made to treat adjustment region carry out filtering, obtain the filter of brightness value after each pixel filtering in region to be adjusted for adopting;
The fusing device of fusion is weighted for treating the filtered brightness value of each pixel and original luminance value in adjustment region.
Image texture repair system as above, wherein, filter comprises the determining unit for determining sample areas;
For traveling through the Traversal Unit of all pixels in region to be adjusted;
For calculating target mean and the target variance of sample areas, and calculate the neighboring mean value of each pixel and the first computing unit of neighborhood variance;
For according to the target mean of sample areas and target variance, and the original luminance value of each pixel, neighboring mean value and neighborhood variance in region to be adjusted, calculate the second computing unit of the filtered brightness value of each pixel in region to be adjusted.
Image texture repair system as above, also comprises and the distribution of the overall brightness in described region to be adjusted is adjusted to the consistent brightness adjusting device that to distribute with the overall brightness of the sample areas of specifying.
Image texture repair system as above, wherein, brightness adjusting device comprises being used to specify in image and needs to carry out the region of brightness adjustment and the designating unit of sample areas, is designated as appointed area by needing the region of carrying out brightness adjustment in image;
For calculating histogrammic 3rd computing unit of sample areas and appointed area;
For mating appointed area histogram and sample areas histogram, obtain the matching unit of the brightness mapping relations from appointed area to sample areas;
For brightness mapping relations being applied to the applying unit of each pixel in appointed area.
Image texture repair system as above, wherein, fusing device comprises the gradient modulus value for calculating each pixel in described region to be adjusted, and calculates the 4th computing unit about the Sigmoid functional value of described gradient modulus value;
For treating each pixel in adjustment region, the integrated unit about the Weighted Fusion of brightness value after original luminance value and filtering that to carry out with Sigmoid functional value be weight.
A kind of image texture repair system, comprises and needs to carry out the region to be adjusted of texture repairing and the determining device of sample areas in image for determining;
For calculating sample areas histogram and histogrammic first calculation element of neighborhood of pixel points;
For traveling through the traversal device of all pixels in region to be adjusted;
For the brightness mapping relations according to described sample areas histogram and neighborhood histogram calculation neighborhood of pixel points and sample areas, all pixel intensity mapping value in neighborhood are calculated according to brightness mapping relations, and after traversal terminates, one group of brightness mapping value that each pixel is tried to achieve is weighted on average, obtains the second calculation element of the final brightness mapping value of this pixel;
Final brightness mapping value and original luminance value for treating each pixel in adjustment region are weighted the fusing device of fusion.
Image texture repair system as above, wherein, fusing device comprises the gradient modulus value for calculating each pixel in described region to be adjusted, and calculates the computing unit about the Sigmoid functional value of described gradient modulus value;
For treating each pixel in adjustment region, carrying out with Sigmoid functional value is weight about the integrated unit of the Weighted Fusion of original luminance value and described final brightness mapping value.
The method of the invention and system, the methods such as Wallis filtering, local average Histogram Matching have been incorporated into class image repair field, after image being carried out to the mode such as Wallis filtering, local average Histogram Matching and adjusting, for weight, fusion is weighted to image and original image after adjustment with Sigmoid functional value again, achieves the reparation of image texture well.And, compared with manual repair method, drastically increase the remediation efficiency of image texture.Test the speed through experiment, under Pentium double-core, 3.46G memory environment, to the image of 10000 × 10000, the processing time is substantially within 1 minute.
Accompanying drawing explanation
Fig. 1 is the structured flowchart of image texture repair system in embodiment 1;
Fig. 2 is the structured flowchart of brightness adjusting device in embodiment 1;
Fig. 3 is the structured flowchart of filter in embodiment 1;
Fig. 4 is the structured flowchart of fusing device in embodiment 1;
Fig. 5 is the process flow diagram of image texture repair method in embodiment 1;
Fig. 6 is the process flow diagram of luminance regulating method in embodiment 1;
Fig. 7 is the process flow diagram of Wallis filtering method in embodiment 1;
Fig. 8 is Sigmoid curve synoptic diagram in embodiment 1;
Fig. 9 is the structured flowchart of image texture repair system in embodiment 2;
Figure 10 is the structured flowchart of fusing device in embodiment 2;
Figure 11 is the process flow diagram of image texture repair method in embodiment 2.
Embodiment
The present invention be directed to the part class problem existed in image and the solution proposed, its core concept is: after the mode such as filtering, local average Histogram Matching of carrying out image adjusts, again with Sigmoid functional value for weight is weighted fusion to image and original image after adjustment, thus realize the object of repairing image texture preferably.Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.
Embodiment 1
Class is the class problem often occurred in printed matter image, even if image brightness distribution is unified, still may there is local unit and assemble line after connecting the operations such as solarization, form the problem in outstanding unsightly region.For this problem, need to carry out local directed complete set to image, consistent with the grain distribution realizing entire image.But to the image containing large structural texture, realize grain distribution consistent while, often need the structure keeping image well.Present embodiment, for above-mentioned image class problem, provides a kind of image texture repair system and method.
As shown in Figure 1, in present embodiment, image texture repair system comprises brightness adjusting device 15, determining device 11, filter 12 and fusing device 13.As shown in Figure 2, brightness adjusting device 15 comprises designating unit 151, the 3rd computing unit 152, matching unit 153 and applying unit 154.As shown in Figure 3, filter 12 comprises determining unit 121, Traversal Unit 122, first computing unit 123 and the second computing unit 124.As shown in Figure 4, fusing device 13 comprises the 4th computing unit 131 and integrated unit 132.
Brightness adjusting device 15 distributes consistent for the distribution of the overall brightness of appointed area in image being adjusted to the overall brightness of sample areas.Wherein: designating unit 151 is used to specify in image the region and sample areas that need to carry out brightness adjustment, is designated as appointed area by needing the region of carrying out brightness adjustment in image; 3rd computing unit 152 is for the histogram of the histogram and appointed area that calculate sample areas; Matching unit 153, for mating appointed area histogram and sample areas histogram, obtains the brightness mapping relations from appointed area to sample areas; Applying unit 154 is for being applied to each pixel in appointed area by brightness mapping relations.
Determining device 11 is for determining the region to be adjusted needing to carry out texture repairing in image.
Filter 12 can make the image brightness distribution filtering method consistent with grain distribution treat adjustment region to carry out filtering, obtain the filtered brightness value of each pixel in region to be adjusted for adopting.Wherein: determining unit 121 is for determining sample areas; Traversal Unit 122 is for traveling through all pixels in region to be adjusted; First computing unit 123 for calculating target mean and the target variance of sample areas, and calculates neighboring mean value and the neighborhood variance of each pixel; Second computing unit 124 is for according to the target mean of sample areas and target variance, and the original luminance value of each pixel, neighboring mean value and neighborhood variance in region to be adjusted, calculates the filtered brightness value of each pixel in region to be adjusted.
Fusing device 13 is weighted fusion for treating the filtered brightness value of each pixel and original luminance value in adjustment region.Wherein: the 4th computing unit 131 for calculating the gradient modulus value of each pixel in described region to be adjusted, and calculates the Sigmoid functional value about described gradient modulus value; Integrated unit 132 is for treating each pixel in adjustment region, and carrying out with Sigmoid functional value is weight about the Weighted Fusion of original luminance value and filtered brightness value.
As shown in Figure 5, the method adopting said system to repair image texture comprises the following steps:
(1) distribution of the overall brightness of appointed area in image is adjusted to and distributes consistent with the overall brightness of sample areas by brightness adjusting device 15.
Brightness adjustment is the solution proposed for the dark side problem in image class problem, if therefore there is not dark side in image, then this step can be omitted.Dark side has the reasons such as reflecting effect to cause due to out-of-flatness when the splicing of scintigram in batches, the scanning of original copy stock, scanning thing material itself.The dark side existed in image has the feature of bulk distribution, is therefore easy to manually choose out the image-region with consistent brightness.Based on These characteristics, in this step, the object of brightness adjustment operation is: the Luminance Distribution in the region of user in image being specified adjusts to the effect consistent with the sample areas that user provides.
As shown in Figure 6, the process of brightness adjustment comprises the following steps:
1. designating unit 151 specifies in image the region and sample areas that need to carry out brightness adjustment, is designated as appointed area by needing the region of carrying out brightness adjustment in image.
Target effect region for reference when sample areas herein refers to and carries out brightness adjustment, it can be the regional area in region to be adjusted, also can be other image-region extra-regional to be adjusted in image, can also be other image-regions outside this image, need pre-determine before treatment.
2. the 3rd computing unit 152 calculates sample areas histogram and appointed area histogram respectively, and matching unit 153 carries out Histogram Matching, obtains the brightness mapping relations from appointed area to sample areas.
3. brightness mapping relations are applied to each pixel in appointed area by applying unit 154, obtain the image that Luminance Distribution is consistent with sample areas.
(2) determining device 11 determines the region to be adjusted needing to carry out texture repairing in image.
Because class is the class problem often occurred in printed matter image, even if adopt the brightness adjustment mode in step (1) to achieve the unification of integral image Luminance Distribution, still may there is local unit and assemble line after connecting the operations such as solarization, form the problem in outstanding unsightly region.For this problem, need to carry out local directed complete set to image, consistent with the grain distribution realizing entire image.
(3) filter 12 adopts and the filtering method that image brightness distribution is consistent with grain distribution can be made to carry out filtering to described region to be adjusted, obtains the filtered brightness value of each pixel in described region to be adjusted.
For the image containing large structural texture, usually wish to realize grain distribution consistent while, keep the structure of image well.For this reason, present embodiment adopts Wallis filtering method to treat adjustment region to carry out filtering.
Wallis filtering a kind ofly highly effectively realizes the image brightness distribution filtering method consistent with grain distribution, and fundamental formular is as follows:
I w ( i , j ) = M d + S d S ( i , j ) ( I ( i , j ) - M ( i , j ) )
Wherein, I w(i, j) represents filtered brightness value, M dand S drepresent target mean and target variance respectively, I (i, j) represents at (i, j) original luminance value of place's pixel, M (i, j) and S (i, j) neighboring mean value and the neighborhood variance of (i, j) place pixel is represented respectively.
According to above-mentioned formula, on the image after adjustment, each pixel neighborhood of a point has approximate consistent average M dwith variance S d, same average achieves the brightness uniformity of entire image, and same variance achieves the consistent of image texture distribution, and the selection of contiguous range determines the maintenance degree of picture structure.
As shown in Figure 7, concrete filtering comprises the following steps:
1. determining unit 121 determines sample areas, and the first computing unit 123 calculates average and the variance of sample areas, and the average of sample areas is called target mean, and the variance of sample areas is called target variance.
Target effect region for reference when sample areas herein refers to and carries out filtering, determined by determining unit 121 by user, can be different from the sample areas of above-mentioned brightness adjustment, but can be the regional area in region to be adjusted equally, also can be other image-region extra-regional to be adjusted in image, can also be other image-regions outside this image, need pre-determine before treatment.
2. Traversal Unit 122 travels through all pixels in region to be adjusted, and the first computing unit 123 calculates neighboring mean value and the neighborhood variance of each pixel.
The impact of selection on filter effect of the radius of neighbourhood is great, if wish that picture structure is average as far as possible, and does not need to keep picture structure, then less radius can be adopted to carry out filtering.The effective range of the general radius of neighbourhood is between 30 pixel ~ 500 pixels, and the too little meeting of radius causes the structural penalties of image serious, and radius then makes Adjustment effect not obvious too greatly.In present embodiment, the radius of neighbourhood gets 100 pixels, and namely neighborhood is the square of 201 × 201, to ensure the maintenance to picture structure.
3. the second computing unit 124 is according to the target mean of sample areas and target variance, and the original luminance value of each pixel, neighboring mean value and neighborhood variance in region to be adjusted, adopt above-mentioned Wallis Filtering Formula to calculate the filtered brightness value of each pixel in region to be adjusted.
(4) fusing device 13 is treated the filtered brightness value of each pixel and original luminance value in adjustment region and is weighted fusion.
Adopt original Wallis filtering method can realize image texture and brightness consistance distribution on the whole, but there is following two problems:
1. according to the texture feature of sample areas, may need to increase picture contrast, and to image natively existing the regional area of larger contrast, when widening contrast further, may Patch effect be occurred.
The formation of patch, because the brightness in certain block region in image and mean flow rate differ greatly, namely the region that local is very bright or dark, increases according to target average brightness this value again or subtracts and can block because exceeding brightness range and obtain the same brightness value equal with the maximum value or minimum value of brightness range.In addition, this region is the stabilized zone close with neighborhood, and thus the adjusted value of whole neighborhood is all very bright or very dark value, thus forms patch.
2. the effect of Wallis filtering be realize the brightness of image local and variance completely the same, processing procedure does not consider any structural information, thus may break the architectural feature of changing image.For this reason, be necessary to protect the stabilized zone of characterizing image structures in image, to realize the effective maintenance to picture structure.
Accordingly, the method that present embodiment adopts Wallis filtered image and original image to be weighted fusion solves above-mentioned two problems.
Because patch is a very little part in image, most end value should be the result of Wallis filtering, therefore needs to adopt the weighting function that can keep Wallis filter result as far as possible.In present embodiment, adopt the following Sigmoid weighting function about gradient-norm:
ζ ( | | G ( i , j ) | | ) = 1 1 + exp ( α × | | G ( i , j ) | | + β )
In above formula, || G (i, j) || be independent variable, represent the gradient-norm of (i, j) place pixel on image; α and β is constant, respectively the pace of change of control Sigmoid curve and degrees of offset.The value of α and β can change according to actual needs, in present embodiment, require to keep image original value at the very little place of gradient modulus value (flat site namely in image), and the region employing filter result value that other gradient modulus value are larger, therefore in order to while removing patch as far as possible, retain the result of Wallis filtering, adopt and rise quickly, have the following parameter close to null value weight near 0: α=-0.15, β=-10, the Sigmoid curve map of its correspondence as shown in Figure 8.
In present embodiment, the process of Weighted Fusion is as follows:
First the 4th computing unit 131 calculates the gradient modulus value of each pixel in region to be adjusted, then according to the Sigmoid functional value of above-mentioned formulae discovery about described gradient modulus value.The gradient modulus value calculating each pixel is herein carried out based on region to be adjusted pixel value before adjustment (i.e. original pixel value), because weight considers from the stability of image itself.
Then integrated unit 132 treats each pixel in adjustment region, and carrying out with Sigmoid functional value is weight about the Weighted Fusion of original luminance value and filtered brightness value, and its fusion formula is as follows:
I′(i,j)=ζ(||G(i,j)||)×I w(i,j)+(1-ζ(||G(i,j)||))×I(i,j)
Wherein, the end value of (i, j) place pixel after I ' (i, j) represents image co-registration, I w(i, j) represents the filter result value of (i, j) place pixel, and I (i, j) represents the original luminance value of (i, j) place pixel.
Embodiment 2
Some image has consistance texture, this type of image is easily after the operations such as image mosaic, sparse or the dense areas combine of local grain becomes larger region and forms the Luminance Distribution such as patch and the inconsistent class region of grain distribution, forms " hickie " phenomenon as ever-present in printed matter image by sparse texture set.Present embodiments provide for a kind of the image texture repair system of class problem and method for there is local luminance or the inconsistent distribution of texture in consistance texture image.
As shown in Figure 9, in present embodiment, image texture repair system comprises determining device 111, first calculation element 112, traversal device 113, second calculation element 114 and fusing device 115.As shown in Figure 10, fusing device 115 comprises computing unit 1151 and integrated unit 1152.
Determining device 111 is for determining the region to be adjusted and the sample areas that need to carry out texture repairing in image.First calculation element 112 is for calculating sample areas histogram and neighborhood of pixel points histogram.Traversal device 113 is for traveling through all pixels in region to be adjusted.Second calculation element 114 is for the brightness mapping relations according to sample areas histogram and neighborhood histogram calculation neighborhood of pixel points and sample areas, all pixel intensity mapping value in neighborhood are calculated according to brightness mapping relations, and after traversal terminates, one group of brightness mapping value that each pixel is tried to achieve is weighted on average, obtains the final brightness mapping value of this pixel.Fusing device 115 is weighted fusion for the final brightness mapping value and original luminance value treating each pixel in adjustment region.Wherein: computing unit 1151 for calculating the gradient modulus value of each pixel in region to be adjusted, and calculates the Sigmoid functional value about described gradient modulus value; Integrated unit 1152 is for treating each pixel in adjustment region, and carrying out with Sigmoid functional value is weight about the Weighted Fusion of original luminance value and final brightness mapping value.
As shown in figure 11, the method adopting said system to carry out image texture reparation comprises the following steps:
(1) determining device 111 determines the region to be adjusted and the sample areas that need to carry out texture repairing in image.Target effect region for reference when described sample areas refers to and carries out texture repairing, it can be the regional area in region to be adjusted, also can be other image-region extra-regional to be adjusted in image, can also be other image-regions outside this image, need pre-determine before treatment.
(2) first calculation elements 112 calculate the histogram of sample areas.
(3) travel through device 113 and travel through all pixels in region to be adjusted, each pixel is handled as follows:
1. the first calculation element 112 calculates the histogram of neighborhood of pixel points; The effective range of the general radius of neighbourhood is between 20 pixel ~ 100 pixels, and the too little meeting of radius causes Neighborhood Statistics information inaccurate and makes Adjustment effect deviation too large, and radius is too large then because neighborhood information does not have singularity and make Adjustment effect not obvious.In present embodiment, the radius of neighbourhood gets 50 pixels, and namely neighborhood is the square of 101 × 101;
2. the second calculation element 114 is according to the histogram of sample areas and the histogram calculation neighborhood of pixel points of neighborhood and the brightness mapping relations of sample areas;
3. the brightness mapping value of all pixels in neighborhood is calculated according to brightness mapping relations;
(4), after traversal terminates, the second calculation element 114 is weighted on average one group of brightness mapping value that each pixel is tried to achieve, and obtains the final brightness mapping value of this pixel.
(5) fusing device 115 is weighted fusion to the final brightness mapping value of each pixel in described region to be adjusted and original luminance value.
Because the textured inner of such image and background area are all stabilized zone, stabilized zone is without the need to adjusting again.Therefore, present embodiment adopts and ensures that stabilized zone does not adjust based on the mode of the Weighted Fusion of image and original image after the adjustment of Sigmoid function.
First, computing unit 1151 calculates the gradient modulus value of each pixel in region to be adjusted, then according to the Sigmoid functional value of above-mentioned formulae discovery about described gradient modulus value.Described Sigmoid function is as follows:
ζ ( | | G ( i , j ) | | ) = 1 1 + exp ( α × | | G ( i , j ) | | + β )
In above formula, || G (i, j) || be independent variable, represent the gradient-norm of (i, j) place pixel on image; α and β is constant, respectively the pace of change of control Sigmoid curve and degrees of offset.Have in the class image repair of consistance texture because present embodiment is applied to usually, it focuses on the adjustment to transitional region in image, compared to embodiment 1, while requiring that Sigmoid functional value comparatively fast changes with gradient modulus value, variation range is also larger, therefore, α=-0.15, β=-30.
Then, integrated unit 1152 treats each pixel in adjustment region, and carrying out with Sigmoid functional value is weight about the Weighted Fusion of original luminance value and final brightness mapping value, and its fusion formula is as follows:
I′(i,j)=ζ(||G(i,j)||)×I w(i,j)+(1-ζ(||G(i,j)||))×I(i,j)
Wherein, the end value of (i, j) place pixel after I ' (i, j) represents image co-registration, I w(i, j) represents the final brightness mapping value of (i, j) place pixel after step (3) process, and I (i, j) represents the original luminance value of (i, j) place pixel in image.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Such as, fusion method can adopt any fusion method meeting specific image, and Wallis function and Sigmoid function also can adopt other variants based on basic function.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technology thereof, then the present invention is also intended to comprise these change and modification.

Claims (17)

1. an image texture repair method, is characterized in that, comprises the following steps:
Determine the region to be adjusted needing to carry out texture repairing in image;
Employing can make the filtering method that image brightness distribution is consistent with grain distribution carry out filtering to described region to be adjusted, obtains the filtered brightness value of each pixel in described region to be adjusted;
Fusion is weighted to the filtered brightness value of each pixel and original luminance value in described region to be adjusted, obtains the image after repairing; The process of described Weighted Fusion comprises the following steps:
Calculate the gradient modulus value of each pixel in described region to be adjusted, and calculate the Sigmoid functional value about described gradient modulus value, described Sigmoid function is as follows:
Wherein, || G (i, j) || be independent variable, represent the gradient-norm of (i, j) place pixel on image; α and β is constant, respectively the pace of change of control Sigmoid curve and degrees of offset;
To each pixel in described region to be adjusted, carrying out with described Sigmoid functional value is weight about the Weighted Fusion of original luminance value and filtered brightness value.
2. image texture repair method as claimed in claim 1, it is characterized in that, the process of described filtering comprises the following steps:
Determine sample areas, and calculate target mean and the target variance of described sample areas;
Travel through all pixels in described region to be adjusted, calculate neighboring mean value and the neighborhood variance of each pixel;
According to target mean and the target variance of described sample areas, and the original luminance value of each pixel, neighboring mean value and neighborhood variance in described region to be adjusted, calculate the filtered brightness value of each pixel in described region to be adjusted.
3. image texture repair method as claimed in claim 2, it is characterized in that, the span of the radius of described neighborhood is between 30 pixel ~ 500 pixels.
4. image texture repair method as claimed in claim 2, is characterized in that, adopt the filtered brightness value of each pixel in region to be adjusted described in following formulae discovery:
I w ( i , j ) = M d + S d S ( i , j ) ( I ( i , j ) - M ( i , j ) )
Wherein, I w(i, j) represents filtered brightness value, M dand S drepresent target mean and target variance respectively, I (i, j) represents at (i, j) original luminance value of place's pixel, M (i, j) and S (i, j) neighboring mean value and the neighborhood variance of (i, j) place pixel is represented respectively.
5. the image texture repair method according to any one of Claims 1 to 4, it is characterized in that: if described image exists dark side, then the distribution of the overall brightness of appointed area in image is first adjusted to and distributes consistent with the overall brightness of sample areas by described method.
6. image texture repair method as claimed in claim 5, it is characterized in that, the process of described adjustment comprises the following steps:
Specifying in image and need region and the sample areas of carrying out brightness adjustment, being designated as appointed area by needing the region of carrying out brightness adjustment in image;
Calculate the histogram of described sample areas and appointed area respectively, column hisgram of going forward side by side mates, and obtains the brightness mapping relations from described appointed area to described sample areas;
Described brightness mapping relations are applied to each pixel in described appointed area.
7. image texture repair method as claimed in claim 1, is characterized in that: described α=-0.15, β=-10.
8. the image texture repair method as described in claim 1 or 7, is characterized in that, the formula of described Weighted Fusion is as follows:
Wherein, I ' (i, j) represents the end value merging rear (i, j) place pixel, I w(i, j) represents the filtered brightness value of (i, j) place pixel, and I (i, j) represents the original luminance value of (i, j) place pixel.
9. an image texture repair method, is characterized in that, comprises the following steps:
Determine the region to be adjusted and the sample areas that need to carry out texture repairing in image;
Calculate the histogram of described sample areas;
Travel through all pixels in described region to be adjusted, each pixel is handled as follows: the histogram 1. calculating neighborhood of pixel points, 2. according to the brightness mapping relations of the histogram of described sample areas and the histogram calculation neighborhood of pixel points of neighborhood and described sample areas, the brightness mapping value of all pixels in neighborhood is 3. calculated according to described brightness mapping relations;
After traversal terminates, one group of brightness mapping value that each pixel is tried to achieve is weighted on average, obtains the final brightness mapping value of this pixel;
Fusion is weighted to the final brightness mapping value of each pixel in described region to be adjusted and original luminance value, obtains the image after repairing; The process of described Weighted Fusion comprises the following steps:
Calculate the gradient modulus value of each pixel in described region to be adjusted, and calculate the Sigmoid functional value about described gradient modulus value, described Sigmoid function is as follows:
Wherein, || G (i, j) || be independent variable, represent the gradient-norm of (i, j) place pixel on image; α and β is constant, respectively the pace of change of control Sigmoid curve and degrees of offset;
To each pixel in described region to be adjusted, carrying out with described Sigmoid functional value is weight about the Weighted Fusion of original luminance value and described final brightness mapping value.
10. image texture repair method as claimed in claim 9, it is characterized in that, the span of the radius of described neighborhood is between 20 pixel ~ 100 pixels.
11. image texture repair method as claimed in claim 9, is characterized in that: described α=-0.15, β=-30.
12. image texture repair method as claimed in claim 9, it is characterized in that, described fusion formula is as follows:
Wherein, I ' (i, j) represents the end value merging rear (i, j) place pixel, I w(i, j) represents the final brightness mapping value of (i, j) place pixel, and I (i, j) represents the original luminance value of (i, j) place pixel.
13. 1 kinds of image texture repair systems, is characterized in that: comprise the determining device (11) for determining the region to be adjusted needing to carry out texture repairing in image;
The image brightness distribution filtering method consistent with grain distribution can be made to treat adjustment region carry out filtering, obtain the filter (12) of brightness value after each pixel filtering in region to be adjusted for adopting;
The fusing device (13) of fusion is weighted for treating the filtered brightness value of each pixel and original luminance value in adjustment region; Described fusing device (13) comprises the gradient modulus value for calculating each pixel in described region to be adjusted, and calculates the 4th computing unit (131) about the Sigmoid functional value of described gradient modulus value;
For treating each pixel in adjustment region, the integrated unit (132) about the Weighted Fusion of brightness value after original luminance value and filtering that to carry out with Sigmoid functional value be weight.
14. image texture repair systems as claimed in claim 13, is characterized in that: described filter (12) comprises the determining unit (121) for determining sample areas;
For traveling through the Traversal Unit (122) of all pixels in region to be adjusted;
For calculating target mean and the target variance of sample areas, and calculate the neighboring mean value of each pixel and first computing unit (123) of neighborhood variance;
For according to the target mean of sample areas and target variance, and the original luminance value of each pixel, neighboring mean value and neighborhood variance in region to be adjusted, calculate second computing unit (124) of the filtered brightness value of each pixel in region to be adjusted.
15. image texture repair systems as described in claim 13 or 14, is characterized in that: described system also comprises the distribution of the overall brightness in described region to be adjusted is adjusted to the brightness adjusting device (15) distributing consistent with the overall brightness of the sample areas of specifying.
16. image texture repair systems as claimed in claim 15, it is characterized in that: described brightness adjusting device (15) comprises the designating unit (151) being used to specify in image and needing region and the sample areas of carrying out brightness adjustment, is designated as appointed area by needing the region of carrying out brightness adjustment in image;
For calculating histogrammic 3rd computing unit (152) of sample areas and appointed area;
For mating appointed area histogram and sample areas histogram, obtain the matching unit (153) of the brightness mapping relations from appointed area to sample areas;
For brightness mapping relations being applied to the applying unit (154) of each pixel in appointed area.
17. 1 kinds of image texture repair systems, is characterized in that, comprise the determining device (111) for the region to be adjusted and sample areas of determining to need in image to carry out texture repairing;
For calculating sample areas histogram and histogrammic first calculation element (112) of neighborhood of pixel points;
For traveling through the traversal device (113) of all pixels in region to be adjusted;
For the brightness mapping relations according to described sample areas histogram and neighborhood histogram calculation neighborhood of pixel points and sample areas, all pixel intensity mapping value in neighborhood are calculated according to brightness mapping relations, and after traversal terminates, one group of brightness mapping value that each pixel is tried to achieve is weighted on average, obtains second calculation element (114) of the final brightness mapping value of this pixel;
Final brightness mapping value and original luminance value for treating each pixel in adjustment region are weighted the fusing device (115) of fusion; Described fusing device (115) comprises the gradient modulus value for calculating each pixel in described region to be adjusted, and calculates the computing unit (1151) about the Sigmoid functional value of described gradient modulus value;
For treating each pixel in adjustment region, carrying out with Sigmoid functional value is weight about the integrated unit (1152) of the Weighted Fusion of original luminance value and described final brightness mapping value.
CN201110308150.5A 2011-10-12 2011-10-12 A kind of image texture repair method and system Active CN103049886B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110308150.5A CN103049886B (en) 2011-10-12 2011-10-12 A kind of image texture repair method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110308150.5A CN103049886B (en) 2011-10-12 2011-10-12 A kind of image texture repair method and system

Publications (2)

Publication Number Publication Date
CN103049886A CN103049886A (en) 2013-04-17
CN103049886B true CN103049886B (en) 2015-10-28

Family

ID=48062516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110308150.5A Active CN103049886B (en) 2011-10-12 2011-10-12 A kind of image texture repair method and system

Country Status (1)

Country Link
CN (1) CN103049886B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260997B (en) * 2015-09-22 2019-02-01 北京医拍智能科技有限公司 A kind of method of automatic acquisition target image
CN106650794B (en) * 2016-11-24 2019-10-01 北京理工大学 A kind of image bloom removing method influenced by body surface high light reflectivity and system
CN107622481B (en) * 2017-10-25 2022-09-30 东软医疗系统股份有限公司 Method and device for reducing CT image noise and computer equipment
CN108830330B (en) * 2018-06-22 2021-11-02 西安电子科技大学 Multispectral image classification method based on self-adaptive feature fusion residual error network
CN109816615B (en) * 2019-03-06 2022-12-16 腾讯科技(深圳)有限公司 Image restoration method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1742178A2 (en) * 2005-07-05 2007-01-10 Xerox Corporation Contrast enhancement of images
CN101569199A (en) * 2007-10-03 2009-10-28 松下电器产业株式会社 Method and device for reducing block distortion
CN101770639A (en) * 2010-01-14 2010-07-07 北京航空航天大学 Enhancement method of low-illumination image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1742178A2 (en) * 2005-07-05 2007-01-10 Xerox Corporation Contrast enhancement of images
CN101569199A (en) * 2007-10-03 2009-10-28 松下电器产业株式会社 Method and device for reducing block distortion
CN101770639A (en) * 2010-01-14 2010-07-07 北京航空航天大学 Enhancement method of low-illumination image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于Wallis滤波的改进小波去噪方法研究;朱丽娜 等;《地理空间信息》;20061231;第4卷(第6期);第55-56页 *
直方图匹配图像增强技术的算法研究与实现;吴铁洲 等;《湖北工业大学学报》;20050430;第20卷(第2期);第59页 *

Also Published As

Publication number Publication date
CN103049886A (en) 2013-04-17

Similar Documents

Publication Publication Date Title
CN103049886B (en) A kind of image texture repair method and system
CN107730475B (en) Image enchancing method and system
CN101685605B (en) Method and apparatus of local contrast enhancement
CN103150708B (en) Based on the image Quick demisting optimization method of black channel
KR101980024B1 (en) Greyscale value setting method for liquid crystal panel, and liquid crystal display
CN108711140A (en) A kind of image brightness uniformity real-time recovery method based on inter-class variance description
CN101661725A (en) Image display apparatus
CN104008528B (en) Nonuniform illumination Underwater Target Detection image enchancing method based on Threshold segmentation
CN104299574B (en) Automatic current limiting method for OLED display drive apparatus
US20140198993A1 (en) Exposure enhancement method and apparatus for a defogged image
CN105701780A (en) Remote sensing image processing method and system thereof
CN107799080A (en) A kind of liquid crystal pixel compensation method based on segmented curve
CN107527325A (en) A kind of monocular underweater vision Enhancement Method preferential based on dark
CN107610147A (en) A kind of waste film Reinforced Aeolian Sand method for processing foundation
CN110969584B (en) Low-illumination image enhancement method
CN104166969A (en) Digital image enhancement method and system
CN113920030B (en) Large-area high-fidelity satellite remote sensing image uniform color mosaic processing method and device
CN103761714A (en) Color image enhancement method based on HIS color space
CN104463846B (en) Parameter adjustment method used for digital image processing
CN102385757A (en) Semantic restriction texture synthesis method based on geometric space
CN104504666A (en) Tone mapping method based on Laplacian pyramid
CN115660992A (en) Local backlight dimming method, system, device and medium
CN109003241A (en) A kind of linear image Enhancement Method with dual control function
CN108344670A (en) A kind of subregion material circle pollution monitor system applied to dam facing filling construction scene
CN112598777B (en) Haze fusion method based on dark channel prior

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230807

Address after: 430000 No. 01, floor 11, office tower unit, Guanggu financial center construction project, No. 668, Gaoxin Avenue, Donghu New Technology Development Zone, Wuhan, Hubei Province

Patentee after: Fangzhu (Wuhan) Technology Co.,Ltd.

Patentee after: FOUNDER INTERNATIONAL Co.,Ltd.

Address before: 19th Floor, Zhongxin Building, No. 52 North Fourth Ring West Road, Haidian District, Beijing, 100871

Patentee before: Founder International Co.,Ltd. (Beijing)

Patentee before: FOUNDER INTERNATIONAL Co.,Ltd.