Claims (1)
1245546 拾、申請專利範圍: 1. 一種影像二值化方法,主要包含以下步驟: 步驟一:將所有像素的數值調整成〇〜255,計算所有像素之所有數值 (〇~255)的出現次數以繪出像素數值的累積柱狀圖 histogram)’該累積柱狀圖的橫轴是所有像素之所有可能數值由小到大依 序排列,縱軸是對每一數值而言小於或等於該數值的累積出現次數; 步驟二:從1到254的所有整數中,計算並比較哪一個整數使得〇的出現 次數、小於或等於該整數的累積出現次數、小於或等於255的累積出現次 數三者所構成的線性折線最逼近累積柱狀圖,將此定為像素數值的二值化 臨界值; 步驟三:將大於臨界值的像素數值轉換成高值、小於或等於臨界值的像素 數值轉換成低值以得到二值化的影像。 2 ·如申請專利範圍第1項所述的影像二值化方法,其中該步驟二中〇、i 到254的某整數、255二者所構成之線性折線的每點座標定義為(i, Li) ’累積柱狀圖包絡線(Envel〇pe line)的每點座標定義為&⑴,則 1到254的整數中使得P &最小者即為像素數值的二值化臨界值。 3·如申請專利範圍第工項所述的影像二值化方法,其中該步驟二中〇、玉 到254的某-整數、255二者所構成之線性折線的每點座標定義為& Li),累積柱狀圖包絡線(Envel〇pe line)的每點座標定義為(i,阳,則 yfe-e)2 1到254的整數中使得,,最小者即為像素數值的二值化臨界值。 4· 一種影像一值化方法,主要包含以下步称·· 步驟- ·將所有像素的數侧整成0〜255,計算所有像素之所有數值 12455461245546 The scope of patent application: 1. An image binarization method, which mainly includes the following steps: Step 1: Adjust the values of all pixels to 0 ~ 255, and calculate the number of occurrences of all the values (0 ~ 255) of all pixels to Draw a cumulative histogram of pixel values (histogram) 'The horizontal axis of the cumulative histogram is that all possible values of all pixels are arranged in order from small to large, and the vertical axis is less than or equal to the value for each value Cumulative number of occurrences; Step 2: From all integers from 1 to 254, calculate and compare which integer makes the number of occurrences of 0, the cumulative number of occurrences less than or equal to the integer, and the cumulative number of occurrences less than or equal to 255. The formed linear polyline is closest to the cumulative histogram, and this is set as the binarization threshold of the pixel value. Step 3: Convert the pixel value greater than the threshold value to a high value, and the pixel value less than or equal to the threshold value to a low value. Value to get a binarized image. 2 · The image binarization method as described in item 1 of the scope of patent application, wherein the coordinates of each point of the linear polyline formed by 0, i, an integer of 254, and 255 in step 2 are defined as (i, Li ) 'Each point of the cumulative histogram envelope (EnvelOpe line) is defined as & ⑴, then the integer of 1 to 254 which makes P & the smallest is the binarization threshold of the pixel value. 3. The method of image binarization as described in the first item of the scope of patent application, wherein the coordinates of each point of the linear polyline formed by 0, a certain integer from yu to 254, and 255 in this step are defined as & Li ), The coordinate of each point of the cumulative histogram envelope line (EnvelOpe line) is defined as (i, yang, yfe-e) 2 In the integer from 1 to 254, the smallest is the binarization of the pixel value Critical value. 4 · An image value method, which mainly includes the following steps: · Steps-· Round the number side of all pixels to 0 ~ 255 and calculate all the values of all pixels 1245546
次數、小於或等於該整數的累積出現次數、 糸積出現百分比; 比較哪一個整數使得0的出現 小於或等於255的累積出現次 數三者所赋猶崎録逼㈣餘㈣,將歧雜讀朗二值化 臨界值; 步驟三:將大於臨界值的像素數值轉換成高值、小於或等於臨界值的像素 數值轉換成低值以得到二值化的影像。 5·如申請專利範圍第4項所述的影像二值化方法,其中該步驟二中〇、i 到254的某一整數、255三者所構成之線性折線的每點座標定義為(i Li),累積柱狀圖包絡線(Envelope line)的每點座標定義為(丨,Ei),則 η ΣΙΑ-尽I 1到254的整數中使得/ 最小者即為像素數值的二值化臨界值。 6·如申請專利範圍第4項所述的影像二值化方法,其中該步驟二中〇、1 到254的某一整數、255三者所構成之線性折線的每點座標定義為(i, Li),累積柱狀圖包絡線(Envelope line)的每點座標定義為(丨,Ei),則 Σ(υ)2 則1到254的整數中使得’ 最小者即為像素數值的二值化臨界The number of times, the cumulative number of occurrences less than or equal to the integer, and the percentage of the occurrence of the product; compare which integer makes the cumulative occurrences of 0 less than or equal to 255. The three are given by Yuzaki Records, and will read miscellaneously. Lang binarization threshold; step three: convert the pixel value greater than the threshold to a high value, and the pixel value less than or equal to the threshold to a low value to obtain a binarized image. 5. The image binarization method as described in item 4 of the scope of patent application, wherein the coordinates of each point of the linear polyline formed by three integers of 0, i to 254, and 255 in step 2 are defined as (i Li ), The coordinate of each point of the envelope line of the cumulative histogram (Envelope line) is defined as (丨, Ei), then η ΣΙΑ-the integer between 1 and 254, where the / minimum is the binarization threshold of the pixel value . 6. The image binarization method as described in item 4 of the scope of patent application, wherein the coordinates of each point of the linear polyline formed by three integers of 0, 1 to 254, and 255 in step 2 are defined as (i, Li), the coordinate of each point of the envelope line of the cumulative histogram (Envelope line) is defined as (丨, Ei), then Σ (υ) 2 is an integer from 1 to 254 such that 'the smallest is the binarization of the pixel value critical