a methodology for auto - depicting trends in object contours of an input image is proposed in the present invention . fig6 is a flowchart illustrating the method for auto - depicting trends in object contours according to an embodiment of the present invention . fig1 a is an input image containing a roadway . first , if the input image is a color image , the color image will be converted to a grayscale image . the conversion of the color image to grayscale is performed by using software such as adobe photo shop , ulead photo impact , etc . fig1 b and fig1 c are an angular value distribution diagram ( angular values are indicated by different grayscale values ) and an edge detection result ( white points indicate the edges ) respectively obtained from fig1 a through the step s 2 . the step s 2 is to retrieve and extract coordinates and angular values of the image edges by an edge detection method , where the edge detection method may be referred to as a method capable of obtaining gradient information . for example , the edge detection method may employ a conventional edge detection algorithm such as sobel , prewitt , roberts , etc . sobel algorithm is taken as an example of the edge detection method , and the equations for calculating a plurality of angular values θ and a plurality of edge intensity values g are as follows . the edge detection result ( fig1 c ) is obtained by comparing a threshold with the edge intensity values g , wherein the threshold may be a user - defined constant value or a variable value changed according to the input image . here , the threshold is set as a constant value obtained by multiplying the average value of all of the edge intensity values g within the input image by a number ( e . g ., 3 or 4 ). as shown in fig1 c , the coordinates of the edge points ( i . e ., the white points shown in fig1 c ) retained after the edge detection are regarded as elements within an s set . after obtaining the s set from step s 2 , step s 3 is executed to select a start point from the s set . in step s 3 , a start point ( ix 1 , ix 2 ) is first selected using one of the following manners : ( 1 ) obtaining the edge intensity value g of each pixel point after the edge detection process , sorting the edge intensity values g , and then sequentially selecting one from the sorted edge intensity values g , from the strongest to the weakest , to be the start point , wherein the same start point should not be selected repeatedly ; ( 2 ) selecting any non - repeated coordinate randomly to act as the start point , wherein the non - repeated coordinate is included in the s set ; ( 3 ) selecting any coordinate manually by the user from the input image to act as the start point . the manner of selecting the start point manually is employed by this embodiment to serve as an example for illustrative purposes . in step s 4 , the start point ( ix 1 , ix 2 ) is utilized to be a circle center for plotting a circular region with a radius r , and then the circular region is defined as a first region ( the tracking circle ). next , θ c is defined as the angular values corresponding to coordinates of the s set within the first region . hence , a main angular value id is obtained by performing histogram h r upon θ c and taking the main angular value of the highest bin , and then a first angular value screening range is determined according to the main angular value id . the equation id ± ra 1 ( ra 1 is a variable parameter , e . g ., 10 ) is utilized for determining the first angular value screening range , and the first angular value screening range is utilized for performing angular value screening upon the first region to obtain a first significant angular value and a first index . it should be emphasized that , in order to illustrate the embodiment of the step s 4 clearly , the circular region with a certain area is utilized as an example ; however , it is not a limitation of the shape of the region of the present invention . the angular value screening may be performed using one of the following methods : ( 1 ) taking the average ; ( 2 ) taking the median ; ( 3 ) deriving a statistical value from the highest bin in a histogram h r . the detailed description of the above - mentioned angular value screening methods will be described as follows . first , d s and c s are defined as sets containing θ values and coordinates ( x 1 , x 2 ) satisfying equation 5 , respectively . ( rs & lt ; θ ( x 1 , x 2 )& lt ; rb )∩(( tx 1 − x 1 ) 2 +( tx 2 − x 2 ) 2 ≦ r 2 ),∀( x 1 , x 2 ) ε s equation 5 ( 1 ) taking the average is to divide the sum of all the elements in d s by the total number of the elements in d s . ( 2 ) taking the median has two different ways as follows . ( i ) sort all of the elements in d s , wherein if there is an odd number of elements included in d s , then the angular value of the element which is located at the middle of the sorted elements is selected ; on the other hand , if there is an even number of elements included in d s , then the angular value of the former of two elements which are located at the middle of the sorted elements is selected . ( ii ) set a position range in accordance with the position of the middle element obtained from ( 1 ). for instance , the corresponding elements are selected based on middle element &# 39 ; s position ± d ( d is a variable parameter ), wherein the position range should be smaller than the total number of the elements in d s . next , the average of all the angular values corresponding to the selected elements is calculated . as shown in fig8 , each number in row 81 is representative of a position , and numbers in row 80 are representative of the sorted angular values , wherein the row 80 and the row 81 are mapped to each other , that is to say , each angular value in the row 80 corresponds to a position in the row 81 . for instance , based on the position of the middle element 17 . 2 the angular values ( i . e ., 16 . 9 , 17 . 2 , 17 . 3 ) in the interval respectively corresponding to positions 3 , 4 , 5 , will be selected , and the average of these angular values is 17 . 1 . the angular value may be sorted from the smallest to the largest ( i . e ., sorted in an ascending order ), or sorted from the largest to the smallest ( i . e ., sorted in a descending order ). ( 3 ) deriving a statistical value from the highest bin in histogram h r is to select the quantized interval containing the largest number of elements , and output the angular value obtained by taking the average of the angular values corresponding to all the elements in the selected quantized interval , as shown in the following equations 6 to 8 . in equation 6 , q is the width of the quantized interval and changes in accordance with d s , wherein the maximum and the minimum of d s also change in accordance with equation 5 , and bn denotes the user specified maximum number of bins in the histogram . bn is set to 10 in all embodiments presented in this document . d s set can be separated into bn sets ( or bins in terms of histogram ) by equation 7 , where ( x 1 , x 2 ) εc s . denote n ( j ) as the j th bin , j = 1 , 2 , . . . , bn . next , the number of elements included in the set n ( j ) is defined to be n ( j ). the one in the bins n which has the largest number of elements is defined as n ( i ); on the other hand , the one in the bins n which has the least number of elements is defined as n ( k ). a first significant angular value sa 1 can be obtained by the following equation 8 . after obtaining the first significant angular value sa 1 , the step s 5 is executed subsequently to determine whether a first index is lower than a threshold ( which may be a user - defined constant value ). the calculation of the first index may be performed by using one of the following manners : ( 1 ) performing histogram h r upon the angular values and dividing the difference of the number n ( i ) of the highest mode and the number n ( k ) of the lowest mode by the number n ( i ) of the highest mode ( equation 9 ); ( 2 ) performing histogram h r upon the angular values and dividing the number n ( i ) of the highest mode by the total number of elements contained in the set d s ( equation 10 ). | d s |: the number of elements contained in the set d s when the set d s includes the angular values corresponding to the edge coordinates within the first region , sa 1 obtained via angular value screening is the first significant angular value . when the set d s includes the angular values corresponding to the edge coordinates within the second region , sa 2 obtained via angular value screening is the second significant angular value . after the first significant angular value sa 1 is calculated by utilizing equations 5 to 8 , a probe point ( tx 1 , tx 2 ) can be calculated according to equations 11 and 12 by replacing id with sa 1 , thereby utilizing the probe point as a center to plot a circular region ( the probe circle ) as a second region with a radius r . a second angular value screening range sa 1 ± ra 2 ( ra 2 should be greater than ra 1 ) can be determined in accordance with the first significant angular value sa 1 , and a second significant angular value sa 2 within the second region can be calculated by utilizing equations 5 to 8 . after sa 2 is obtained , a second index can be calculated by utilizing equations 9 or 10 , and it is subsequently determined whether the second index is lower than the threshold by executing the step s 5 , wherein the threshold may be a user - defined constant value . the first angular value screening range is updated to sa 2 ± ra 1 by using the second significant angular value sa 2 , and angular value screening is performed upon the first region by using the updated first angular value screening range to obtain an updated first significant angular value sa 1 . to put it another way , the start point and sa 2 are used as the center of the circle and the reference angular value respectively , and then the first significant angular value sa 1 is recalculated by using equations 5 to 8 for producing an updated sa 1 . id of equation 11 and equation 12 is replaced with the updated sa 1 to obtain coordinate of an updated circle center ( tx 1 , tx 2 ). steps s 4 to s 5 are repeated for producing a next new start point after utilizing the updated circle center ( tx 1 , tx 2 ) as a new start point ( ix 1 , ix 2 ), or the procedure of auto - depicting trends in object contours is terminated when the stopping criteria is met , wherein the stopping criteria is met when one of the first index and the second index is lower than the threshold ( e . g ., 0 . 6 , 0 . 3 ). the results of auto - depicting trends in object contours are indicated by the black asterisks shown in fig1 d . fig2 a is an input image containing a qr code . first , if the input image is a color image , the color image will be converted to a grayscale image . the conversion of the color image to grayscale is performed by using software such as photo shop , photo impact , etc . fig2 b and fig2 c are an angular value distribution diagram ( angular values are indicated by different grayscale values ) and an edge detection result ( white points indicate the edges ) respectively obtained from fig2 a through the step s 2 . the step s 2 is to retrieve and extract coordinates and angular values of the image edges by utilizing an edge detection method , where the edge detection method may be referred to as a method capable of obtaining gradient information . for example , the edge detection method may employ a conventional edge detection algorithm such as sobel , prewitt , roberts , etc . sobel algorithm is taken as an example of the edge detection method , and a plurality of angular values θ and a plurality of edge intensity values g can be obtained by using equations 1 to equation 4 . the edge detection result ( fig2 c ) is obtained by comparing a threshold with the edge intensity values g , wherein the threshold may be a user - defined constant value or a variable value changed according to the input image . here , the threshold is set as a constant value obtained by multiplying the average value of all of the edge intensity values g within the input image by a number ( e . g ., 7 or 8 ). as shown in fig2 c , the coordinates of the edge points retained after the edge detection ( i . e ., white points shown in fig2 c ) are regarded as elements within an s set . since qr code contains bars and spaces possessing a bi - directional characteristic , the angular values obtained through sobel algorithm tend to populate at two certain angular values . to utilize this property , the histogram h a of the angular values associated with the elements within the s set is calculated , as shown in fig2 f , and the largest ( or the highest ) bin is defined as a first direction ang_dir 1st . then , the ang_dir 1st is utilized as a center ( or reference ) to set an angular value range ( i . e ., ang_dir 1st - d_a ˜ ang_dir 1st + d_a , where d_a is a variable parameter ). the angular value range is a range used for obtaining the distribution ( histogram ) of the angular values , as shown in fig2 g . furthermore , with regard to determining a second angular value direction , angular values included in the selected angular value range are deleted . the histogram h a is utilized for obtaining the distribution ( histogram ) of the remaining angular values , and the largest bin is defined as the second angular value direction , as shown in fig2 h . it should be noted that the first angular value direction is not limited to the exemplary direction of the present embodiment . g h and g y can be obtained through sobel algorithm ( equation 2 ), as shown in fig2 d and fig2 e . the edge coordinates contained in g h are regarded as elements within coordinate set s 1 , and the edge coordinates contained in g y are regarded as elements within coordinate set s 2 . next , s set is redefined to be the elements contained in s 1 . after obtaining the s set from the step s 2 , the step s 3 is executed to select a start point from the s set . in the step s 3 , a start point ( ix 1 , ix 2 ) is first selected using one of the following manners : ( 1 ) obtaining the edge intensity value g of each pixel point after the edge detection process , sorting the edge intensity values g , and then sequentially selecting one from the sorted edge intensity values g , from the strongest to the weakest , to be the start point , wherein the same start point should not be selected repeatedly ; ( 2 ) selecting any non - repeated coordinates randomly as the start point , wherein the non - repeated coordinate is included in the s set ; ( 3 ) selecting any coordinate manually by the user from the input image to act as the start point . in step s 4 , the start point ( ix 1 , ix 2 ) is utilized to be a circle center for plotting a circular region with a radius r , and then the circular region is defined as a first region ( the tracking circle ). next , id is defined as the first angular value direction ang_dir 1st , and then a first angular value screening range is determined according to id . the equation id ± ra 1 ( ra 1 is a variable parameter , e . g ., 10 ) is utilized for determining the first angular value screening range , and the first angular value screening range is utilized for performing angular value screening upon the first region to obtain a first significant angular value and a first index . it should be emphasized that , in order to illustrate the embodiment of the step s 4 clearly , the circular region with a certain area is utilized as an example ; however , it is not a limitation of the shape of the region of the present invention . the angular value screening method may be performed using one of the following methods : ( 1 ) taking the average ; ( 2 ) taking the median ; ( 3 ) deriving a statistical value from the highest bin in histogram h r . the detailed descriptions of the above mentioned angular value screening methods will be described as follows . first , d s and c s are defined as sets containing θ values and coordinates ( x 1 , x 2 ) satisfying equation 5 , respectively . in equation 5 , rb = id + ra , rs = id − ra . ( 1 ) taking the average is to divide the sum of all the elements in d s by the total number of the elements in d s . ( 2 ) taking the median has two different ways as follows . ( i ) sort all of the elements in d s , wherein if there is an odd number of elements included in d s , then the angular value of the element which is located at the middle of the sorted elements is selected ; on the other hand , if there is an even number of elements included in d s , then the angular value of the former one of two elements which are located at the middle of the sorted elements is selected . ( ii ) set a position range in accordance with the position of the middle element obtained from ( 1 ). for instance , the corresponding elements are selected based on middle element &# 39 ; s position ± d ( d is a variable parameter ), wherein the position range should be smaller than the total number of the elements in d s . next , the average of the sum of all the angular values corresponding to the selected elements is calculated . as shown in fig8 , each number in row 81 is representative of a position , and numbers in row 80 are representative of the sorted angular values , wherein the row 80 and the row 81 are mapped to each other , that is to say , each angular value in the row 80 corresponds to a position in the row 81 . for instance , based on the position of the middle element 17 . 2 the angular values ( i . e ., 16 . 9 , 17 . 2 , 17 . 3 ) in the interval respectively corresponding to positions 3 , 4 , 5 , will be selected , and the average of these angular values is 17 . 1 . the angular value may be sorted from the smallest to the largest ( i . e ., sorted in an ascending order ), or sorted from the largest to the smallest ( i . e ., sorted in a descending order ). ( 3 ) deriving a statistical value from the highest bin is to select the quantized interval containing the largest number of elements , and output the angular value obtained by taking the average of the angular values corresponding to all the elements in the selected quantized interval , as shown in the aforementioned equations 6 to 8 . in equation 6 , q is the width of the quantized interval and changes in accordance with d s , wherein the maximum and the minimum of d s also change in accordance with equation 5 , and bn denotes the user specified maximum number of bins in the histogram . d s set can be separated into bn sets ( or bins in terms of histogram ) by equation 7 , where ( x 1 , x 2 ) εc s . denote n ( j ) as the j th bin , j = 1 , 2 , . . . , bn . next , the number of elements included in the element set n ( j ) is defined as n ( j ). the one in the set n which has the largest number of elements is defined as n ( i ); on the other hand , the one in the element set n ( j ) which has the least number of elements is defined as n ( k ). a first significant angular value sa 1 can be obtained by the aforementioned equation 8 . after obtaining the first significant angular value sa 1 , the step s 5 is executed subsequently to determine whether a first index p_r is lower than a threshold ( which may be a user - defined constant value ). the calculation of the first index p_r may be performed using one of the following manners : ( 1 ) obtaining histogram h r of the angular values and dividing the difference of the number n ( i ) of the highest mode and the number n ( k ) of the lowest mode by the number n ( i ) of the highest bin ( equation 9 ); ( 2 ) obtaining histogram h r of the angular values and dividing the number n ( i ) of the highest bin by the total number of elements contained in the set d s ( equation 10 ). when the set d s includes the angular values corresponding to the edge coordinates within the first region , sa 1 obtained via angular value screening is the first significant angular value . when the set d s includes the angular values corresponding to the edge coordinates within the second region , sa 2 obtained via angular value screening is the second significant angular value . after the first significant angular value sa 1 is calculated by utilizing equations 5 to 8 , a probe point ( tx 1 , tx 2 ) can be calculated according to equations 11 and 12 by replacing id with sa 1 thereby utilizing the probe point as a center to plot a circular region as a second region with a radius r . a second angular value screening range sa 1 ± ra 2 ( ra 2 should be larger than ra 1 ) can be determined in accordance with the first significant angular value sa 1 , and a second significant angular value sa 2 within the second region can be calculated by utilizing equations 5 to 8 . after sa 2 is obtained , it is determined whether a second index is lower than the threshold by executing the step s 5 subsequently , and the second index can be calculated by utilizing equations 9 or 10 , wherein the threshold may be a user - defined constant value . the first angular value screening range is updated to sa 2 ± ra 1 by using the second significant angular value sa 2 , and angular value screening is performed upon the first region by using the updated first angular value screening range to obtain an updated first significant angular value sa 1 . to put it another way , the start point and sa 2 are used as the center of the circle and the reference angular value respectively , and then the first significant angular value sa 1 is recalculated by using equations 5 to 8 for producing an updated sa 1 . id of equation 11 and equation 12 is replaced with the updated sa 1 to obtain coordinate of an updated circle center ( tx 1 , tx 2 ). steps s 4 to s 5 are repeated for producing a next new start point after obtaining a new start point ( i . e ., a corrected coordinate of the circle center ), or the procedure of auto - depicting trends in object contours is terminated when the stopping criteria , wherein the stopping criteria is met when one of the first index and the second index is lower than the threshold ( e . g ., 0 . 6 , 0 . 3 ). after auto - depicting trends in object contours for the s set corresponding to the s 1 set is complete , as shown in fig2 i , s 2 will be defined to be elements of s set , and the process of auto - depicting trends in object contours is the same as that employed for processing the aforementioned s set . the only difference is that , while executing the step s 4 , the second angular value direction needs to be defined to be id . the result of auto - depicting trends in object contours for the s set corresponding to the s 2 set is shown in fig2 j . the above descriptions are only preferred embodiments of the present invention , but not limitations of the present invention . designs based on the above alternatives and other further extensions complying with the features and spirits of the present invention all fall within the scope of the present invention . those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention . accordingly , the above disclosure should be construed as limited only by the metes and bounds of the appended claims .