CN1169079C - Chinese medicine tongue image computer cutting based on sample strip Snakes model - Google Patents

Chinese medicine tongue image computer cutting based on sample strip Snakes model Download PDF

Info

Publication number
CN1169079C
CN1169079C CNB021037973A CN02103797A CN1169079C CN 1169079 C CN1169079 C CN 1169079C CN B021037973 A CNB021037973 A CN B021037973A CN 02103797 A CN02103797 A CN 02103797A CN 1169079 C CN1169079 C CN 1169079C
Authority
CN
China
Prior art keywords
snakes
tongue
image
tongue body
profile
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB021037973A
Other languages
Chinese (zh)
Other versions
CN1367455A (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.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
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 Beijing University of Technology filed Critical Beijing University of Technology
Priority to CNB021037973A priority Critical patent/CN1169079C/en
Publication of CN1367455A publication Critical patent/CN1367455A/en
Application granted granted Critical
Publication of CN1169079C publication Critical patent/CN1169079C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The present invention relates to a computer cutting method based on a sample strip Snakes model for a tongue picture of Chinese medicine. The present invention cuts a tongue body in the tongue picture of the Chinese medicine from the background to be convenient for the following characteristic analysis. The present invention adopts a digital camera to collect the tongue picture and input the picture to a computer to be processed, transmitted, etc. The method is characterized in that according to the statistical analysis of the shape of the tongue body, a mould plate of a tongue body contour which takes a rectangular region as an outer boundary is defined; with an analysis method of greyscale projection, a rectangular region is obtained to determine the approximate position and size of the tongue body; the present invention provides an initialization method for the tongue body contour, which is based on the greyscale projection and a rigid mould plate; prior knowledge relating to the tongue body contour is added into the energy function of a Snakes model; a Catmull-Rom sample strip Snakes model is used for representing the tongue body contour which is optimized by the greedy method; a tongue body contour is obtained from a colored tongue picture; a tongue body region is cut from the tongue body contour. The cutting method has accuracy and practicality.

Description

Traditional Chinese medical science tongue picture computing machine dividing method based on batten Snakes (Snakes) model
Technical field
The present invention relates to computing machine Medical image Processing field, designed a kind of tongue body dividing method, the tongue body in the traditional Chinese medical science tongue image is split from background, so that signature analysis subsequently based on batten Snakes (Snakes) model.
Background technology
Being commonly used in image processing field and tongue picture, to cut apart correlation technique as follows:
It is tongue image tongue body Region Segmentation that tongue picture is cut apart, and is a kind of concrete application of image partitioning method.Traditional image Segmentation adopts rim detection, region clustering scheduling algorithm, these methods all are to utilize the low-level feature of image, be the homogeneity or the mutability of pictorial data, and do not have to utilize the relevant priori of cutting apart target, as the position of target, size, shape etc.These methods need be carried out the integrity profile that complicated aftertreatment could be determined tongue body.And, often be difficult to obtain gratifying segmentation result owing to the reasons such as difference of contour feature and image quality.
Snakes (Snakes) model claims active contour model (active contour model) again, is proposed in 1987 by people such as Kass.Snakes (Snakes) is a kind of method that the skeleton pattern and the image feature of target are complementary, it utilizes the polygon of object to represent, target is formulated as a suitable energy function E, E is minimized obtain desired outline line then, thereby be partitioned into the target in the image.Snakes (Snakes) is a kind of batten of energy minimization, under the effect of various power and constraint condition elastic deformation takes place, up to the profile that obtains expecting.Its energy is generally become by three kinds of Lik-Sangs: its shape of internal force constraint, and its behavior of external force guiding, visual power drags it to significant image feature; The outline line of Snakes is locked near the image feature, exactly with its minimization.Like this, when seeking significant image feature, higher layer mechanism may be carried out with model by image feature being pushed to a suitable Local Extremum alternately.The maximum characteristics of Snakes (Snakes) are low-level feature and the high-rise knowledge that combines image, when being used for image Segmentation, all are better than classic method at aspects such as robustness, degree of accuracy, practicality.
Usually, Snakes is controlled simultaneously by several different acting forces, and each power produces an energy term.Can be expressed as
E snake ( V ) = Σ i = 1 n E snake ( v i ) = Σ i = 1 n [ E internal ( v i ) + E image ( v i ) + E extrnal ( v i ) ]
E wherein InternalBe called internal energy, do not rely on pictorial data, only relevant with the shape facility of profile, be used for calculating the characteristic that some we are paid close attention to of contour shape, for example continuity and flatness; E ImageBeing called picture power, is that the interaction of geometric model and pictorial data produces, at interested characterizing definition in the image, for example: edge, line, zone, texture etc.; E ExternalBe external energy, represent the constraint condition of various artificial definition.
Batten Snakes as the reference mark, defines a SPL with this with one group of discrete coordinates point, and these points have provided the general shape of curve.Batten is a SPL, be with a series of polynomial curve sections form continuously, the curve of fairing.On mathematics, batten is a set of segmentation smooth function, is used for being similar to or the interpolative data point set.The represented curve of batten Snakes be resolve, can be little, and local detail can be described.Can resolve how much derivative characteristics of finding the solution it, be convenient to the calculating of energy function.
The whole process that adopts Snakes (Snakes) model to carry out image Segmentation is that an iteration optimization is up to the convergent process.In this process, need to solve three problems:
A) initialization of profile, b) design of energy function, c) optimisation strategy.
The initialization of profile will be determined the initial position of point and the original shape and the size of target, adopts the interactive means manual drawing usually.
Optimisation strategy has determined the speed of iteration convergence.Optimize is exactly by calculating the internal energy and the external energy of initial estimation profile, constantly attributes such as the position of this estimation profile, shape are upgraded according to certain rule, till profile satisfied some predetermined constraint conditions, this was the process of an iteration.Here, can be at a certain size search window of one of the definition of each reference mark on the profile, the point of selecting to have minimum Snakes energy in each search window replaces original reference mark as new profile reference mark, and the rest may be inferred, up to satisfying stopping criterion for iteration.
Optimization is the important step that Snakes finds the solution.The initial estimation profile approaches to profile to be measured in optimizing process gradually, optimizes when finishing, and estimates that profile converges on the desired destination profile.Optimized Algorithm commonly used has: the variational method, dynamic programming, Greedy algorithm, simulated annealing etc., wherein the Greedy algorithm is most widely used method.
The Greedy method is a kind of improved dynamic programming method.It realizes the locally optimal solution of energy function, and time complexity only has O (nm).Therefore computing velocity is fast, and storage demand is less.To each some v i, its iterative step is as follows:
1) calculates E Snake(v i);
2) with v iOther p in some m * m neighborhood Jk, j, k ∈ [1, m] replaces v iPoint calculates E respectively Snake(p Jk), j, k ∈ [1, m];
3) note E Min=min (E Snake(p Jk), j, k ∈ [1, m]), if E Snake(v i)<E Min, v then iPoint is constant; Otherwise with v iPoint moves to corresponding to E MinThe neighborhood point.
The stop criterion of iteration is: the mobile or iterations that no longer produces the reference mark surpasses default maximal value.Fig. 6 is the synoptic diagram of Greedy algorithm, v among the figure iBe initial point, v i' be corresponding to E MinThe neighborhood point.Adopt 9 neighborhoods among the figure.
In image processing, because the condition difference of picture-taking, the parameter in the disposal route may be according to the actual conditions adjustment.The method of adjusting is, from the image that the same terms is taken, takes out a width of cloth or a few width of cloth, by experiment or trial method determine the occurrence of parameter.It also is like this adopting Snakes (Snakes) model to carry out image Segmentation.
Summary of the invention
The present invention just is based on above-mentioned Study on Technology, and the tongue body profile auto-initiation method based on Gray Projection and rigid template has realized cutting apart automatically of tongue image.
For with the tongue body zone automatically, split accurately and rapidly, the present invention has designed a kind of tongue body region segmentation method based on Snakes (Snakes) model.This method has been considered the characteristics such as color distortion of the shape, position, size of tongue body and tongue body zone and background area, and the design energy function carries out the profile initialization, and adopt easy, Local Optimization Algorithm to be to reach practical fast.Technical thought of the present invention is characterised in that:
1, according to the statistical study to the tongue body shape, defining one is the tongue body profile template of outer boundary with the rectangular area.By introducing this tongue body template, when cutting apart, added priori, as close as possible real tongue body profile in the time of can making the contour curve initialization about the tongue body shape.
2, adopt the Gray Projection analytic approach, obtain a rectangular area, the approximate location and the size of tongue body determined in this zone.
3, a kind of tongue body profile initial method based on Gray Projection and rigid template is proposed.
4, the priori that in the energy function of Snakes (Snakes) model, has added relevant tongue body profile.
5, through after tongue body profile initialization and having defined energy function, adopt Catmull-Rom batten Snakes (Snakes) model representation tongue body profile, and adopt existing Greedy method to be optimized, thus in colored tongue image, obtain the tongue body profile, be partitioned into the tongue body zone.
Technical scheme of the present invention is referring to Fig. 1, Fig. 2.The computing machine dividing method of this traditional Chinese medical science tongue picture based on batten Snakes (Snakes) model, be to finish the collection tongue image by digital camera, and the optical signalling of tongue body and colour code is converted to the electric signal image is input to computing machine and handles, operations such as transmission, it is characterized in that Computer Processing mainly is by USB interface software, on batten Snakes (Snakes) model based, tongue image is carried out read/write process, tongue image after the processing or tongue image carried out outputing to buffer after the dividing processing, through the display display result, it comprises the steps: successively
1) computing machine reads in the tongue image signal from USB interface, and is kept in the internal memory.The weighting parameter γ that energy in the Snakes model is calculated simultaneously 1, γ 2, α, β and iteration optimization algorithms maximum iteration time carry out initialization, the value of four parameters is obtained by trial method.
2) tongue image is carried out conversion, strengthening tongue body and the contrast between the background on every side, and color image is become gray scale image, conversion is carried out at each pixel, and transformation for mula is:
I ( x , y ) = R ( x , y ) - G ( x , y ) | G ( x , y ) - B ( x , y ) | + 1
R in the formula (x, y), G (x, y) and B (x y) is the original red, green, blue tristimulus values of pixel, and (x y) is the gray-scale value after the conversion to I.
Because we find that three chroma color value R, G, the B of tongue image pixel have following rule: the G value on the skin is greater than the G value at tongue edge, the G value on the tongue edge usually and the B value difference seldom or bigger, the G value on skin is then all greater than the B value; The R value of tongue and skin is all greater than G value and B value.According to these color component values relative nature to each other, for strengthening the gray difference of tongue body profile and background, we adopt the intensity transformation function of above tongue image.Through such conversion, the gray-scale value of tongue body part is higher, and the part gray-scale value beyond the tongue body is relatively low.
3) enter based on Gray Projection and rigid template, initialized profile initialization subroutine is carried out at batten Snakes (Snakes) model silhouette reference mark: promptly adopt the Gray Projection analytic approach, obtain a rectangular area, the approximate location and the size of tongue body determined in this zone.Earlier according to strengthening visual level and the gray scale of vertical direction or the feature of brightness projection, determine the border of a rectangular area, obtain 4 borders up and down of rectangular area thus, thereby the position and the size in tongue body zone have been determined, after having determined tongue body zone square boundary, calculating tongue body profile template is the rigidity deformation parameter λ on border at home and abroad, and then definite initial control point and profile, thereby finishes the auto-initiation of batten Snakes (Snakes) model.
4) be outstanding tongue body, make things convenient for the picture power of successive iterations process to calculate,, be divided into following a few step the line nonlinearity conversion of going forward side by side of tongue image thresholding:
1. to 2) in the enhancing image ask the maximal value maxI of gray-scale value, mean value meanI, and calculate maximum difference dI=maxI-meanI;
2. be threshold value with meanI,, will be changed to 0 less than the gray-scale value of meanI strengthening image thresholdingization;
3. the image behind the thresholding is carried out nonlinear transformation, transformation for mula is:
U ( x , y ) = ( I ( x , y ) - meanI dI ) γ
Exponent gamma in the formula is the nonlinear transformation parameter.
5) with the Greedy iteration optimization algorithms batten Snakes (Snakes) model is found the solution, solution procedure as previously mentioned, up to satisfying end condition: the position at an iteration rear profile reference mark no longer changes, or iterations reaches certain default maximal value, the iteration optimization subroutine call of profile reference mark finishes, obtain the final position at tongue body profile reference mark, adopt general Catmull-Rom spline interpolation formula to carry out spline interpolation, can obtain continuous tongue body contour curve.
6) adopt general Catmull-Rom spline interpolation formula to carry out spline interpolation, obtain continuous profile; The energy minimization of Snakes (Snakes) is to carry out on sparse discrete point, in order to obtain the continuous profile of target, need carry out interpolation and obtain accurate, continuous outline line.
7) will be positioned at by usual method that three chroma color values of pixel are changed to (255,255,255) (white) on the tongue body contour curve, save as destination file and output.
In addition according to the computing machine dividing method of above-described traditional Chinese medical science tongue picture based on batten Snakes (Snakes) model, wherein initialized profile initialization subroutine is carried out at batten Snakes (Snakes) model silhouette reference mark and is characterised in that, divide five stepping road wheels wide initialization:
1) on the basis that strengthens image, carry out the Gray Projection of horizontal direction, the characteristics of utilizing tongue body area grayscale projection value obviously to increase are from the middle part of projection, search for the position that first projection value reduces suddenly respectively left, to the right, obtain the border, the left and right sides of rectangular area;
2) center on border, the left and right sides is decided to be horizontal central line, and near the regional area the center line is defined as the center;
3) center is carried out the Gray Projection of vertical direction, because significant change often takes place near the enhancing gray-scale value the tongue body district lower boundary, so lower boundary is corresponding to the first order derivative maximal value of projection value;
4) center is carried out raw image brightness value (i.e. (R+G+B)/3) projection of vertical direction, owing to there is shade under the lip, the coboundary in tongue body zone is corresponding to the minimum value of projection value;
5) after above step is determined square boundary, according to the rigidity deformation parameter on border, tongue body profile template China and foreign countries, determine the initial position at profile reference mark, the computing method of deformation parameter are: the long L of being of outer boundary rectangle that establishes rigid template 0, wide is W 0, be respectively by above four positions in tongue image that go on foot the rectangle left and right sides up-and-down boundary that obtains: l 1, r 1, t 1, b 1, then the rectangular area is long is L=r-l, and wide is W=b-t, and deformation parameter is so: λ=(λ l, λ w), λ l=L/L 0, λ w=W/W 0, because the position, reference mark of profile template is that promptly the top left corner apex with this rectangle is coordinate center (0,0) with respect to the definition of outer boundary rectangle, so be (x if establish the coordinate position at i profile reference mark in the template 0i, y 0i), the coordinate at the initialization profile reference mark that then obtains is:
x i=l+λ lx 0i
y i=t+λ wy 0i
In addition the computing machine dividing method according to above-described traditional Chinese medical science tongue picture based on batten Snakes (Snakes) model is characterised in that: internal energy adopts common version, when the computational picture energy, at first the raw image thresholding is gone forward side by side the line nonlinearity conversion with outstanding tongue body, according to image intensity behind the thresholding and gradient calculation picture power, internal energy and picture power sum are the gross energy of Snakes (Snakes) model then.
For a certain profile reference mark v i, consider that tongue body profile in the tongue image meets the hypothesis of continuity and flatness, internal energy adopts common version, that is:
E internal(v i)=α(v i)E elas(v i)+β(v i)E bend(v i)
E elas ( v i ) = | ∂ V ∂ s | 2 ≈ | v i - v i - 1 | 2 d s 2 = ( x i - x i - 1 ) 2 + ( y i - y i - 1 ) 2 d s 2
E bend ( v i ) = | ∂ 2 V ∂ s 2 | 2 ≈ | v i - 1 - 2 v i + v i + 1 | 2 d s 4 = ( x i - 1 - 2 x i + x i + 1 ) 2 + ( y i - 1 - 2 y i + y i + 1 ) 2 d s 4
Wherein weighting parameter α, β control the degree of restraint to continuity and flatness respectively.
Picture power is
E image(v i)=γ 1U(v i)+γ 2|U(v i))| 2
Weighting parameter γ wherein 1, γ 2Control is to I (x, y) strength constraint and the gradient constraint of profile region; γ 1, γ 2Be made as negative value, make the maximum value that energy-minimum levels off to and the maximum value of gradient response,
External energy E External=0,
Total energy function is expressed as
E ( v i ) = α ( x i - x i - 1 ) 2 + ( y i - y i - 1 ) 2 d s 2 + β ( x i - 1 - 2 x i + x i + 1 ) 2 + ( y i - 1 - 2 y i + y i + 1 ) 2 d s 4
+ γ 1 U ( v i ) + γ 2 | ▿ U ( v i ) ) |
Other illustrates 2 points:
1, in the image processing, for some feature of outstanding concrete image, usually will do some conversion to image, promptly chromatic value or the gray-scale value to visual pixel carries out computing, claims such image enhancement that is transformed to again.For example, three chroma color value R of tongue image pixel, G, B have following rule: the G value on the skin is greater than the G value at tongue edge, the G value on the tongue edge usually and the B value difference seldom or bigger, the G value on skin is then all greater than the B value; The R value of tongue and skin is all greater than G value and B value.According to these color component values relative nature to each other, be to strengthen the gray difference of tongue body profile and background, we adopt tongue image intensity transformation function I (x, y):
I ( x , y ) = R ( x , y ) - G ( x , y ) | G ( x , y ) - B ( x , y ) | + 1
The nonlinear transformation of being carried out when the calculating energy function also is based on same reason, and introducing exponential transform is in order to give prominence to the contrast of tongue body and skin more.
2, the initialization of profile will be determined the initial position of point and the original shape and the size of target, adopts the interactive means manual drawing usually.Owing to the tongue body that will cut apart at native system in the tongue image, if can determine approximate location, size and the shape of tongue body automatically, then the profile initialization can be carried out automatically.The present invention just is based on such consideration, and the tongue body profile auto-initiation method based on Gray Projection and rigid template has realized cutting apart automatically of tongue image.Energy function will design according to image and the characteristics of cutting apart target.
Effect of the present invention is seen Fig. 7, Fig. 8.Adopt as can be seen based on batten Snakes (Snakes) model, and, can obtain tongue body profile accurately automatically in conjunction with the characteristics of tongue image.Do not need manual initialization, thereby created condition for subsequently accurate tongue picture analysis.
Description of drawings
Fig. 1 is a traditional Chinese medical science tongue picture segmenting system block diagram.
1, digital camera, 2, USB interface, 3, computer processor, 4, output buffers, 5, tongue body cuts apart, 6, display, 7, segmentation result;
Fig. 2 is the inventive method main program flow chart;
Fig. 3 is a profile initialization subroutine process flow diagram in the inventive method;
Fig. 4 is an iteration optimization subroutine flow chart in the inventive method;
Fig. 6 is a Greedy iteration optimization synoptic diagram among the present invention;
Fig. 7 is the initialization procedure example of profile
(a) horizontal Gray Projection, center line and center signal among the figure; (b) horizontal Gray Projection and left and right border signal; (c) first order derivative of vertical Gray Projection and lower boundary signal; (d) vertical color brightness projection and coboundary signal; (e) initialization result;
Fig. 8 is colored tongue image of a width of cloth and a segmentation result (white line is represented outline line) thereof among the present invention;
Fig. 9 is system's main program flow chart that the inventive method is moved on computers;
Figure 10 is the profile initialization subroutine process flow diagram that the inventive method is moved on computers;
Figure 11 is the iteration optimization subroutine flow chart that the inventive method is moved on computers.
Embodiment
In the traditional Chinese medical science tongue picture segmenting system block diagram of Fig. 1, digital camera and USB interface all are commercially available, mainly finish the collection tongue image, the optical signalling of tongue body and colour code is converted to visual electric signal is input to computing machine, are convenient to operations such as Computer Processing, transmission; Computer Processing mainly is by USB interface software tongue image to be carried out read/write process; Tongue image after the processing outputs to buffer, is convenient to show; Display is the output device of image, and human eye is watched raw image by display and cut apart the back image; It is that tongue image to computing machine reads in carries out dividing processing that tongue body is cut apart, the output result.Original tongue image can be the image that collects in real time by digital camera, also can be to realize by being kept at the image in the hard disc of computer after the digital camera collection.The tongue body segmenting system is finished following master routine in computing machine, referring to Fig. 8, Fig. 9:
1, under coloured target situation: initiation parameter l, r, t, b, δ, γ, α, β, γ 1, γ 2, w, N and tongue body template.Three color lump bars of Fig. 8 periphery) and the part more than the upper lip wherein l, r, t, b are default value, are in order to remove color scale space 9 colour codes:.Their value can be determined according to a width of cloth tongue image in advance.δ is a threshold value of asking border, the left and right sides used.Set in advance according to trial method.δ among the present invention=0.2.γ is the parameter that nonlinear transformation adopted, and establishes γ=0.15 herein.α, β, γ 1, γ 2Be the energy calculated weighting coefficient of Snakes (Snakes), the value of four parameters is obtained by trial method.Can be made as respectively in the present invention: α=0.5, β=3.0, γ 1=-0.2, γ 2=-1.0.The width of window was established w=3 when w was Snakes (Snakes) iteration optimization among the present invention.The maximum iterations of setting when N is iteration optimization, N=200 among the present invention.The tongue body template is represented with an array of representing a relative coordinate.Under colourless target situation: initiation parameter l=0, t=0, b are that image is high, and r is the figure image width.
2, tongue image is carried out conversion.The conversion individual element carries out.Transformation for mula is:
I ( x , y ) = R ( x , y ) - G ( x , y ) | G ( x , y ) - B ( x , y ) | + 1 .
3, tongue body profile initialization.Be divided into following each step:
The first step: calculate the horizontal direction projection that strengthens image.As previously mentioned, (x y) has the capable w row of h to strengthen visual I.Be listed as row since l, calculate the gray-scale value sum S that each lists all pixels (r-l+1 pixel altogether) up to r i, S i = Σ i = t b - 1 I ( i , j ) Obtain an array S, S=[S 1, S 2... S i... S r], this array promptly represents to strengthen the horizontal direction Gray Projection of image.Wherein l, r, t, b are default value, are in order to remove color scale space and the part more than the upper lip, to simplify the color characteristics of calculating and making full use of aforementioned tongue body, and are not subjected to the influence of color scale space.Their value can be determined according to a width of cloth tongue image in advance.
Second step: the characteristics of utilizing the projection of tongue body area grayscale obviously to increase, the border, the left and right sides of acquisition rectangular area.Method is:
From half j=[n/2 of projection array] beginning, first is less than δ to left search (promptly making j reduce 1) at every turn lS jWherein [n/2] expression rounds n/2.If promptly
S j<δ l (0<j<[n/2])
Straight line x=l then 1, l 1=j+l is decided to be the left margin of rectangular area.
From half j=[n/2 of projection array] beginning, first reaches in δ to right-hand search (promptly making j increase 1) at every turn rS jIf promptly
S j<δ l ([n/2]+1<j<r-l+1)
Straight line x=r then 1, r 1=j+l is decided to be the left margin of rectangular area.
The border promptly stops at the search in this zone after determining.In the formula, δ l, δ rBe preset threshold value, establish δ at this lr=δ (maxS-minS)+minS.MaxS, minS are respectively maximum, the minimum value of horizontal projection.δ sets in advance.δ among the present invention=0.2.
The 3rd step: with the center line x=[(l on border, the left and right sides 1+ r 1)/2] be decided to be horizontal central line, near the regional area the center line is defined as the center.If the width of central area is w 1, promptly from [(l 1+ r 1)/2]-w 1To [(l 1+ r 1)/2]+w 1Be the center.The width of central area can be decided to be half of border, left and right sides difference.
The 4th step: determine the rectangular area lower boundary.As previously mentioned, the Gray Projection of vertical direction is carried out in the center, because significant change often takes place near the enhancing gray-scale value the tongue body district lower boundary, so lower boundary is corresponding to the first order derivative maximal value of projection value.Method computing center district vertical direction projection by the above-mentioned first step.If the vertical projection array is P, P=[P 1, P 2... P i... P r], then the computing method of first order derivative are:
P i′=P i-P i-1,0<i<h
Ask the maximal value of first order derivative, according to aforementioned, the pairing position of first order derivative maximal value is lower boundary b 1
The 5th step: raw image brightness value (i.e. (R+G+B)/3) the projection V of vertical direction is carried out in the center, and the pairing position of the minimum value of V is the coboundary t in tongue body zone 1
The 6th step: calculate the deformation parameter of profile template,
λ=(λ l,λ w),λ l=L/L 0,λ w=W/W 0
Be calculated as follows the initial position at profile reference mark:
x i=l+λ lx 0i
y i=t+λ wy 0i
(x 0i, y 0i) be the coordinate position at i profile reference mark in the template.In the present invention, have 32 profile reference mark.These group data are kept in the array.
The profile initialization subroutine process flow diagram that Figure 10 moves on computers for the inventive method, Fig. 7 are the initialization procedure exemplary plot of profile.
4, to the line nonlinearity conversion of going forward side by side of tongue image thresholding.Be divided into following a few step:
1) the enhancing image that obtains in 2 is asked the maximal value maxI of gray-scale value, mean value meanI, and calculate maximum difference dI=maxI-meanI;
2) meanI is a threshold value, to strengthening image thresholdingization, will be changed to 0 less than the gray-scale value of meanI;
3) image behind the thresholding is carried out nonlinear transformation, transformation for mula is:
U ( x , y ) = ( I ( x , y ) - meanI dI ) γ
Exponent gamma in the formula is the nonlinear transformation parameter, is obtained by trial method.γ=0.15 in the present invention.
5, to tongue body profile iteration optimization.
Iterative process is seen Figure 11, is described below:
1) reads in profile reference mark initial coordinate.I is changed to 0 with iterations, will indicate whether to have the variable bMove of reference mark shift in position to be changed to vacation;
2) read in the coordinate at a profile reference mark;
3) energy of each point (w * w point altogether) in the calculation control vertex neighborhood one by one in size is the search window of w * w, and ask least energy, and write down the coordinate of the pairing point of least energy.Among the present invention, search window adopts 3 neighborhoods, i.e. w=3.Computing formula at energy function:
E ( v i ) = α ( x i - x i - 1 ) 2 + ( y i - y i - 1 ) 2 d s 2 + β ( x i - 1 - 2 x i + x i + 1 ) 2 + ( y i - 1 - 2 y i + y i + 1 ) 2 d s 4
+ γ 1 U ( v i ) + γ 2 | ▿ U ( v i ) ) |
In, ds=1, the value of four parameters is obtained by trial method, is respectively:
α=0.5,β=3.0,γ 1=-0.2,γ 2=-1.0。
4) this profile reference mark is moved to the energy smallest point.The coordinate that is about to this reference mark is revised as the coordinate of the pairing point of least energy.If the coordinate that reads in amended coordinate and the original coordinate (step 2)) different, make then that bMove is very, otherwise do not change the value of bMove;
5), then make iterations i increase by 1 if the profile reference mark disposes; Otherwise change two), handle next profile reference mark;
6) the true and false coordinate at reference mark that judges whether according to bMove changes.If no, then iteration finishes, return, otherwise;
7) judge that whether iterations i is less than default maximum iteration time N, if i<N then changes two), carry out the next round iteration, otherwise the iteration end is returned.
6, carry out spline interpolation according to the reference mark coordinate and obtain continuous contour curve, can adopt different battens.
Adopt Catmull-Rom batten spline interpolation method among the present invention.
For example the Catmull-Rom batten is a kind of local interpolation batten, and its i section Catmull-Rom batten can be expressed as:
Q i ( τ ) = ω i 1 ( τ ) Q i 1 ( τ ) + ω i 2 ( τ ) Q i 2 ( τ )
ω wherein i 1(τ), ω i 2Be the linear bending function of batten (τ), be defined as:
Figure C0210379700164
Q i 1(τ) be interpolation v I-1, v i, v I+1Second order polynomial, Q i 2(τ) be interpolation v I-1, v i, v I+1Second order polynomial, be defined as respectively:
Q i 1 ( τ ) = v i - 1 + ( τ - τ i - 1 ) ( - v i - 1 + v i - τ i - 1 + τ i + ( τ - τ i ) ( - - v i - 1 + v i - τ i - 1 + τ i + - v i + v i + 1 - τ i + τ i + 1 ) - τ i - 1 + τ i + 1 )
Q i 2 ( τ ) = v i + ( τ - τ i ) ( - v i + v i + 1 - τ i + τ i + 1 + ( τ - τ i + 1 ) ( - - v i + v i + 1 - τ i + τ i + 1 + - v i + 1 + v i + 2 - τ i + 1 + τ i + 2 ) - τ i + τ i + 2 )
Non-homogeneous parametric method is adopted in the definition of the parameter τ of batten model, makes it be proportional to Euclidean distance between the reference mark, and recursion formula is:
τ i - τ i - 1 τ i + 1 - τ i = | | v i - v i - 1 v i + 1 - v i | |
Optional τ 1=0 and τ n=1.
And the outline line that will finally obtain is represented (tristimulus values that are about to this pixel are changed to (255,255,255)) with white line.
7, output segmentation result
Fig. 8 is a width of cloth tongue image segmentation result.

Claims (3)

1, based on the traditional Chinese medical science tongue picture computing machine dividing method of batten Snakes (Snakes) model, be to finish the collection tongue image by digital camera, and the optical signalling of tongue body and colour code is converted to visual electric signal is input to operations such as computing machine is handled, transmission, this method is characterised in that Computer Processing mainly is by USB interface software tongue image to be carried out read/write process, tongue image after handling is carried out outputing to buffer after the dividing processing on batten Snakes (Snakes) model based, through the display display result, it comprises the steps: successively
1) computing machine reads in the tongue image signal from USB interface, and is kept in the internal memory; The weighting parameter γ that energy in the Snakes model is calculated simultaneously 1, γ 2, α, β and iteration optimization algorithms maximum iteration time carry out initialization, the value of four parameters is obtained by trial method,
2) tongue image is carried out conversion, strengthening tongue body and the contrast between the background on every side, and color image is become gray scale image, conversion is carried out at each pixel, and transformation for mula is:
I ( x , y ) = R ( x , y ) - G ( x , y ) | G ( x , y ) - B ( x , y ) | + 1
R in the formula (x, y), G (x, y) and B (x y) is the original red, green, blue tristimulus values of pixel, and (x y) is the gray-scale value after the conversion to I;
3) enter based on Gray Projection and rigid template, initialized profile initialization subroutine is carried out at batten Snakes (Snakes) model silhouette reference mark: promptly adopt the Gray Projection analytic approach, obtain a rectangular area, the approximate location and the size of tongue body determined in this zone, earlier according to strengthening visual level and the gray scale of vertical direction or the feature of brightness projection, determine the border of a rectangular area, obtain 4 borders up and down of rectangular area thus, thereby the position and the size in tongue body zone have been determined, after having determined tongue body zone square boundary, calculating the rigidity deformation parameter on border, tongue body profile template China and foreign countries goes into, and then definite initial control point and profile, thereby finish the auto-initiation of batten Snakes (Snakes) model;
4) to the line nonlinearity conversion of going forward side by side of tongue image thresholding, be divided into following a few step:
1. to 2) in the enhancing image ask the maximal value maxI of gray-scale value, mean value meanI, and calculate maximum difference dI=maxI-meanI;
2. be threshold value with meanI,, will be changed to 0 less than the gray-scale value of meanI strengthening image thresholdingization;
3. the image behind the thresholding is carried out nonlinear transformation, transformation for mula is:
U ( x , y ) = ( I ( x , y ) - meanI dI ) γ
Exponent gamma in the formula is the nonlinear transformation parameter;
5) with the Greedy iteration optimization algorithms batten Snakes (Snakes) model is found the solution, solution procedure adopts universal method, up to satisfying end condition, the position at an iteration rear profile reference mark no longer changes, or iterations reaches certain default maximal value, the iteration optimization subroutine call of profile reference mark finishes, obtain the final position at tongue body profile reference mark, adopt general Catmull-Rom spline interpolation formula to carry out spline interpolation, can obtain continuous tongue body contour curve;
6) adopt general Catmull-Rom spline interpolation formula to carry out spline interpolation, obtain continuous profile;
7) will be positioned at by usual method that three chroma color values of pixel are changed to (255,255,255) (white) on the tongue body contour curve, save as destination file and output.
2, the traditional Chinese medical science tongue picture computing machine dividing method based on batten Snakes (Snakes) model according to claim 1, wherein initialized profile initialization subroutine is carried out at batten Snakes (Snakes) model silhouette reference mark and is characterised in that, divide five stepping road wheels wide initialization:
1) on the basis that strengthens image, carry out the Gray Projection of horizontal direction, the characteristics of utilizing the projection of tongue body area grayscale obviously to increase are from the middle part of projection, search for the position that first projection reduces suddenly respectively left, to the right, obtain the border, the left and right sides of rectangular area;
2) center on border, the left and right sides is decided to be horizontal central line, and near the regional area the center line is defined as the center;
3) center is carried out the Gray Projection of vertical direction, because significant change often takes place near the enhancing gray-scale value the tongue body district lower boundary, so lower boundary is corresponding to the first order derivative maximal value of projection value;
4) center is carried out raw image brightness value (i.e. (R+G+B)/3) projection of vertical direction, owing to there is shade under the lip, the coboundary in tongue body zone is corresponding to the minimum value of projection value;
5) after above step is determined square boundary, according to the rigidity deformation parameter on border, tongue body profile template China and foreign countries, determine the initial position at profile reference mark, the computing method of deformation parameter are: the long L of being of outer boundary rectangle that establishes rigid template 0, wide is W 0, be respectively by above four positions in tongue image that go on foot the rectangle left and right sides up-and-down boundary that obtains: l 1, r 1, t 1, b 1, then the rectangular area is long is L=r-l, and wide is W=b-t, and deformation parameter is so: λ=(λ l, λ w), λ l=L/L 0, λ w=W/W 0, because the position, reference mark of profile template is that promptly the top left corner apex with this rectangle is coordinate center (0,0) with respect to the definition of outer boundary rectangle, so be (x if establish the coordinate position at i profile reference mark in the template 0i, y 0i), the coordinate at the initialization profile reference mark that then obtains is:
x i=l+λ lx 0i
y i=t+λ wy 0i
3, the traditional Chinese medical science tongue picture computing machine dividing method based on batten Snakes (Snakes) model according to claim 1, it is characterized in that: internal energy adopts common version, when the computational picture energy, at first the raw image thresholding is gone forward side by side the line nonlinearity conversion with outstanding tongue body, according to image intensity behind the thresholding and gradient calculation picture power, internal energy and picture power sum are the gross energy of Snakes (Snakes) model then;
For a certain profile reference mark v i, internal energy adopts common version, that is: E Internal(v i)=α (v i) E Elas(v i)+β (v i) E Bend(vi)
E elas ( v i ) = | ∂ V ∂ s | 2 ≈ | v i - v i - 1 | 2 ds 2 = ( x i - x i - 1 ) 2 + ( y i - y i - 1 ) 2 ds 2
E bend ( v i ) = | ∂ 2 V ∂ s 2 | 2 ≈ | v i - 1 - 2 v i + v i + 1 | 2 ds 2 = ( x i - 1 - 2 x i + x i + 1 ) 2 + ( y i - 1 - 2 y i + y i + 1 ) 2 ds 4
Wherein weighting parameter α, β control the degree of restraint to continuity and flatness respectively,
Picture power is:
E image(v i)=γ 1U(v i)+γ 2|U(v i))| 2
Weighting parameter γ wherein 1, γ 2Control is to I (x, y) strength constraint and gradient constraint, the γ of profile region 1, γ 2Be made as negative value, make the maximum value that energy-minimum levels off to and the maximum value of gradient response,
External energy E External=0
Total energy function is expressed as:
E ( v i ) = α ( x i - x i - 1 ) 2 + ( y i - y i - 1 ) 2 ds 2 + β ( x i - 1 - 2 x i + x i + 1 ) 2 + ( y i - 1 - 2 y i + y i - 1 ) 2 ds 4
+ γ 1 U ( v i ) + γ 2 | ▿ U ( v i ) ) |
CNB021037973A 2002-03-25 2002-03-25 Chinese medicine tongue image computer cutting based on sample strip Snakes model Expired - Fee Related CN1169079C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021037973A CN1169079C (en) 2002-03-25 2002-03-25 Chinese medicine tongue image computer cutting based on sample strip Snakes model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021037973A CN1169079C (en) 2002-03-25 2002-03-25 Chinese medicine tongue image computer cutting based on sample strip Snakes model

Publications (2)

Publication Number Publication Date
CN1367455A CN1367455A (en) 2002-09-04
CN1169079C true CN1169079C (en) 2004-09-29

Family

ID=4739903

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021037973A Expired - Fee Related CN1169079C (en) 2002-03-25 2002-03-25 Chinese medicine tongue image computer cutting based on sample strip Snakes model

Country Status (1)

Country Link
CN (1) CN1169079C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100375979C (en) * 2006-09-15 2008-03-19 清华大学 Tongue division and extracting method for tongue diagnosis used colored digital photo of tongue in Chinese traditional medicine
CN101673345B (en) * 2009-07-01 2012-05-09 北京交通大学 Method for extracting target closed contour based on shape prior

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100506085B1 (en) * 2002-12-28 2005-08-05 삼성전자주식회사 Apparatus for processing tongue image and health care service apparatus using tongue image
CN1766929B (en) * 2004-10-29 2010-05-12 中国科学院计算技术研究所 Motion object motion reconfiguring method based on three-dimensional data base
CN100405402C (en) * 2006-08-18 2008-07-23 清华大学 Coated tongue division and extracting method for colored digital photo of tongue
CN101576913B (en) * 2009-06-12 2011-09-21 中国科学技术大学 Automatic clustering, visual and retrieval system for tongue picture based on self-organizing map neural network
US8532392B2 (en) * 2009-07-09 2013-09-10 Konica Minolta Medical & Graphic, Inc. Contour extraction device and program
JP5690327B2 (en) 2010-03-09 2015-03-25 オリンパス株式会社 Fluorescence endoscope device
JP5816486B2 (en) * 2011-08-18 2015-11-18 オリンパス株式会社 Fluorescence observation apparatus, fluorescence observation system, and fluorescence image processing method of fluorescence observation apparatus
JP5926909B2 (en) 2011-09-07 2016-05-25 オリンパス株式会社 Fluorescence observation equipment
CN102509312B (en) * 2011-09-20 2013-10-02 哈尔滨工业大学 Color range space of human body digital tongue image color and extraction method thereof
CN102509279B (en) * 2011-11-02 2013-11-06 北京工业大学 Self-adapting shaded-area detail reproduction method for tongue image with sufficient root-part illumination
CN104537379A (en) * 2014-12-26 2015-04-22 上海大学 High-precision automatic tongue partition method
CN108629780B (en) * 2018-04-23 2020-01-03 闽江学院 Tongue image segmentation method based on color decomposition and threshold technology
CN108615239B (en) * 2018-05-10 2020-03-27 福建中医药大学 Tongue image segmentation method based on threshold technology and gray level projection

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100375979C (en) * 2006-09-15 2008-03-19 清华大学 Tongue division and extracting method for tongue diagnosis used colored digital photo of tongue in Chinese traditional medicine
CN101673345B (en) * 2009-07-01 2012-05-09 北京交通大学 Method for extracting target closed contour based on shape prior

Also Published As

Publication number Publication date
CN1367455A (en) 2002-09-04

Similar Documents

Publication Publication Date Title
CN1169079C (en) Chinese medicine tongue image computer cutting based on sample strip Snakes model
CN1245033C (en) Equipment and method for regulating colour image colour saturation
CN1203453C (en) Automatic coloring of exposed pixels during zone processing of image
CN1278540C (en) Reducing image noise
CN1217526C (en) Image processing device, image processing method, image processing program and its recording medium
CN1475969A (en) Method and system for intensify human image pattern
CN107369159B (en) Threshold segmentation method based on multi-factor two-dimensional gray level histogram
CN1240024C (en) Image processor, image processing method and recording medium recording the same
CN101079952A (en) Image processing method and image processing apparatus
CN1714372A (en) Image signal processing
CN1573811A (en) Map generation device, map delivery method, and map generation program
CN1871622A (en) Image collation system and image collation method
CN108182671B (en) Single image defogging method based on sky area identification
CN1645907A (en) Hybrid sequential scanning using edge detection and motion compensation
CN1834582A (en) Image processing method, three-dimensional position measuring method and image processing apparatus
CN1750043A (en) Histogram equalizing method for controlling average brightness
CN1756374A (en) Have color temperature conversion method and device based on the color correction functions of pixel brightness
CN1343421A (en) Image interpolation system and image interpolocation method
CN107067375A (en) A kind of image defogging method based on dark channel prior and marginal information
JP4532540B2 (en) Segmentation method of structure in image based on curvature gradient
CN1744688A (en) Method for conducting dynamic video-level treatment based on maximum-minimum value
CN109741358B (en) Superpixel segmentation method based on adaptive hypergraph learning
CN1741068A (en) Histogram equalizing method based on boundary
CN1790378A (en) Binary method and system for image
CN113436206B (en) Pathological tissue section scanning area positioning method based on cluster segmentation

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
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
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee