TWI579798B - An effective and weight adjustable image segmentation method and program thereof - Google Patents

An effective and weight adjustable image segmentation method and program thereof Download PDF

Info

Publication number
TWI579798B
TWI579798B TW100117904A TW100117904A TWI579798B TW I579798 B TWI579798 B TW I579798B TW 100117904 A TW100117904 A TW 100117904A TW 100117904 A TW100117904 A TW 100117904A TW I579798 B TWI579798 B TW I579798B
Authority
TW
Taiwan
Prior art keywords
group
image
data
values
pixel
Prior art date
Application number
TW100117904A
Other languages
Chinese (zh)
Other versions
TW201248543A (en
Inventor
詹永寬
白沛諺
蔡孟勳
邱靖華
Original Assignee
國立中興大學
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 國立中興大學 filed Critical 國立中興大學
Priority to TW100117904A priority Critical patent/TWI579798B/en
Publication of TW201248543A publication Critical patent/TW201248543A/en
Application granted granted Critical
Publication of TWI579798B publication Critical patent/TWI579798B/en

Links

Landscapes

  • Image Analysis (AREA)
  • Apparatus For Radiation Diagnosis (AREA)

Description

有效和可調權重之影像切割方法其程式產品Effective and adjustable weight image cutting method

本發明是一種影像切割方法,尤其是關於一種可以正確搜尋圖示資料之門檻值而進行影像分割的方法。The present invention is an image cutting method, and more particularly to a method for image segmentation by correctly searching for threshold values of graphic data.

影像處理方法已經應用於越來越多的領域,例如用於協助照片品質之補償、修正,或用於醫療影像之處理。以醫療影像處理為例,為了讓醫生能夠更清楚地瞭解病患的病情,透過醫療影像擷取設備例如X光、斷層掃瞄、磁核共振等,對人體進行掃瞄及影像擷取,所擷取的影像藉以提供醫生診斷外科病患的健康狀態。目前,透過影像處理技術更可以讓所擷取的醫療影像之各種器官予以定位或精確選取,成為診斷或手術的重要參考依據。Image processing methods have been used in a growing number of areas, such as to assist in the compensation, correction, or processing of medical images. Taking medical image processing as an example, in order to enable doctors to more clearly understand the patient's condition, the medical imaging device such as X-ray, tomographic scan, magnetic resonance, etc., scan and image the human body. The captured image is used to provide a doctor to diagnose the health status of the surgical patient. At present, through the image processing technology, the various organs of the medical image captured can be positioned or accurately selected, which becomes an important reference for diagnosis or surgery.

由一影像之中選定(切割或選取或標定)部分指定區域或具有特殊特徵的局部影像,如由前述的斷層掃瞄之醫療影像中選取一疑似腫瘤區域,通常透過二值化影像藉以擷取或選出所需的局部區域,所使用的二值化演算方式可如Otsu(1979)所提出之方法。Otsu演算方法是利用統計方法對一影像之各像素之灰階會顏色特徵分佈運算以求取一門檻值(Threshold),讓超過及低於該門檻值的像素分別成為白及黑之二值化,藉以選出所需要的前景區域,方便進行其他的後續處理。Selecting (cutting or selecting or calibrating) a portion of the designated area or a partial image with special features from an image, such as selecting a suspected tumor area from the medical image of the aforementioned tomographic scan, usually by binarizing the image Or select the desired local area, and the binarization calculation method used can be as proposed by Otsu (1979). The Otsu calculation method uses a statistical method to calculate the gray-scale color feature distribution of each pixel of an image to obtain a Threshold, so that pixels exceeding and below the threshold become binarized white and black, respectively. In order to select the desired foreground area for other follow-up processing.

然而,前述的Otsu門檻值法方法簡單有效。但當影像中各像素統計後之某一群組的資料量或者變異數遠大於該影像各像素之其他群組,該Otsu則因為差異太大使演算出來的門檻值並非可以作為區別兩個群組的分布臨界,因此無法正確給予該影像一合適的門檻值。而且,Otsu門檻值法對於同一影像資料只能提供一固定的門檻值,不能因為使用者不同的應用而提供不同且適用於該應用的門檻值。However, the aforementioned Otsu threshold method is simple and effective. However, when the amount of data or the variation of a certain group of pixels in the image is much larger than other groups of pixels of the image, the Otsu is too large to make the calculated threshold value not be used as a difference between the two groups. The distribution is critical and therefore the image cannot be properly given a suitable threshold. Moreover, the Otsu threshold method can only provide a fixed threshold for the same image data, and cannot provide different threshold values for the application due to different applications of the user.

為了解決既有的門檻值影像演算方法,因影像之資料群的變異數或者群組資料量過大,而無法提供一適當門檻值的缺點,以及無法因應不同資料而適應性調爭門檻值的技術問題,本發明利用基因演算法,透過過往的資料,依照使用者需求不同訓練、產生一組適用該應用的參數值,進而提供適當的門檻值,解決既有技術的問題,讓後續的影像處理可以依據正確的門檻值設定,讓影像處理結果可以確保正確。In order to solve the existing threshold value image calculation method, the shortcomings of the image data group or the group data is too large to provide an appropriate threshold value, and the technology that cannot adapt to the different thresholds for adapting the threshold value. The problem is that the present invention utilizes a genetic algorithm to train and generate a set of parameter values suitable for the application according to the user's needs, thereby providing an appropriate threshold value, solving the problem of the prior art, and allowing subsequent image processing. Image processing results can be guaranteed to be correct based on the correct threshold settings.

本發明提供一種有效和可調權重之影像切割方法,其步驟包含:輸入一影像及二指定參數:該影像為灰階影像並包含複數個像素,所有像素之位置與灰階特徵組成一資料集合,兩個該指定參數為被給予的常數值,兩個指定參數與該影像種類與特徵以及各像素之分布狀態有關;產生一門檻值組合:給予任一組門檻值組合 T =( t 1 , t 2 ,..., t G-1 ),其中該門檻值組合包含複數個門檻值 t 1 , t 2 ,..., t G-1 ,t 1 ,< t 2 <...< t G-1 將影像各像素之資料集合分割成G個群組:依據該資料集合之分布狀況,分成G個群組,G個群組之中的第g個群組內的資料值介於一群組分布範圍內定義為 t g-1 t g 計算各群組之組距:依據下列公式(1)計算第g個群組之組內資料值的組距 R g ( T ):The invention provides an effective and adjustable weight image cutting method, the method comprising the steps of: inputting an image and two specified parameters : the image is a grayscale image and comprises a plurality of pixels, and all pixel positions and grayscale features form a data set The two specified parameters are the constant values given, and the two specified parameters are related to the image type and characteristics and the distribution state of each pixel; generating a threshold combination: giving any group threshold value combination T = ( t 1 , t 2 ,..., t G-1 ), wherein the threshold combination comprises a plurality of threshold values t 1 , t 2 , . . . , t G-1 , t 1 , < t 2 < ... < t G-1 ; dividing the data set of each pixel of the image into G groups: according to the distribution status of the data set, divided into G groups, and the data values in the gth group among the G groups are between A group distribution range is defined as t g-1 t g ; the group distance of each group is calculated: the group distance R g ( T ) of the data values of the group of the gth group is calculated according to the following formula (1):

其中,g代表第g個群組, x min x max 為該資料集合之最小與最大的資料值;計算各群組之組內資料個數對全部資料集合之個數之比例:依據下列公式(2)計算第g個群組內的像素資料個數佔資料集合之總個數比例 P g ( T )Where g is the g-th group, x min and x max are the minimum and maximum data values of the data set; and the ratio of the number of data in each group to the total number of data sets is calculated: according to the following formula (2) Calculate the ratio of the number of pixel data in the g-th group to the total number of data sets P g ( T ) :

其中, n g,i 為第 g 個群組內,值為 x g,i 的資料個數, x g,i 為第 g 個群組內第 i 小的資料值;計算各群組之組內之平均數與標準差:依據下列公式(3)及(4)計算各群組內的平均數M g 及標準差Std g (T),其中,第 g 個群組內資料值的平均數 M g Wherein, n-g, i is the g-th group, the value of X g, the number of data i, X g, the g i is the i-th group within small data values; calculating in each group of the groups the mean and standard deviation: (3) and (4) calculating the average M g and M Mean standard deviation Std g (T), wherein the g-th group of data values within each group according to the following formula g :

g 個群組內資料值的標準差 Std g ( T )為:Standards within the g-th group data value difference Std g (T) of:

計算各群組之組內之群內分散值:逐一計算每個群組之組內分散值,第 g 個群組內之分散值如下: Calculate the intra-group dispersion values within each group : Calculate the intra-group dispersion values of each group one by one, and the dispersion values in the g- th group are as follows:

決定一組最佳門檻值:依據下列公式(5)計算一最佳門檻值 T * Determine a set of optimal thresholds: Calculate an optimal threshold T * according to the following formula (5):

其中,指定參數 r 1 r 2 為兩個被給予的常數值,其描述著 R g , P g ,and Std g 三者間之關係的參數。Among them, the specified parameters r 1 and r 2 are two given constant values, which describe the parameters of the relationship between R g , P g , and Std g .

依據各像素之資料值內容與各像素座標切割選擇局部影像:利用下列公式進行切割: Selecting a partial image according to the content of each pixel's data value and each pixel coordinate: using the following formula to cut:

其中,( i , j )為該影像之像素座標, I ( i , j )為對應的灰階值, I' 為切割後的影像;輸出切割後的影像。 Where ( i , j ) is the pixel coordinate of the image, I ( i , j ) is the corresponding gray scale value, I′ is the cut image; and the cut image is output.

其中,該指定參數為利用基因演算法依據與該影像種類近似之影像經訓練後之數值。Wherein, the specified parameter is a value obtained by using a genetic algorithm according to an image that is similar to the image type.

本發明另提供一種程式產品,其載入電腦後執行一有效和可調權重之影像切割方法,其步驟包含:輸入一影像及二指定參數:該影像為灰階影像並包含複數個像素,所有像素之位置與灰階特徵組成一資料集合,兩個該指定參數為被給予的常數值,兩個指定參數與該影像種類與特徵以及各像素之分布狀態有關;產生一門檻值組合:給予任一組門檻值組合 T =( t 1 , t 2 ,..., t G - 1 ),其中該門檻值組合包含複數個門檻值 t 1 , t 2 ,..., t G - 1 ,t 1 ,< t 2 <...< t G - 1 將影像各像素之資料集合分割成G個群組:依據該資料集合之分布狀況,分成G個群組,G個群組之中的第g個群組內的資料值介於一群組分布範圍內定義為 t g - 1 t g 計算各群組之組距:依據下列公式(1)計算第g個群組之組內資料值的組距 R g ( T ):The invention further provides a program product, which is loaded into a computer and executes an effective and adjustable weight image cutting method, the steps comprising: inputting an image and two specified parameters: the image is a grayscale image and includes a plurality of pixels, all The position of the pixel and the gray-scale feature constitute a data set, and the two specified parameters are constant values given, and the two specified parameters are related to the image type and feature and the distribution state of each pixel; generating a threshold combination: giving A set of threshold values T = ( t 1 , t 2 , ..., t G - 1 ), wherein the threshold combination comprises a plurality of threshold values t 1 , t 2 , ..., t G - 1 , t 1 , < t 2 < ... < t G - 1 ; The data set of each pixel of the image is divided into G groups: according to the distribution status of the data set, divided into G groups, among the G groups The data values in the gth group are defined as t g - 1 ~ t g within a group distribution range; the group distance of each group is calculated: the group of the gth group is calculated according to the following formula (1) Group distance of data values R g ( T ):

其中,g代表第g個群組, x min x max 為該資料集合之最小與最大的資料值;計算各群組之組內資料個數對全部資料集合之個數之比例:依據下列公式(2)計算第g個群組內的像素資料個數佔資料集合之總個數比例 P g ( T ):Where g is the g-th group, x min and x max are the minimum and maximum data values of the data set; and the ratio of the number of data in each group to the total number of data sets is calculated: according to the following formula (2) Calculate the ratio of the number of pixel data in the g-th group to the total number of data sets P g ( T ):

其中, n g,i 為第 g 個群組內,值為 x g,i 的資料個數, x g,i 為第 g 個群組內第 i 小的資料值;計算各群組之組內之平均數與標準差:依據下列公式(3)及(4)計算各群組內的平均數 M g 及標準差Std g (T),其中,第 g 個群組內資料值的平均數 M g Wherein, n-g, i is the g-th group, the value of X g, the number of data i, X g, the g i is the i-th group within small data values; calculating in each group of the groups the mean and standard deviation: (3) and (4) calculating the average M g and M Mean standard deviation Std g (T), wherein the g-th group of data values within each group according to the following formula g :

g 個群組內資料值的標準差 Std g ( T )為:Standards within the g-th group data value difference Std g (T) of:

計算各群組之組內之群內分散值:逐一計算每個群組之組內分散值,第 g 個群組內之分散值如下: Calculate the intra-group dispersion values within each group : Calculate the intra-group dispersion values of each group one by one, and the dispersion values in the g- th group are as follows:

決定一組最佳門檻值:依據下列公式(5)計算一最佳門檻值 T * Determine a set of optimal thresholds: Calculate an optimal threshold T * according to the following formula (5):

其中,指定參數 r 1 r 2 為兩個被給予的常數值,其描述著 R g , P g ,and Std g 三者間之關係的參數。Among them, the specified parameters r 1 and r 2 are two given constant values, which describe the parameters of the relationship between R g , P g , and Std g .

依據各像素之資料值內容與各像素座標切割選擇局部影像:利用下列公式進行切割: Selecting a partial image according to the content of each pixel's data value and each pixel coordinate: using the following formula to cut:

其中,( i , j )為該影像之像素座標, I ( i , j )為對應的灰階值, I' 為切割後的影像;輸出切割後的影像。 Where ( i , j ) is the pixel coordinate of the image, I ( i , j ) is the corresponding gray scale value, I′ is the cut image; and the cut image is output.

由前述的說明可知,本實施例之有效和可調權重之影像切割,透過演算處理技術改善既有門檻值設定問題及影像切割之諸多問題,本實施例可以將影像精確分類為兩組以上的群組,更透過門檻值之選用技術,可精確選擇所需的區域。It can be seen from the foregoing description that the image cutting of the effective and adjustable weight of the embodiment improves the problem of the threshold setting problem and the image cutting by the arithmetic processing technology. In this embodiment, the image can be accurately classified into two or more groups. Groups, through the selection of thresholds, can precisely select the desired area.

請參考第一圖,其為本發明之有效和可調權重之影像切割方法的較佳實施例,該有效和可調權重之影像切割方法以一程式,載入一電腦後由執行下列步驟,包含:Please refer to the first figure, which is a preferred embodiment of the effective and adjustable weight image cutting method of the present invention. The effective and adjustable weight image cutting method is executed by a program, after loading a computer, by performing the following steps. contain:

(81)輸入一影像及二指定參數:輸入一影像及二指定參數,該影像為灰階影像並包含複數個像素,所有像素之位置與灰階特徵組成一資料集合。該影像可由一彩色影像經灰階化之後而成為灰階該影像。兩個該指定參數為被給予的常數值,兩個指定參數與該影像種類與特徵以及各像素之分布狀態有關。所謂的影像種類與特徵指該影像的內容種類與某種內容具有的灰階特徵或圖形內容,例如人體各種器官的斷層掃瞄、人物攝影、生物細胞等;本實施例之兩個指定參數定義為 r 1 r 2 ,其描述該影像之各像素之灰階狀態與分布位置狀態有關。 (81) Input an image and two specified parameters: input an image and two specified parameters, the image is a grayscale image and includes a plurality of pixels, and the positions of all the pixels and the grayscale features constitute a data set. The image may be grayscaled by a color image and then grayscaled. The two specified parameters are the constant values given, and the two specified parameters are related to the image type and characteristics and the distribution state of each pixel. The so-called image type and feature refers to the content type of the image and the gray scale feature or graphic content of the certain content, such as tomographic scan of various organs of the human body, character photography, biological cells, etc.; two specified parameter definitions of this embodiment For r 1 and r 2 , the gray-scale state of each pixel describing the image is related to the state of the distributed position.

(82)產生一門檻值組合:給予任一組門檻值組合 T =( t 1 , t 2 ,..., t G-1 ),該門檻值組合包含複數個門檻值 t 1 , t 2 ,..., t G-1 其中, t 1 ,< t 2 <...< t G-1 (82) generating a threshold combination: giving any set of threshold values T = ( t 1 , t 2 , ..., t G-1 ), the threshold combination comprising a plurality of threshold values t 1 , t 2 , ..., t G-1 , where t 1 , < t 2 < ... < t G-1 .

(83)將影像各像素之資料集合分割成 G 個群組:依據該影像之各像素之灰階的資料值之分布狀況,分成G個群組,其中,G個群組之中的第g個群組內的資料值介於一群組分布範圍內(定義為: t g-1 t g )。為了取出該影像之內包含的物件,必須對各像素進行分群演算處理,利用物件之灰階特徵與其他的區域不同之特性,先統計各像素之灰階特徵分布,再依據分布狀況予以分群。分群演算之一般原則為「在同一群組內的資料應都很相似,但不同群組間的資料應差異很大」因此,通常可以利用統計各像素之灰階分布狀態、變異數等以描述各像素資料之各群組之某一群組內的差異狀況。 (83) dividing the data set of each pixel of the image into G groups: according to the distribution of the data values of the gray levels of the pixels of the image, into G groups, wherein the g of the G groups The data values in each group are within a group distribution (defined as: t g-1 ~ t g ). In order to extract the objects contained in the image, each pixel must be grouped and processed, and the gray-scale features of each pixel are first counted according to the characteristics of the gray-scale features of the object and other regions, and then grouped according to the distribution. The general principle of cluster calculus is that "the data in the same group should be similar, but the data between different groups should be very different." Therefore, it is usually possible to describe the grayscale distribution state, variation number, etc. of each pixel. The difference in a group of each group of pixel data.

(84)計算各群組之組距:(84) Calculate the group distance of each group:

目前,既有之Otsu門檻值法採群組內資料值之變異數,當作資料分群的依據;即每一群組內之資料值的變異數應盡可能的小,各進行分群演算之群組內資料值之標準差與資料數量,來決定一最佳門檻值。當兩群或兩群以上資料之單位不同,或即使資料單位相同,但在不同群組間群之資料值的平均數 M 差異大時,則其標準差是不能直接做比較的。故在作比較時,一般會先將標準差除以其群組內資料值的平均數,以進行正規化。請參考第二圖,其顯示兩群具有相同標準差的資料群,但其平均數 M 卻差異相當大;為了解決這個問題,故本實施例採用組距 R 來對標準差進行正規化。At present, the variability of the data values in the existing Otsu threshold method is used as the basis for data grouping; that is, the variation of the data values in each group should be as small as possible, and each group performing group calculus The standard deviation of the data values in the group and the amount of data to determine an optimal threshold. When the units of two or more groups of data are different, or even if the units of data are the same, but the difference in the mean value M of the data among the groups is large, the standard deviation cannot be directly compared. Therefore, when making comparisons, the standard deviation is generally divided by the average of the data values in the group to be normalized. Please refer to the second figure, which shows two groups of data groups with the same standard deviation, but the average number M is quite different; in order to solve this problem, the present embodiment uses the group distance R to normalize the standard deviation.

在實際演算方面,設 x min x max 為該資料集合之最小與最大的資料值。如前列步驟所述,當欲對該資料集合,依其資料值的分布狀況,將其分割成 G 個群組時,則須被給定 G-1 個門檻值 t 1 , t 2 ,..., t G-1 ,以致於第 g 個群組內的資料值皆介於 t g-1 t g 之間。假設 x g , i 為第 g 個群組內第 i 小的資料值,另設 n g , i 為第 g 個群組內,值為 x g , i 的資料個數。當給予任一組門檻值組 T =( t 1 , t 2 x g , i 為第 g 個群組內第 i 小的資料值,另設 n g , i 為第 g 個群組內,值為 x g , i 的資料個數。,..., t G-1 )時,則第 g 個群組內資料值的組距 R g ( T )可如下列公式(1):In terms of actual calculation, let x min and x max be the minimum and maximum data values of the data set. As described in the preceding steps, when the data set is to be divided into G groups according to the distribution of its data values, it is necessary to give G-1 threshold values t 1 , t 2 , .. , t G-1 , so that the data values in the g- th group are between t g-1 and t g . Suppose X g, the g i is the i th data values within the group of small, separate n-g, i is the g-th group, the value of X g, i is the number of data. When administered either set threshold group T = (t 1, t 2 set X g, the g i is the i th data values within the group of small, separate n-g, i is the g-th group, the value of is the number of data x g, i, and ..., when t G-1), the g-th group of data values within the group from R g (T) may be as the following equation (1):

(85)計算各群組之組內資料個數對全部資料集合之個數之比例:計算該影像之複數個群組之各個群組內個數,並計算出每個群組之像素個數比該影像所有像素之總數之比例。以第 g 個群組為例,該群組內資料個數佔整體資料總個數的比例 P g ( T ),可表示為下列公式(2): (85) Calculating the ratio of the number of data in each group to the number of all data sets: calculating the number of each group of the plurality of groups of the image, and calculating the number of pixels in each group The ratio of the total number of pixels of the image. Taking the g- th group as an example, the ratio of the number of data in the group to the total number of total data P g ( T ) can be expressed as the following formula (2):

(86)計算各群組之組內之平均數與標準差:計算每個群組之組內平均數、標準差。以第g個群組為例,各群組之組內平均數、標準差之公式分別為: (86) Calculate the mean and standard deviation within the group of each group : Calculate the average number and standard deviation of each group. Taking the g-th group as an example, the formulas of the average number and standard deviation of each group are:

g 個群組內資料值的平均數 M g The average number of M g g-th data value within the group:

g 個群組內資料值的標準差 Std g ( T )為:Standards within the g-th group data value difference Std g (T) of:

(87)計算各群組之組內之群內分散值:(87) Calculate the intra-group dispersion values within the groups of each group:

逐一計算每個群組之組內分散值,所謂的分散值指依據前述的門檻值組合T所分割的各個群組之組內之各像素之分散狀態,以第g組為例,其公式如下:The intra-group dispersion value of each group is calculated one by one, and the so-called dispersion value refers to the dispersion state of each pixel in the group of each group divided according to the threshold value combination T described above, taking the g-group as an example, and the formula is as follows :

g 個群組內之分散值如下: G-th group dispersed within the following values:

(88)決定一組最佳門檻值:本實施例先嘗試各種可能的門檻值,並透過每一群組的 R g , P g ,和 Std g ,來決定出最適當的門檻值。當給予任一組門檻值 T =( t 1 , t 2 ,..., t G - 1 )時,則本實施例利用下面公式計算一最佳門檻值 T * (88) Determining a set of optimal threshold values: This embodiment first attempts various possible threshold values and determines the most appropriate threshold value by R g , P g , and Std g of each group. When any set of threshold values T = ( t 1 , t 2 , ..., t G - 1 ) is given, then the present embodiment calculates an optimal threshold T * using the following formula:

其中,指定參數 r 1 r 2 為兩個被給予的常數值,其描述著 R g , P g ,and Std g 三者間之關係的參數。Among them, the specified parameters r 1 and r 2 are two given constant values, which describe the parameters of the relationship between R g , P g , and Std g .

請參考第三圖,當被指定參數 r 1 r 2 不同時,依據前述個步驟之處理結果將獲得不同的門檻值,且所獲得的分群結果也將有所不同。實際上,對於同一資料集合,可能會因應用上的不同(例如醫療影像、人物攝影、山水攝影、微生物攝影等),須採用不同的門檻值才可精確找出該影像中所需要物件的像素區域或範圍。對於某種特定的應用而言,其所處理的資料經常都據有某些相近的特性,因此,決定該指定參數可以是依據應用範疇或影像種類與特徵,決定該指定參數;實際施行上,該指定參數可以依據待處理之該影像的應用範疇或該影像種類與特徵,由一資料庫中選取近似的應用範疇或近似種類與特性,選擇所需的指定參數 r 1 r 2 ,該資料庫內儲存的指定參數可以是利用一基因演算法依據影像種類或應用分別訓練而得,使該資料庫儲存之指定參數與不同的影像有對應關係,當系統讀取影像決定後,可以依據輸入的影像由資料庫內選擇近似的影像內容屬性對應的指定參數,進行後列的演算處理。Please refer to the third figure. When the specified parameters r 1 and r 2 are different, different threshold values will be obtained according to the processing results of the foregoing steps, and the obtained clustering results will also be different. In fact, for the same data set, depending on the application (such as medical imaging, character photography, landscape photography, microbiological photography, etc.), different threshold values must be used to accurately find the pixels of the desired object in the image. Area or range. For a particular application, the data it processes often has some similar characteristics. Therefore, determining the specified parameters can be based on the application category or image type and characteristics, and the specified parameters are determined; in actual implementation, The specified parameter may be selected according to the application category of the image to be processed or the type and characteristics of the image, and an approximate application category or approximate type and characteristic is selected from a database, and the required specified parameters r 1 and r 2 are selected . The specified parameters stored in the library may be respectively trained by using a gene algorithm according to the type of image or application, so that the specified parameters stored in the database have corresponding relationships with different images, and when the system reads the image, the input may be based on the input. The image is selected from the database by selecting the specified parameter corresponding to the image content attribute, and the calculation process in the subsequent column is performed.

(89)依據各像素之資料值內容與各像素座標切割選擇局部影像: (89 ) Selecting a partial image according to the content of each pixel's data value and each pixel coordinate:

假設影像中座標( i,j )的資料值為 I ( i,j ),其可利用下列公式進行切割:其中, I' 為切割後的影像。Suppose the data value of the coordinates ( i,j ) in the image is I ( i,j ), which can be cut using the following formula: Where I' is the image after cutting.

(90)輸出切割後的影像:將切割後的影像 I' 予以輸出。 (90) Outputting the cut image: Output the cut image I' .

由前述的說明可知,本實施例之有效和可調權重之影像切割,透過演算處理技術改善既有門檻值設定問題及影像切割之諸多問題,本實施例可以將影像精確分類為兩組以上的群組,更透過門檻值之選用技術,可精確選擇所需的區域。It can be seen from the foregoing description that the image cutting of the effective and adjustable weight of the embodiment improves the problem of the threshold setting problem and the image cutting by the arithmetic processing technology. In this embodiment, the image can be accurately classified into two or more groups. Groups, through the selection of thresholds, can precisely select the desired area.

第一圖為本發明之有效和可調權重之影像切割方法流程示意圖。The first figure is a schematic flow chart of an effective and adjustable weight image cutting method according to the present invention.

第二圖為兩個影像之分布統計比較圖。The second picture is a statistical comparison of the distribution of the two images.

第三圖為本發明選擇不同的指定參數之切割結果示意圖。The third figure is a schematic diagram of the cutting result of selecting different specified parameters for the present invention.

第四圖為本發明選擇不同後的影像切割結果示意圖。The fourth figure is a schematic diagram of image cutting results after different selections of the present invention.

Claims (2)

一種有效和可調權重之影像切割方法,其步驟包含:輸入一影像及二指定參數:該影像為灰階影像並包含複數個像素,所有像素之位置與灰階特徵組成一資料集合,兩個該指定參數為被給予的常數值,兩個指定參數與該影像種類與特徵以及各像素之分布狀態有關;產生一門檻值組合:給予任一組門檻值組合 T =( t 1 , t 2 ,..., t G-1 ),其中該門檻值組合包含複數個門檻值 t 1 , t 2 ,..., t G-1 t 1 ,< t 2 <...< t G-1 將影像各像素之資料集合分割成G個群組:依據該資料集合之分布狀況,分成G個群組,G個群組之中的第g個群組內的資料值介於一群組分布範圍內定義為 t g-1 t g 計算各群組之組距:依據下列公式(1)計算第g個群組之組內資料值的組距 R g ( T ): 其中,g代表第g個群組, x min x max 為該資料集合之最小與最大的資料值;計算各群組之組內資料個數對全部資料集合之個數之比例:依據下列公式(2)計算第g個群組內的像素資料個數佔資料集合之總個數比例 P g ( T ): 其中, n g,i 為第 g 個群組內,值為 x g , i 的資料個數, x g , i 為第 g 個群組內第 i 小的資料值;計算各群組之組內之平均數與標準差:依據下列公式(3)及(4)計算各群組內的平均數M g 及標準差Std g (T),其中,第 g 個群組內資料值的平均數 M g g 個群組內資料值的標準差 Std g ( T )為: 計算各群組之組內之群內分散值:逐一計算每個群組之組內分散值,第 g 個群組內之分散值如下: 決定一組最佳門檻值:依據下列公式(5)計算一最佳門檻值 T* 其中,指定參數 r 1 r 2 為兩個被給予的常數值,其描述著 R g , P g ,and Std g 三者間之關係的參數,而該指定參數為利用基因演算法依據與該影像種類近似之影像經訓練後之數值,依據各像素之資料值內容與各像素座標切割選擇局部影像:利用下列公式進行切割: 其中,( i , j )為該影像之像素座標, I ( i , j )為對應的灰階值, I' 為切割後的影像;輸出切割後的影像。 An effective and adjustable weight image cutting method, the method comprising: inputting an image and two specified parameters: the image is a grayscale image and comprises a plurality of pixels, and all pixel positions and grayscale features form a data set, two The specified parameter is a constant value given, two specified parameters are related to the image type and feature and the distribution state of each pixel; generating a threshold combination: giving any group threshold value combination T = ( t 1 , t 2 , ..., t G-1 ), wherein the threshold combination comprises a plurality of threshold values t 1 , t 2 , ..., t G-1 , t 1 , < t 2 < ... < t G-1 Dividing the data set of each pixel of the image into G groups: according to the distribution status of the data set, dividing into G groups, and the data values in the gth group among the G groups are in a group The distribution range is defined as t g-1 t g ; the group distance of each group is calculated: the group distance R g ( T ) of the data values of the group of the gth group is calculated according to the following formula (1): Where g is the g-th group, x min and x max are the minimum and maximum data values of the data set; and the ratio of the number of data in each group to the total number of data sets is calculated: according to the following formula (2) Calculate the ratio of the number of pixel data in the g-th group to the total number of data sets P g ( T ): Wherein, n-g, i is the g-th group, the value of X g, the number of data i, X g, the g i is the i-th group within small data values; calculating in each group of the groups the mean and standard deviation: (3) and (4) calculating the average M g and M Mean standard deviation Std g (T), wherein the g-th group of data values within each group according to the following formula g : Standards within the g-th group data value difference Std g (T) of: Calculate the intra-group dispersion values within each group : Calculate the intra-group dispersion values of each group one by one, and the dispersion values in the g- th group are as follows: Determine a set of optimal thresholds: Calculate an optimal threshold T * according to the following formula (5): Wherein, the specified parameters r 1 and r 2 are two given constant values, which describe parameters of the relationship between R g , P g , and Std g , and the specified parameters are based on the genetic algorithm and The image with the approximate image type is trained to select the partial image according to the data value of each pixel and each pixel coordinate: use the following formula to cut: Where ( i , j ) is the pixel coordinate of the image, I ( i , j ) is the corresponding gray scale value, I′ is the cut image; and the cut image is output. 一種程式產品,其載入電腦後執行一有效和可調權重之影像切割方法,其步驟包含:輸入一影像及二指定參數:該影像為灰階影像並包含複數個像素,所有像素之位置與灰階特徵組成一資料集合,兩個該指定參數為被給予的常數值,兩個指定參數與該影像種類與特徵以及各像素之分布狀態有關;產生一門檻值組合:給予任一組門檻值組合T=(t 1 ,t 2 ,...,t G-1 ),其中該門檻值組合包含複數個門檻值 t 1 ,t 2 ,...,t G-1 t 1 ,<t 2 <...<t G-1 將影像各像素之資料集合分割成G個群組:依據該資料集合之分布狀況,分成G個群組,G個群組之中的第g個群組內的資料值介於一群組分布範圍內定義為 t g-1 ~ t g 計算各群組之組距:依據下列公式(1)計算第g個群組之組內資料值的組距 R g ( T ): 其中,g代表第g個群組, x min x max 為該資料集合之最小與最大的資料值;計算各群組之組內資料個數對全部資料集合之個數之比例:依據下列公式(2)計算第g個群組內的像素資料個數佔資料集合之總個數比例 P g ( T ): 其中, n g ,i 為第 g 個群組內,值為 x g,i 的資料個數, x g,i 為第 g 個群組內第 i 小的資料值;計算各群組之組內之平均數與標準差:依據下列公式(3)及(4)計算各群組內的平均數M g 及標準差Std g (T),其中,第 g 個群組內資料值的平均數 M g g 個群組內資料值的標準差 Std g ( T )為: 計算各群組之組內之群內分散值:逐一計算每個群組之組內分散值,第 g 個群組內之分散值如下: 決定一組最佳門檻值:依據下列公式(5)計算一最佳門檻值 T* 其中,指定參數 r 1 r 2 為兩個被給予的常數值,其描述著 R g , P g ,and Std g 三者間之關係的參數,而該指定參數為利用基因演算法依據與該影像種類近似之影像經訓練後之數值,依據各像素之資料值內容與各像素座標切割選擇局部影像:利用下列公式進行切割: 其中,( i , j )為該影像之像素座標, I ( i , j )為對應的灰階值, I' 為切割後的影像;輸出切割後的影像。 A program product, which is loaded into a computer and performs an effective and adjustable weight image cutting method, the steps comprising: inputting an image and two specified parameters: the image is a grayscale image and includes a plurality of pixels, and the positions of all the pixels are The grayscale features constitute a data set, and the two specified parameters are constant values given, and the two specified parameters are related to the image type and feature and the distribution state of each pixel; generating a threshold combination: giving any threshold value Combining T = ( t 1 , t 2 ,..., t G-1 ) , wherein the threshold combination comprises a plurality of threshold values t 1 , t 2 , . . . , t G-1 , t 1 , < t 2 < ... < t G-1 ; The data set of each pixel of the image is divided into G groups: according to the distribution status of the data set, divided into G groups, the gth group among the G groups The data values in the group are defined as t g-1 ~ t g within a group distribution range; the group distance of each group is calculated: the group of the data values of the group of the gth group is calculated according to the following formula (1) From R g ( T ): Where g is the g-th group, x min and x max are the minimum and maximum data values of the data set; and the ratio of the number of data in each group to the total number of data sets is calculated: according to the following formula (2) Calculate the ratio of the number of pixel data in the g-th group to the total number of data sets P g ( T ): Wherein, n-g, i is the g-th group, the value of X g, the number of data i, X g, the g i is the i-th group within small data values; calculating in each group of the groups the mean and standard deviation: (3) and (4) calculating the average M g and M Mean standard deviation Std g (T), wherein the g-th group of data values within each group according to the following formula g : Standards within the g-th group data value difference Std g (T) of: Calculate the intra-group dispersion values within each group : Calculate the intra-group dispersion values of each group one by one, and the dispersion values in the g- th group are as follows: Determine a set of optimal thresholds: Calculate an optimal threshold T * according to the following formula (5): Wherein, the specified parameters r 1 and r 2 are two given constant values, which describe parameters of the relationship between R g , P g , and Std g , and the specified parameters are based on the genetic algorithm and The image with the approximate image type is trained to select the partial image according to the data value of each pixel and each pixel coordinate: use the following formula to cut: Where ( i , j ) is the pixel coordinate of the image, I ( i , j ) is the corresponding gray scale value, I′ is the cut image; and the cut image is output.
TW100117904A 2011-05-23 2011-05-23 An effective and weight adjustable image segmentation method and program thereof TWI579798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100117904A TWI579798B (en) 2011-05-23 2011-05-23 An effective and weight adjustable image segmentation method and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100117904A TWI579798B (en) 2011-05-23 2011-05-23 An effective and weight adjustable image segmentation method and program thereof

Publications (2)

Publication Number Publication Date
TW201248543A TW201248543A (en) 2012-12-01
TWI579798B true TWI579798B (en) 2017-04-21

Family

ID=48138765

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100117904A TWI579798B (en) 2011-05-23 2011-05-23 An effective and weight adjustable image segmentation method and program thereof

Country Status (1)

Country Link
TW (1) TWI579798B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201715472A (en) 2015-10-26 2017-05-01 原相科技股份有限公司 Image segmentation determining method, gesture determining method, image sensing system and gesture determining system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6141433A (en) * 1997-06-19 2000-10-31 Ncr Corporation System and method for segmenting image regions from a scene likely to represent particular objects in the scene
US20050031202A1 (en) * 2003-02-28 2005-02-10 Vittorio Accomazzi Image region segmentation system and method
TW201005673A (en) * 2008-07-18 2010-02-01 Ind Tech Res Inst Example-based two-dimensional to three-dimensional image conversion method, computer readable medium therefor, and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6141433A (en) * 1997-06-19 2000-10-31 Ncr Corporation System and method for segmenting image regions from a scene likely to represent particular objects in the scene
US20050031202A1 (en) * 2003-02-28 2005-02-10 Vittorio Accomazzi Image region segmentation system and method
TW201005673A (en) * 2008-07-18 2010-02-01 Ind Tech Res Inst Example-based two-dimensional to three-dimensional image conversion method, computer readable medium therefor, and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Meng-Hsiun Tsai, "An Adaptable Threshold Decision Method", 2009 Fifth International Conference on Information Assurance and Security, 2009, pp 45-48. *

Also Published As

Publication number Publication date
TW201248543A (en) 2012-12-01

Similar Documents

Publication Publication Date Title
CN110232383B (en) Focus image recognition method and focus image recognition system based on deep learning model
WO2020182036A1 (en) Image processing method and apparatus, server, and storage medium
Wallner et al. Clinical evaluation of semi-automatic open-source algorithmic software segmentation of the mandibular bone: Practical feasibility and assessment of a new course of action
WO2018070285A1 (en) Image processing device and image processing method
Ikhsan et al. An analysis of x-ray image enhancement methods for vertebral bone segmentation
US10813614B2 (en) Systems and methods for automated analysis of heterotopic ossification in 3D images
Kashyap et al. Energy-based active contour method for image segmentation
CN105405105B (en) Display grey scale curve for breast molybdenum target image corrects system and method
CN110246580B (en) Cranial image analysis method and system based on neural network and random forest
US11615508B2 (en) Systems and methods for consistent presentation of medical images using deep neural networks
CN107680110B (en) Inner ear three-dimensional level set segmentation method based on statistical shape model
CN104346799B (en) The extracting method of spinal cord in a kind of CT images
WO2022088729A1 (en) Point positioning method and related apparatus, and device, medium and computer program
JP2012522303A (en) Automatic contrast enhancement method for contour formation
Mussi et al. A novel ear elements segmentation algorithm on depth map images
Chen et al. Detection of various dental conditions on dental panoramic radiography using Faster R-CNN
CN113869443A (en) Jaw bone density classification method, system and medium based on deep learning
Subashini et al. Brain tumour detection using Pulse coupled neural network (PCNN) and back propagation network
CN111723836A (en) Image similarity calculation method and device, electronic equipment and storage medium
US20230419492A1 (en) Method and apparatus for providing information associated with immune phenotypes for pathology slide image
TWI579798B (en) An effective and weight adjustable image segmentation method and program thereof
CN114757953B (en) Medical ultrasonic image recognition method, equipment and storage medium
US9378549B2 (en) Estimation of confidence limits for measurements derived from image data
Andersen et al. Automated calculation of cochlear implant electrode insertion parameters in clinical cone-beam CT
JP6745633B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees