in the present invention , an algorithm can be divided into five steps to explain how the core points and delta feature points are determined : 1 . using new method to obtain the direction - flow image from the initial gray - level image ; 4 . determining the ( 0 to a few ) deltas with new method ; and 5 . determining the ( 1 to 2 ) core points with new method . the initial image of the fingerprint is a gray - level image . to obtain the direction - flow image from the gray - level image , it is necessary to analyze the gray - levels surrounding each pixel to determine the flow direction of that pixel . the present invention labels the directions as 0 , 1 , . . . , n - 1 , where n = 8 , i . e ., there are altogether 8 directions . the flow directions and their corresponding labels are shown in fig1 . assuming that the size of the initial gray - level image is m × m , the direction of a pixel is determined based on a scheme as illustrated in fig2 . first of all , taking the pixel ( i , j ) as the center , we define a p × p region ( mask ) and calculate the change in gray - level along each direction . the direction , d ( i , j ), which has the minimum change in gray - level is taken as the direction of the pixel . fig2 shows such calculation for a 9 × 9 mask ( i . e ., p = 9 ) and assigned direction code 3 to the pixel at the center . equation 1 . a and 1 . b gives the formula to determine the direction of each pixel . ## equ1 ## where d ( i , j ) is the direction for the pixel ( i , j ). i , j = 0 , 1 , . . . , m - 1 v d ( i , j ) is the change in gray - level , from pixel ( i , j ), along the direction d , and d = 0 , 1 , . . . , n - 1 . g ( i , j ) is the gray - level of pixel ( i , j ) in the initial fingerprint image . g ( i , j ) is the gray - level of pixel ( i , j ) in the initial fingerprint image . g d ( i t , j t ) as the gray - level value of the t th pixel from pixel ( i , j ) along the direction d . the value is filtered by the 9 × 9 mask . t =- m , . . . , m and t ≢ 0 . m is extension ( in terms of pixel number towards both sides ) from ( i , j ) along direction d in determining the direction . the method described above can calculate the direction of each pixel ( i , j ), thus obtaining the direction - flow image of the entire fingerprint gray - level image . after obtaining the direction - flow image using the method described above , it is necessary to gather the general flow of the fingerprint to facilitate the determination of the core points and deltas . from the curvature of the direction - flow , the procedures in the later stage of this invention can determine the number and the position of the core points and deltas . there may be 1 to 2 core points and 0 to a few deltas . referring to eq . ( 1 ), since the direction - flow image is determined by the calculations for each pixel , it is easily disturbed by noises . as such we derive an averaged block direction - flow image ( bdi ) from the direction - flow image to reduce the effects of noise . the bdi is a better basis to determine the general flow of the fingerprint , thereby being advantageous to locate the core points and deltas . this invention converts the original m × m direction - flow image to a m / b × m / b block direction - flow image ( here we take b = 8 ). that is to obtain the average value , bdi (. ), of the direction code for the b 2 direction codes in the b × b subregion . the average value is calculated with following equation : bdi ( p , q )= k and h . sub . k = h . sub . max = maxh . sub . pq = max { h . sub . d | d = 0 , 1 , . . . , n - 1 } ( 2 ) where h d represents the number of pixels among the b 2 direction codes in region ( p , q ) having the same direction d . conceptually , the above is to determine the direction k ( 0 ≦ k ≦ n - 1 ) which has the highest frequency in the sub - region of the original direction - flow image . this direction bdi ( p , q ), is then assigned as the direction of the block . sometimes the block direction - flow image may be poor in quality or affected by stains on the finger . it is therefore necessary to perform automatic correction . we call this process smoothing . from observations , the direction - flow of a fingerprint is rather smooth , except at the area around the core points and the deltas . this characteristic can be served as a reference whether to correct the direction of an area . on the other hand , the flow at areas around the core points and the deltas cannot be perturbed due to the smoothing process . this invention suggests a new method can consider this dilemma and is able to achieve a good result in smoothing the block direction - flow image . for each block ( p , q ), our smoothing method applies a 5 × 5 block - region , r 5 × 5 ( p , q ), taking the block as the center ( see fig3 ), and calculate the ratio of the directions within the region . the smoothing is based on this ratio . the calculation is shown below : where h d is the number of blocks having the direction d , within the 5 × 5 area r 5 × 5 ( p , q ), where ( p , q ) is the center of the area . where h d 45 &# 39 ; is the number of occupied blocks within the 45 ° sector , taking direction d as the reference axis . then whether bdi ( p , q ) is to be corrected depends on the following three considerations : ( 1 ) the number of blocks with direction h k , where h k = maxh = max { h d | d = 0 , 1 , . . . , n - 1 } ( 2 ) the number of blocks with direction h d 45 °, where h d 45 ° = maxh 45 ° = max { h d 45 ° | d = 1 , 2 , . . . , n - 1 } fig4 ( a ) and 4 ( b ) show the results of applying this method and it is obviously very effective . analyzing the areas around the deltas , we discovered that they have a common flow characteristic as illustrated in fig5 . that is , the blocks surrounding a delta will have a flow distribution as shown in fig5 . in the r1 region , the flow directions observe a left skew ( left down , right up ) direction ; in the r2 region , the flow directions observe a right skew ( right down , left up ) direction ; whereas in the r3 region , the flow directions observe a horizontal direction . based upon this observation , the present invention improvises a new method to locate the blocks where the deltas are . details of this method are described in the following five steps : step 1 : taking ( p , q ) as the center of the current block ( refer to fig6 ), check whether the flow direction of the left - top corner block , bdi ( p - 1 , q - 1 ), is in the left skew direction . also check whether the flow direction of the right - top corner block , bdi ( p - 1 , q + 1 ), is in the right skew direction . step 2 : taking ( p , q ) as the center , take a 5 × 5 block - region and count the number of blocks with vertical flow direction ( all directions encompassed by the shaded area shown in fig7 are considered as vertical flow direction ). the analysis will continue only if this number exceeds a pre - determined threshold value . the purpose here is to filter off the areas further away from the delta point where the flow directions may be more or less similar to that in r1 , r2 and r3 shown in fig5 . in those areas , the flow inclination ( r1 or r2 ) are not large enough and can be discarded . step 3 : as shown in fig8 a , 8b and 8c , having defined the left skew , right skew and horizontal directional variations , the next three rules are considered to confirm whether the r1 , r2 and r3 regions around block ( p , q ) have the same characteristic as shown in fig5 . let the number of left skew in the r1 region be left ( r1 ), the number of right skew in region r1 be right ( r1 ), and the number of horizontal in region r1 be horizon ( r1 ). if the following condition is met , then r1 is assumed to be left skew : let the number of left skew in the r2 region be left ( r2 ), the number of right skew in region r2 be right ( r2 ), and the number of horizontal in region r2 be horizon ( r2 ). if the following condition is met , then r2 is assumed to be right skew : let the number of left skew in the r3 region be left ( r3 ), the number of right skew in region r3 be right ( r3 ), and the number of horizontal in region r3 be horizon ( r3 ). if the following condition is met , then r3 is assumed to be horizontal : if all rules 1 , 2 and 3 are satisfied , then the block ( p , q ) is a candidate delta location . step 4 : after identifying the candidate delta locations in step 3 , we need to determine the number of clusters among them . the total number of clusters will be the number of delta points . here an improved k - means clustering algorithm is applied . in the original k - means clustering algorithm , it is required to fix and assume a number of clusters . however , it is impossible to predict the number of clusters , i . e . the number of delta points , at the beginning . therefore we begin by assuming that there is one cluster , if the new point added to the cluster has a distance greater than distance ( distance is a pre - determined value ) from the cluster center , then this new point is assigned to a new cluster . the distance mentioned above is measured using the chess board measure as illustrated in fig9 in which each of the 8 neighboring points around a given center point has the same distance from the center point . step 5 : similarly , for each cluster determined in previous step , a representative point has to be determined and to be regarded as the actual delta point . suppose the c th cluster has altogether q points . for any point v corresponding to a vector ( left ( r1 )| v , right ( r2 )| v , horizon ( r3 )| v , where v = 1 , 2 , . . . , q , which obeys the rules 1 , 2 and 3 in step 3 , there exists a point uε { 1 , 2 , . . . , q } that satisfies the following : under such condition , u is the actual location of the delta point within cluster c . the nature of distribution of the core points is different from that of the delta points . however , the analysis to locate them is similar . that is to take a small area around the candidate core points for further dividing the small area in order to analyze the direction flow in each of the small area . it is necessary to consider the two situations shown in fig1 and fig1 in analyzing the direction flow around the core points . in fig1 , the convex upward characteristics resembles the delta characteristics but the r3 region can be ignored . fig1 shows a concave inward distribution characteristics which is symmetrical to that in fig1 . the method to locate the core point in this invention is described in following six steps : step 1 : from observation , the fingerprint direction flow has a greater variation , therefore the first step is to determine whether the two neighboring regions have sufficient variations . the consideration is illustrated below : ______________________________________left neighboring right neighboringregion region______________________________________bdi ( p , q - 1 ) bdi ( p , q ) bdi ( p , q + 1 ) ______________________________________ the candidate core points are restricted to the condition ## equ2 ## step 2 : with block ( p , q ) as the center , take a 5 × 5 block - region as shown in fig3 . since the angular variation as considerably large in regions around the cores , it will not be constrained in a small range . as such , use eq . ( 4 ) to determine the distribution of h 45 ° ( r 5 × 5 ( p , q )) and calculate the rest of the steps will be carried only if a ≦ threshold 3 ( a pre - defined value ). step 3 : next , examine the 5 × 5 block - region which has ( p , q ) as the center forming the convex or concave shape as shown in fig1 and 11 . that is , if ( left ( r1 )+ right ( r2 ))& gt ;( right ( r4 )+ left ( r5 )) and min ( left ( r1 ), right ( r2 ))≧ threshold 4 ( a pre - defined value ) then ( p , q ) is the center of the convex region . if ( left ( r1 )+ right ( r2 ))& lt ;( right ( r4 )+ left ( r5 )) and min ( right ( r4 ), left ( r5 ))≧ threshold 4 then ( p , q ) is the center of the concave region . step 4 : as the convex shape is similar to the delta shape , it is necessary to eliminate the information around the delta that may contribute to a candidate core point . this is to avoid repeated calculations and mistaking a delta point as a core point . step 5 : according to the convex and concave shapes and the point to point distances , the clustering of the candidate core points as found in step 4 is determined . the method to determine the clustering is again the modified k - means algorithm as developed in this invention . step 6 : step 5 has determined the clustering of the candidate core points . each cluster has to find a representing point to be regarded as the core point location . that is to process the convex and concave situations with the followings : from the above six steps , one to two core point locations of the fingerprint can be determined . as described above , this invention is applicable on any direction - flow of static or dynamic fluid ( gas or liquid ), or solids with grainy strips ( e . g . grain of wood and fingerprint ) to identify the locations of some characteristic points . for the case of fingerprint , the characteristic points are the core points and the delta points . therefore , even if the fingerprint is distorted to a certain extend due to stain , cuts or exerting different pressure or placing one &# 39 ; s finger in different orientation during the acquisition of the fingerprint , by using the methods in this invention the core points and the delta points can still be located since the features of the direction - flow are still available . to summarize , this invention can accurately locate the same core points and delta points of a fingerprint acquired in different time or conditions ( see fig1 to 14 ). this invention has made a considerable contribution to the automatic fingerprint recognition by providing highly accurate coordinates of the high - level feature points to be superior to any conventional methods of automatic fingerprint recognition .