CN104933682A - Integrated denoising method of inscription-like images - Google Patents

Integrated denoising method of inscription-like images Download PDF

Info

Publication number
CN104933682A
CN104933682A CN201510299028.4A CN201510299028A CN104933682A CN 104933682 A CN104933682 A CN 104933682A CN 201510299028 A CN201510299028 A CN 201510299028A CN 104933682 A CN104933682 A CN 104933682A
Authority
CN
China
Prior art keywords
pixel
brigade commander
image
noise
stone tablet
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
CN201510299028.4A
Other languages
Chinese (zh)
Other versions
CN104933682B (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 University ZJU
Original Assignee
Zhejiang University ZJU
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 University ZJU filed Critical Zhejiang University ZJU
Priority to CN201510299028.4A priority Critical patent/CN104933682B/en
Publication of CN104933682A publication Critical patent/CN104933682A/en
Application granted granted Critical
Publication of CN104933682B publication Critical patent/CN104933682B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses an integrated denoising method of inscription-like images. The method comprises the following steps: performing smoothing processing on input inscription-like images to be processed by use of a double-side filtering method; performing enhancement processing on the images subjected to the smoothing processing successively by use of a top hat transformation method and bottom hat transformation method; carrying out binary processing on the images subjected to the enhancement processing by use of an Ostu method; and performing denoising processing on the images subjected to the binary processing by use of a mixed method of run-length statistics and area communication to obtain denoised inscription-like images. The integrated denoising method of the inscription-like images solves the problem of excessive denoising of the inscription-like images in the prior art.

Description

A kind of integrated denoising method of upright stone tablet class image
Technical field
The invention belongs to technical field of image processing, relate to a kind of integrated denoising method of upright stone tablet class image.
Background technology
Rubbings is important carrier and the preservation form that ancient Chinese calligraphy passes on later age, using and developing along with Chinese character, the rubbings spread so far all goes through 1,100, and with the art form of its uniqueness and the artistic speech textual research and explain intension of traditional Chinese culture, to research Chinese culture, there is important value.These rubbings are deposited mainly with material object greatly at present, but because material object is deposited environmental requirement very strict, although people have taken several steps and have solved environmental problem, but As time goes on, various rubbings works still there will be such as fade, bleeding, papery variable color embrittlement, crackle, the phenomenon such as to go mouldy.Therefore, the mode deposited of rubbings material object is unfavorable for the protection of precious cultural heritage, the also study of inconvenient people, research and succession.
In recent years, along with the development of the correlation techniques such as the universal of computing machine and digitizer, the form that a large amount of upright stone tablet class document is converted into digital picture stores in a computer, for the preservation of ancient book method rubbings, propagation and research are provided convenience, but corrode due to long weathering, and the reason such as artificial damage, all there is a lot of noise in these upright stone tablet class image documents, comprise the noise on ground unrest and calligraphy font profile, serious is even smudgy, so in order to be further processed upright stone tablet class image, under the prerequisite not damaging Chinese character calligraphy feature in upright stone tablet image, just need to carry out denoising to upright stone tablet class image.
At present, the method of upright stone tablet class image being carried out to denoising has a lot, as anisotropy smoothing denoising, medium filtering etc., but because the noise-shape in upright stone tablet class image, size and distribution are general comparatively random, when said method is used for upright stone tablet class image denoising, effect is not very desirable, also destroys the shape facility of Chinese character in upright stone tablet class image simultaneously, the angle that the tip of such as stroke and folded pen are formed is easily fuzzy, causes the forfeiture of former wordbook method style and features.For this reason, someone proposes again to adopt anisotropy parameter algorithm to make smoothing processing to calligraphy file and picture, then part random noise is removed in conjunction with Binarization methods, but because level and smooth upright stone tablet class image may cause the block distortion that discrete rubbings the formation of noise is larger, these block distortions and stroke are very approximate dimensionally, and ensuing image procossing can be caused more difficult.Therefore, someone proposes a kind of denoise algorithm based on brigade commander's statistics, though the method can remove most block distortion in upright stone tablet class image, also has some isolated large noise spots and wire noise are still retained and occur the phenomenon that stroke lacks.These methods all exist the excessive problem of upright stone tablet class image denoising.
Summary of the invention
The object of this invention is to provide a kind of integrated denoising method of upright stone tablet class image, solve the problem excessive to upright stone tablet class image denoising existed in prior art.
The theoretical principle of denoising method institute of the present invention foundation is: the Chinese character of China is all deformation construction by some simple basic strokes or these basic strokes, and the most basic several strokes comprise: point, horizontal, vertical, skim, right-falling stroke, as shown in Figure 1.Can find that these basic strokes have following two features by observing: 1) stroke width consecutive variations; 2) stroke has obvious direction.And the noise in upright stone tablet class image has the feature of stochastic distribution, and noise width is generally little compared with stroke width.
The technical solution adopted in the present invention is, a kind of denoising method of upright stone tablet class image, implements according to following steps:
Step 1, adopts bilateral filtering method to the pending smoothing process of upright stone tablet class image of input;
Step 2, adopts cap transformation method and bot-hat transformation method to carry out enhancing process to the image through smoothing processing successively;
Step 3, carries out binary conversion treatment to through strengthening the image after process;
Step 4, adopts the mixed method of brigade commander's statistics and connected region to carry out denoising to the image through binary conversion treatment, obtains the upright stone tablet class image after denoising.
The present invention is based on the difference of stroke and noise, a kind of integrated denoising method of upright stone tablet class image is proposed, first noise in bilateral filtering smoothed image is utilized, high bot-hat transformation is utilized to strengthen picture contrast, then binaryzation is carried out, finally utilize the stroke brigade commander of Chinese character and connected region to carry out denoising, substantially increase the denoising quality of upright stone tablet class image.
In described step (1), bilateral filtering method is specifically implemented in accordance with the following methods:
B x = 1 k ( x ) Σ ξ ∈ Ω c ( ξ , x ) s ( I ξ , I x ) I ξ , - - - ( 1 )
Wherein, B xfor bilateral filtering result, Ω is the neighborhood window centered by current pixel x, c (ξ, x) and s (I ξ, I x) be two Gaussian functions, represent the space similarity weights of pixel x and its neighborhood point ξ, gray scale similarity weights respectively; I ξrepresent the gray-scale value of some ξ;
K (x) is normalized function:
k ( x ) = Σ ξ ∈ Ω c ( ξ , x ) s ( I ξ , I x ) . - - - ( 2 )
The value of Ω is directly connected to the degree of accuracy of the denoising result finally obtained, by estimating setting to the noise of pending upright stone tablet class image.Usual noise is less, and neighborhood window is less, otherwise larger.For ease of calculating, neighborhood window is square, and for ensureing that each pixel is the center of the neighborhood window of its correspondence, the length of side of this field window is odd number of pixels point.Consider versatility, when adopting bilateral filtering method in described step 1, the size of the neighborhood window that each pixel is corresponding is 5 × 5 ~ 11 × 11 (unit is pixel), and is odd number.
Described step 2 is concrete to be implemented in accordance with the following methods:
I enhancement=I+(TH-BH), (3)
Cap transformation specifically calculates in accordance with the following methods:
TH=I-(I·S), (4)
Bot-hat transformation specifically calculates in accordance with the following methods:
BH=(I·S)-I, (5)
Wherein, I enhancementbe Output rusults, I is the image that former figure, TH are through cap transformation, and BH is through the result of bot-hat transformation, and S is convolution mask, and the present invention adopts circular convolution mask.
In described step 3 adopt Ostu to carry out binary conversion treatment to image, concrete grammar is implemented as follows:
σ ω 2 = ω 1 σ 1 2 + ω 2 σ 2 2 , - - - ( 6 )
In formula, ω 1refer to the probability occurred by the 1st class after threshold value t segmentation; ω 2refer to the probability occurred by the 2nd class after threshold value t segmentation;
ω 1 = Σ i = 0 t p ( i ) , ω 2 = 1 - ω 1 , - - - ( 7 )
σ 1 2 = ( u A - u T ) 2 , σ 2 2 = ( u B - u T ) 2 , - - - ( 8 )
Wherein, i is gray-scale value, p irefer to that gray-scale value is the probability of i;
U a, u band u tbe the average gray value of class A, class B and entire image respectively, definition is respectively:
u A = Σ i = 0 t ip ( i ) / ω 1 , u B = Σ i = i + 1 k - 1 ip ( i ) / ω 2 , u T = Σ i = 0 k - 1 ip ( i ) , - - - ( 9 )
Wherein, t is binary-state threshold, and k is maximum gradation value.
According to the binary-state threshold t obtained, binary conversion treatment is carried out to the image after enhancing.
Step 4 is specifically implemented according to following steps:
Step 4-1, carries out horizontal scanning to the pixel of Chinese character and noise left hand edge in upright stone tablet class image, finds all pixel p [i, j] of Chinese character and noise left hand edge, and is stored in set A; Vertical scanning is carried out to the pixel of Chinese character and noise coboundary in upright stone tablet class image, finds all pixel p [i, j] of Chinese character and noise coboundary, and be stored in set B;
In the present invention, left hand edge pixel is defined as follows:
P[i,j]={p[i,j]=1|p(i,j+1)=1&p(i,j-1)=0}, (10)
Coboundary pixel is defined as follows:
P[i,j]={p[i,j]=1|p(i+1,j)=1&p(i-1,j)=0}, (11)
Wherein, i, j are the coordinate of pixel in upright stone tablet class image.
Step 4-2, removes the interference that long bar is drawn and long perpendicular stroke is added up brigade commander;
The horizontal brigade commander f of each pixel p [i, j] in set of computations A; Horizontal brigade commander f fixes three pixels horizontal brigade commander f is divided into the quartern; Calculate the vertical brigade commander f of three pixel present positions respectively 1if, the vertical brigade commander f of any one pixel present position in three pixels 1be less than 3/f, then think that this horizontal brigade commander f is that long bar is drawn, and long bar is drawn removal; Otherwise this pixel is stored in set Q;
F is horizontal brigade commander:
f={f=c-b|p[a,b]=1&p[a,b-1]=0&p[a,b+1]=1
,(12)
&p[a,c]=0&p[a,c-1]=1&p[a,c+1]=0&c≥b}
Wherein, p [a, b] ∈ A.
The vertical brigade commander r of each pixel p [i, j] in set of computations B, vertical brigade commander r fixes three pixels vertical brigade commander r is divided into the quartern, calculates the horizontal brigade commander r of three pixel present positions respectively 1if, the horizontal brigade commander r of any one pixel present position in three pixels 1be less than 3/r, then think that this vertical brigade commander r is long perpendicular stroke, and long perpendicular stroke is removed; Otherwise this pixel is stored in set Q;
R is vertical brigade commander:
r={r=c-b|p[b,a]=1&p[b-1,a]=0&p[b+1,a]=1
,(13)
&p[c,a]=0&p[c-1,a]=1&p[c+1,a]=0&c≥b}
Wherein, p [b, a] ∈ B.
Step 4-3, to utilize in set Q brigade commander's probability density of pixel according to following formulae discovery for distinguishing the threshold T of stroke and little noise:
T = μ 1 + μ 2 2 + σ 2 μ 1 - μ 2 ln ( a 1 a 2 ) ,
Wherein, a1 and a2 represents brigade commander's probability density of upright stone tablet class noise in image and Chinese character respectively, and a1+a2=1,
μ 1and μ 2represent the average of noise brigade commander's Gaussian distribution and stroke brigade commander Gaussian distribution respectively, σ is noise brigade commander Gaussian distribution and stroke brigade commander Gaussian distribution variance;
By carrying out horizontal scanning to upright stone tablet class image left edge and coboundary carries out vertical scanning, brigade commander's statistics of noise and Chinese-character stroke can be obtained, brigade commander's width major part value of noise is less than normal, brigade commander's width major part value of Chinese-character stroke is bigger than normal, therefore need to determine a threshold T, distinguish noise and Chinese-character stroke width.Circular is as follows:
A. suppose that the brigade commander of Chinese character and noise in upright stone tablet class image mixes probability density and is:
p(r)=a1p 1(r)+a2p 2(r) (14)
In formula, a1 and a2 represents brigade commander's probability density of upright stone tablet noise in image and Chinese character respectively, and a1+a1=1, p 1(r) and p 2r () is respectively the Gauss Distribution Fitting result of noise and stroke, and
p ( r ) = a 1 2 π σ 1 e ( r - μ 1 ) 2 2 σ 1 2 + a 2 2 π σ 2 e ( r - μ 2 ) 2 2 σ 2 2 - - - ( 15 )
In formula, μ 1with represent average and the variance of noise brigade commander Gaussian distribution respectively, μ 2with represent average and the variance of stroke brigade commander Gaussian distribution respectively, r is brigade commander;
If b. stroke brigade commander is mistaken as noise brigade commander, then error is:
E 1 ( T ) = ∫ - ∞ T p 2 ( r ) dr - - - ( 16 )
If noise brigade commander is mistaken as stroke brigade commander, then error is:
E 2 ( T ) = ∫ T + ∞ p 1 ( r ) dr - - - ( 17 )
Then the expression formula of Chinese-character stroke and the total error of noise is:
E(T)=a1E 1(T)+a2E 2(T) (18)
Asking threshold T, is namely the threshold T asking the minimalization making E (T), when solving:
To T differentiate, the solution asking equation (19) is obtained to formula (18):
a1p 1(T)=a2p 2(T) (19)
For ease of calculation assumption and by Gauss Distribution Fitting function with in substitution formula (19), obtaining threshold T is:
μ 1 + μ 2 2 σ 2 μ 1 - μ 2 ln ( a 1 a 2 ) . - - - ( 20 )
In the present invention, the span of a1/a2 is 0.05 ~ 0.2, μ 1span be 3 ~ 6, μ 2span be the span of 7 ~ 10, σ be 0 ~ 2.As preferably, a1/a2=0.1, μ 1=4, μ 2=8, σ=1.
Step 4-4, determines connected region, and removes isolated large noise according to pixel number total in connected region and the ratio of the pixel number being greater than threshold T;
A. upright stone tablet class image leftmost edge pixel or uppermost edge pixel is found by horizontal scanning and vertical scanning;
B. traveling through the pixel finding and be communicated with leftmost edge or uppermost edge and being retained in gathers in C;
C. the threshold T obtained in the brigade commander of all pixels in set C and step 4-3 is compared, if the brigade commander of a certain pixel is greater than threshold value in set C, then this pixel is stored in set D;
If the number d. gathering pixel in C is less than number ratio threshold value T1 with the quantity ratio of pixel in set D, then judge that set C is stroke region; Otherwise, the pixel in set C is removed.As preferably, the value of described number ratio threshold value T1 is 1.0 ~ 3.5.
Compared with prior art, beneficial effect of the present invention is as follows:
By noise in bilateral filtering smoothed image, high bot-hat transformation is utilized to strengthen picture contrast, then utilize Ostu method by image binaryzation, the stroke brigade commander of Chinese character and connected region is finally utilized to carry out denoising, not removing only the noise of image, and clearly enhance the contrast of image, strengthen the Chinese character of fuzzy dimness in image, significantly improve the visual effect of image.Contrast traditional brigade commander's method, method of the present invention can retain original form of font well, and noise is removed effectively in the basis not damaging font architecture.Cannot remove the situation of isolated large noise etc. for traditional brigade commander's method, the method herein in conjunction with connected region can be removed effectively.
Accompanying drawing explanation
Fig. 1 is the basic stroke of Chinese character and the schematic diagram in direction thereof;
Fig. 2 is the schematic flow sheet of the upright stone tablet class image de-noising method of the present embodiment;
Fig. 3 is undressed original image;
Fig. 4 is through the image after bilateral filtering process;
Fig. 5 is through the image that height cap conversion process is crossed;
Fig. 6 is through the image after Ostu method binary conversion treatment;
Fig. 7 is the schematic diagram removing bar drawing method in horizontal scanning;
Fig. 8 is through the image after brigade commander's statistics and the process of connected region mixed method;
Fig. 9 be through medium filtering after image;
Figure 10 be through mean filter after image;
Figure 11 is through the image after gaussian filtering process.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is described in detail.
The theoretical principle of the denoising method institute foundation of the present embodiment is: the Chinese character of China is all deformation construction by some simple basic strokes or these basic strokes, and the most basic several strokes comprise: point, horizontal, vertical, skim, right-falling stroke, as shown in Figure 1.Can find that these basic strokes have following two features by observing: 1) stroke width consecutive variations; 2) stroke has obvious direction.And the noise in upright stone tablet class image has the feature of stochastic distribution, and noise width is generally little compared with stroke width.
Based on the above-mentioned difference of stroke and noise in the present embodiment, a kind of integrated denoising method of upright stone tablet class image is proposed, first noise in bilateral filtering smoothed image is utilized, high bot-hat transformation is utilized to strengthen picture contrast, then utilize Ostu method by image binaryzation, finally utilize the stroke brigade commander of Chinese character and connected region to carry out denoising.
The denoising method of the upright stone tablet class image of the present embodiment, as shown in Figure 2, specifically implement according to following steps:
Step 1, adopts the pending upright stone tablet class image of bilateral filtering method to input to carry out filtering;
Wherein, bilateral filtering method is specifically implemented in accordance with the following methods:
B x = 1 k ( x ) Σ ξ ∈ Ω c ( ξ , x ) s ( I ξ , I x ) I ξ , - - - ( 1 )
Wherein, B xfor bilateral filtering result, Ω is the neighborhood window (in the present embodiment, the size of neighborhood window is 7x7) centered by current pixel x, c (ξ, x) and s (I ξ, I x) be two Gaussian functions, represent the space similarity weights of pixel x and its neighborhood point ξ, gray scale similarity weights respectively; I ξrepresent the intensity level of some ξ;
K (x) is normalized function:
k ( x ) = Σ ξ ∈ Ω c ( ξ , x ) s ( I ξ , I x ) , - - - ( 2 )
Step 2, adopts cap transformation method and bot-hat transformation method to carry out enhancing process to the image processed after filtering;
In the present embodiment, step 2 is concrete implements in accordance with the following methods:
I enhancement=I+(TH-BH), (3)
Cap transformation specifically calculates in accordance with the following methods:
TH=I-(I·S), (4)
Bot-hat transformation specifically calculates in accordance with the following methods:
BH=(I·S)-I, (5)
Wherein, I enhancementbe Output rusults, I is the image that former figure, TH are through cap transformation, and BH is through the result of bot-hat transformation, and S is circular convolution mask;
The present embodiment step 1 and step 2 are referred to as the smoothing process of image.
Step 3, adopts Ostu method to carry out binary conversion treatment to through strengthening the image after process;
Adopt Ostu to carry out binary conversion treatment to image to implement in accordance with the following methods:
σ ω 2 = ω 1 σ 1 2 + ω 2 σ 2 2 , - - - ( 6 )
In formula, ω 1refer to the probability occurred by the 1st class after threshold value t segmentation; ω 2refer to the probability occurred by the 2nd class after threshold value t segmentation;
ω 1 = Σ i = 0 t p ( i ) , ω 2 = 1 - ω 1 , - - - ( 7 )
σ 1 2 = ( u A - u T ) 2 , σ 2 2 = ( u B - u T ) 2 , - - - ( 8 )
Wherein, i is gray-scale value, p irefer to that gray-scale value is the probability of i;
U a, u band u tbe the average gray value of class A, class B and entire image respectively, definition is respectively:
u A = Σ i = 0 t ip ( i ) / ω 1 , u B = Σ i = i + 1 k - 1 ip ( i ) / ω 2 , u T = Σ i = 0 k - 1 ip ( i ) , - - - ( 9 )
Wherein, t is binary-state threshold, and k is maximum gradation value;
Step 4, the method of brigade commander's statistics and connected region is adopted to carry out denoising (namely comprehensive utilization brigade commander statistics and connected region are to reduce noise) to the image through binary conversion treatment, obtain the upright stone tablet class image after denoising, specifically implement according to following steps:
Step 4-1, carries out horizontal scanning to the pixel of Chinese character and noise left hand edge in upright stone tablet class image, finds all pixel p [i, j] of Chinese character and noise left hand edge, and is stored in set A; Vertical scanning is carried out to the pixel of Chinese character and noise coboundary in upright stone tablet class image, finds all pixel p [i, j] of Chinese character and noise coboundary, and be stored in set B;
Left hand edge pixel is defined as follows:
P[i,j]={p[i,j]=1|p(i,j+1)=1&p(i,j-1)=0}, (10)
Coboundary pixel is defined as follows
P[i,j]={p[i,j]=1|p(i+1,j)=1&p(i-1,j)=0}, (11)
Step 4-2, removes the interference that long bar is drawn and long perpendicular stroke is added up brigade commander;
The horizontal brigade commander f of each pixel p [i, j] in set of computations A; Horizontal brigade commander f fixes three pixels horizontal brigade commander f is divided into the quartern; Calculate the vertical brigade commander f of three pixel present positions respectively 1if, the vertical brigade commander f of any one pixel present position in three pixels 1be less than 3/f, then think that this horizontal brigade commander f is that long bar is drawn, and long bar is drawn removal; Otherwise this pixel is stored in set Q;
F is horizontal brigade commander:
f={f=c-b|p[a,b]=1&p[a,b-1]=0&p[a,b+1]=1
,(12)
&p[a,c]=0&p[a,c-1]=1&p[a,c+1]=0&c≥b}
Wherein, p [a, b] ∈ A
The vertical brigade commander r of each pixel p [i, j] in set of computations B, vertical brigade commander r fixes three pixels vertical brigade commander r is divided into the quartern, calculates the horizontal brigade commander r of three pixel present positions respectively 1if, the horizontal brigade commander r of any one pixel present position in three pixels 1be less than 3/r, then think that this vertical brigade commander r is long perpendicular stroke, and long perpendicular stroke is removed; Otherwise this pixel is stored in set Q;
R is vertical brigade commander:
r={r=c-b|p[b,a]=1&p[b-1,a]=0&p[b+1,a]=1
,(13)
&p[c,a]=0&p[c-1,a]=1&p[c+1,a]=0&c≥b}
Wherein, p [b, a] ∈ B
Step 4-3, to utilize in set Q brigade commander's probability density of pixel according to following formulae discovery for distinguishing the threshold T of stroke and little noise:
T = μ 1 + μ 2 2 + σ 2 μ 1 - μ 2 ln ( a 1 a 2 ) ,
Wherein, a1 and a2 represents brigade commander's probability density of upright stone tablet class noise in image and Chinese character respectively, and a1+a2=1,
μ 1and μ 2represent the average of noise brigade commander's Gaussian distribution and stroke brigade commander Gaussian distribution respectively, σ is noise brigade commander Gaussian distribution and stroke brigade commander Gaussian distribution variance;
By carrying out horizontal scanning to upright stone tablet class image left edge and coboundary carries out vertical scanning, brigade commander's statistics of noise and Chinese-character stroke can be obtained, brigade commander's width major part value of noise is less than normal, brigade commander's width major part value of Chinese-character stroke is bigger than normal, therefore need to determine a threshold T, distinguish noise and Chinese-character stroke width.Circular is as follows:
A. suppose that the brigade commander of Chinese character and noise in upright stone tablet class image mixes probability density and is:
p(r)=a1p 1(r)+a2p 2(r) (14)
In formula, a1 and a2 represents brigade commander's probability density of upright stone tablet noise in image and Chinese character respectively, and a1+a2=1, p 1(r) and p 2r () is respectively the Gauss Distribution Fitting result of noise and stroke, and
p ( r ) = a 1 2 π σ 1 e ( r - μ 1 ) 2 2 σ 1 2 + a 2 2 π σ 2 e ( r - μ 2 ) 2 2 σ 2 2 - - - ( 15 )
In formula, μ 1with represent average and the variance of noise brigade commander Gaussian distribution respectively, μ 2with represent average and the variance of stroke brigade commander Gaussian distribution respectively, r is brigade commander;
If b. stroke brigade commander is mistaken as noise brigade commander, then error is:
E 1 ( T ) = ∫ - ∞ T p 2 ( r ) dr - - - ( 16 )
If noise brigade commander is mistaken as stroke brigade commander, then error is:
E 2 ( T ) = ∫ T + ∞ p 1 ( r ) dr - - - ( 17 )
Then the expression formula of Chinese-character stroke and the total error of noise is:
E(T)=a1E 1(T)+a2E 2(T) (18)
Asking threshold T, is namely the threshold T asking the minimalization making E (T), when solving:
To T differentiate, the solution asking equation (19) is obtained to formula (18):
a1p 1(T)=a2p 2(T) (19)
For ease of calculation assumption and by Gauss Distribution Fitting function with in substitution formula (19), obtaining threshold T is:
μ 1 + μ 2 2 σ 2 μ 1 - μ 2 ln ( a 1 a 2 ) . - - - ( 20 )
A1/a2=0.1, μ in the present embodiment 1=4, μ 2=8, σ=1.
Step 4-4, determines connected region, and removes according to pixel number total in connected region and the ratio of pixel number being greater than threshold T and isolate large noise and obtain integrated denoising result;
A. upright stone tablet class image leftmost edge pixel or uppermost edge pixel is found by horizontal scanning and vertical scanning;
B. traveling through the pixel finding and be communicated with leftmost edge or uppermost edge and being retained in gathers in C;
C. the threshold T obtained in the brigade commander of all pixels in set C and step 4-3 is compared, if the brigade commander of a certain pixel is greater than threshold value in set C, then this pixel is stored in set D;
If the number d. gathering pixel in C is less than number ratio threshold value T1 with the quantity ratio of pixel in set D, then judge that set C is stroke region; Otherwise, the pixel in set C is removed.In the present embodiment, number ratio threshold value T1 value is 1.5.
Utilize bilateral filtering by the smoothing process of upright stone tablet class image of input in the present embodiment, because bilateral filtering is a kind of nonlinear edge fidelity smoothing filter, and there is the features such as simple, non-iterative, local, it is utilized to carry out refinement to transmissivity, not only can reach the effect of edge fidelity, decrease algorithm execution time simultaneously; By formula (1) and formula (2) known, two-sided filter not only considers the space proximity between pixel when calculating the value of pixel, consider the grey similarity of pixel simultaneously, therefore in gray scale sudden changes place such as the edge of image and details, due to the nonlinear combination of the two, can take into account level and smooth and protect limit.Fig. 3 is original image, and Fig. 4 is through the image after bilateral filtering process, and as can be seen from Fig. 3 and Fig. 4, after bilateral filtering process, image obtains smoothly.
Utilize height cap transfer pair step 1 to process the image obtained to strengthen.An important use of high bot-hat transformation is the impact correcting uneven illumination, and the bright object grayscale morphology of cap transformation on dark background, bot-hat transformation is then for contrary situation.High and low cap conversion is combined, and display foreground and background gray scale can be made to be stretched further, highlight related objective and details, play the effect of image enhaucament.The core concept of high bot-hat transformation is the result that original image adds cap transformation, then deducts bot-hat transformation, effectively can improve the contrast of image.Fig. 5 is through the image after the enhancing of high bot-hat transformation, and from Fig. 4 and Fig. 5 contrast, can find out, after high bot-hat transformation, picture contrast is obviously enhanced.
In order to remove the interference of background to image denoising, need the upright stone tablet class image after height cap conversion process to change into bianry image.Choosing for upright stone tablet class image binaryzation of threshold value is very crucial.It needs the image information that can retain font fully, can remove again the interference that background may cause to the full extent.The present invention adopts Otsu Binarization methods to carry out binary conversion treatment to upright stone tablet class image.It obtains an optimum image binaryzation thresholding by the pixel value weighted sum of minimizing image prospect and background.Fig. 6 be into the image of Ostu method two value, from Fig. 5 and Fig. 6 contrast, the image after can finding out binaryzation considerably eliminates the impact of background on the Word message in prospect.
Due to the breakage of font itself, or the reasons such as background wearing and tearing, smoothing, increase contrast, after Denoising disposal and image binaryzation operate, in upright stone tablet class image, considerable noise is removed, but some larger block distortions have still remained, for this reason, the present invention proposes to remove these block distortions based on the mixed method of brigade commander's statistics and connected region.Fig. 7 is through the image of brigade commander's statistics and connected region mixing denoising, from Fig. 6 and Fig. 7 contrast, can find out the mixing denoising through brigade commander's statistics and connected region, before residual noise has been removed substantially, and remains the integrality of Word message to a great extent.
Contrast below by several existing method and upright stone tablet class image de-noising method of the present invention:
Wherein, Fig. 8 be by the upright stone tablet class image de-noising method process of the present embodiment after image (i.e. denoising result); Fig. 9 be through medium filtering after image; Figure 10 be through mean filter after image; Figure 11 is through the image after gaussian filtering process.Can be found out by contrast, utilize the image after the upright stone tablet class image de-noising method process of the present embodiment, font information is wherein more outstanding, and contrast is improved, and denoising result is more natural, and quality is higher.
Table 1 is from average gradient, signal to noise ratio (S/N ratio), information entropy, the upright stone tablet class image de-noising method evaluation to image I denoising result in Fig. 3 of existing three kinds of methods (being respectively medium filtering, mean filter and gaussian filtering) with the present embodiment contrasts by mean square deviation four objective indicators, is specially:
(1) average gradient (i.e. the sharpness of image): be the important indicator weighing image detail contrast ability to express, reflect the speed of image minor detail contrast change, average gradient is larger, image level is more, also more clear, formula (21) gives the definition of average gradient;
g ‾ = 1 ( M - 1 ) ( N - 1 ) × Σ i = 1 M - 1 Σ j = 1 N - 1 ( F ( i , j ) - F ( i + 1 , j ) ) 2 + ( F ( i , j ) - F ( i , j + 1 ) ) 2 2 , - - - ( 21 )
Wherein, the gray-scale value that F (i, j) puts for image (i, j), M, N are respectively total line number of image and total columns;
(2) signal to noise ratio (S/N ratio): represent signal maximum possible power and affect its engineering term of ratio of destructive noise power of expression precision.Y-PSNR is larger, and noise is fewer, and noise removal capability is stronger.The definition of Y-PSNR provides such as formula (22).
PSNR = 10 · log 10 ( MAX I 2 MSE ) = 20 · log 10 ( MAX I MSE ) , - - - ( 22 )
Wherein, MAX ibe the greatest measure representing picture point color, MSE is the mean square deviation of image, is defined as:
MSE = 1 mn Σ i = 0 m - 1 Σ j = 0 n - 1 | | I ( i , j ) - K ( i , j ) | | 2 , - - - ( 23 )
Wherein, m, n are the size of image, and I (I, j) and K (I, j) is original image and denoising image.
(3) information entropy: be weigh the important symbol that image information enriches degree, by the details expressive ability that relatively can contrast between image to image information entropy.Formula (24) gives the definition of entropy, and wherein p (g) represents the distribution probability of gray level g, and L is number of greyscale levels.
EN = - Σ g = 0 L - 1 p ( g ) log 2 p ( g ) , - - - ( 24 )
Table 1
Table 1 is the evaluation index of each method, data as can be seen from table 1, compared to former figure, at average gradient, in information entropy and mean square deviation, mean filter method and gaussian filtering method all decrease, only have median filter method and upright stone tablet class image de-noising method of the present invention at average gradient, information entropy and mean square deviation increase.And the image after the upright stone tablet class image de-noising method denoising of the present embodiment, its average gradient, information entropy, Y-PSNR, mean square deviation, all apparently higher than existing three kinds of methods, this means that image is more clear, and wherein marginal information keeps better, and noise removal capability is better.
Above-described embodiment has been described in detail technical scheme of the present invention and beneficial effect; be understood that and the foregoing is only most preferred embodiment of the present invention; be not limited to the present invention; all make in spirit of the present invention any amendment, supplement and equivalent to replace, all should be included within protection scope of the present invention.

Claims (8)

1. an integrated denoising method for upright stone tablet class image, is characterized in that, comprise the steps:
Step 1, adopts bilateral filtering method to the pending smoothing process of upright stone tablet class image of input;
Step 2, adopts cap transformation method and bot-hat transformation method to carry out enhancing process to the image through smoothing processing;
Step 3, carries out binary conversion treatment to through strengthening the image after process;
Step 4, adopts the method for brigade commander's statistics and connected region to carry out denoising to the image through binary conversion treatment, obtains the upright stone tablet class image after denoising.
2. the integrated denoising method of upright stone tablet class image according to claim 1, is characterized in that, when adopting bilateral filtering method in described step 1, the size of the neighborhood window that each pixel is corresponding is 5 × 5 ~ 11 × 11, and is odd number.
3. the integrated denoising method of upright stone tablet class image according to claim 1, is characterized in that, described step 2 carries out the image I strengthening process enhancementas follows:
I enhancement=I+(TH-BH),
Wherein, TH carries out the result after cap transformation to the image after smoothing processing, TH=I-(IS),
BH is the result of carrying out after bot-hat transformation to image after smoothing processing, BH=(IS)-I,
S is convolution mask.
4. the integrated denoising method of upright stone tablet class image according to claim 1, is characterized in that, in described step 3 adopt Ostu to carry out binary conversion treatment to image.
5., according to the integrated denoising method of the upright stone tablet class image in Claims 1 to 4 described in any one claim, it is characterized in that, described step 4 comprises the steps:
Step 4-1, carries out horizontal scanning to the pixel of Chinese character and noise left hand edge in upright stone tablet class image, determines that all pixels of Chinese character and noise left hand edge form set A;
Vertical scanning is carried out to the pixel of Chinese character and noise coboundary in upright stone tablet class image, determines that all pixels of Chinese character and noise coboundary are formed into set B;
Step 4-2, removes long bar according to the vertical brigade commander of each pixel in the horizontal brigade commander of pixel each in set A and set B and to draw and long perpendicular stroke obtains set Q to the interference that brigade commander adds up;
Step 4-3, to utilize in set Q brigade commander's probability density of pixel according to following formulae discovery for distinguishing the threshold T of stroke and little noise:
T = μ 1 + μ 2 2 + σ 2 μ 1 - μ 2 ln ( a 1 a 2 ) ,
Wherein, a1 and a2 represents brigade commander's probability density of upright stone tablet class noise in image and Chinese character respectively, and a1+a2=1,
μ 1and μ 2represent the average of noise brigade commander's Gaussian distribution and stroke brigade commander Gaussian distribution respectively, σ is noise brigade commander Gaussian distribution and stroke brigade commander Gaussian distribution variance;
Step 4-4, determines connected region, and removes according to pixel number total in connected region and the ratio of pixel number being greater than threshold T and isolate large noise and namely obtain integrated denoising result.
6. the integrated denoising method of upright stone tablet class image according to claim 5, it is characterized in that, described step 4-2 is specific as follows:
The horizontal brigade commander f of each pixel in set of computations A; Horizontal brigade commander f fixes three pixels described horizontal brigade commander f is divided into the quartern; Calculate the vertical brigade commander f of three pixel present positions respectively 1if, the vertical brigade commander f of any one pixel present position in described three pixels 1be less than 3/f, then think that this horizontal brigade commander f is that long bar is drawn, and described long bar is drawn removal; Otherwise this pixel is stored in set Q;
The vertical brigade commander r of each pixel in set of computations B, vertical brigade commander r fixes three pixels described vertical brigade commander r is divided into the quartern, calculates the horizontal brigade commander r of three pixel present positions respectively 1if, the horizontal brigade commander r of any one pixel present position in described three pixels 1be less than 3/r, then think that this vertical brigade commander r is long perpendicular stroke, and described long perpendicular stroke is removed; Otherwise this pixel is stored in set Q.
7. the integrated denoising method of upright stone tablet class image according to claim 5, it is characterized in that, described step 4-4 is specific as follows:
A. determine all pixels be communicated with the pixel of uppermost edge with its leftmost edge in upright stone tablet class image, and form set C;
B. for each pixel in set C, calculate the brigade commander of this pixel, and its brigade commander and described threshold T compared:
If the brigade commander of current pixel point is greater than threshold T, then this pixel is stored in set D;
If the number c. gathering pixel in C is less than default number ratio threshold value T1 with the ratio of the number of pixel in set D, then judge that set C is as stroke region; Otherwise, the pixel of set C is removed.
8. the integrated denoising method of upright stone tablet class image according to claim 7, is characterized in that, described number ratio threshold value is 1.0 ~ 3.5.
CN201510299028.4A 2015-06-03 2015-06-03 A kind of integrated denoising method of upright stone tablet class image Active CN104933682B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510299028.4A CN104933682B (en) 2015-06-03 2015-06-03 A kind of integrated denoising method of upright stone tablet class image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510299028.4A CN104933682B (en) 2015-06-03 2015-06-03 A kind of integrated denoising method of upright stone tablet class image

Publications (2)

Publication Number Publication Date
CN104933682A true CN104933682A (en) 2015-09-23
CN104933682B CN104933682B (en) 2018-07-06

Family

ID=54120837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510299028.4A Active CN104933682B (en) 2015-06-03 2015-06-03 A kind of integrated denoising method of upright stone tablet class image

Country Status (1)

Country Link
CN (1) CN104933682B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458761A (en) * 2019-06-25 2019-11-15 千奥星科南京生物科技有限公司 A kind of brain medicine fluorescence video image restorative procedure

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5264942A (en) * 1990-05-31 1993-11-23 Kabushiki Kaisha Toshiba Image processing system using run-length encoding of filtered data and its repetition count
CN1848137A (en) * 2005-04-13 2006-10-18 佳能株式会社 Method and equipment for intensifying character line image and storage medium
CN101122999A (en) * 2007-04-16 2008-02-13 北京联合大学 Method for automatically extracting stamper image from Chinese painting and calligraphy
CN101989351A (en) * 2010-11-16 2011-03-23 西安理工大学 Suspected lung nodule image enhancement directional scale filtering method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5264942A (en) * 1990-05-31 1993-11-23 Kabushiki Kaisha Toshiba Image processing system using run-length encoding of filtered data and its repetition count
CN1848137A (en) * 2005-04-13 2006-10-18 佳能株式会社 Method and equipment for intensifying character line image and storage medium
CN101122999A (en) * 2007-04-16 2008-02-13 北京联合大学 Method for automatically extracting stamper image from Chinese painting and calligraphy
CN101989351A (en) * 2010-11-16 2011-03-23 西安理工大学 Suspected lung nodule image enhancement directional scale filtering method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张一夫: "碑帖图像文字的分割与提取", 《中国优秀硕士学位论文全文数据库.信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110458761A (en) * 2019-06-25 2019-11-15 千奥星科南京生物科技有限公司 A kind of brain medicine fluorescence video image restorative procedure

Also Published As

Publication number Publication date
CN104933682B (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN110544251B (en) Dam crack detection method based on multi-migration learning model fusion
CN104424457A (en) Method for identifying two-dimensional code under the condition of nonlinear distortion
CN105760859A (en) Method and device for identifying reticulate pattern face image based on multi-task convolutional neural network
CN107330979A (en) Vector diagram generation method and device for building house type and terminal
CN109961416B (en) Business license information extraction method based on morphological gradient multi-scale fusion
CN103020918B (en) Shape-adaptive neighborhood mean value based non-local mean value denoising method
CN105139366A (en) Image enhancement method based on space domain
CN101807294B (en) Image enhancing method using multi-dimensional multi-structural element mathematical morphology
CN104952077B (en) A kind of bill images greasy dirt detection method and system
CN105046677A (en) Enhancement processing method and apparatus for traffic video image
CN102930576A (en) Feature flow-based method for generating abstract line drawing
CN108961230A (en) The identification and extracting method of body structure surface FRACTURE CHARACTERISTICS
CN105426890A (en) Method for identifying graphic verification code with twisty and adhesion characters
CN104463814A (en) Image enhancement method based on local texture directionality
CN104952102A (en) Deferred shading-orientated uniform anti-aliasing method
CN102270340B (en) Method and system for enhancing text image based on stroke operator
Mello et al. Automatic image segmentation of old topographic maps and floor plans
CN105336035B (en) A kind of method and system of dirty crown word number image classification
CN106127716A (en) Fourth order PDEs image de-noising method based on Mathematical Morphology
CN114494306B (en) Edge gradient covariance guided method for repairing character outline of first bone and Doppler dictionary
CN103914829A (en) Method for detecting edge of noisy image
CN105791635A (en) GPU-based enhanced video denoising method and apparatus
CN105469358B (en) A kind of image processing method
CN102254306B (en) Real-time image defogging method based on image simplified hierachical model
CN104933682A (en) Integrated denoising method of inscription-like images

Legal Events

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