我們所提出來的方法可以簡單分成三個階段:訓練階段、臨界值階段與精練階段。 訓練階段的目的是計算錫膏色彩的平均值。我們利用一個自動找尋臨界值的演算法在臨界值階段中遞迴地去尋找臨界值。在臨界值階段後,我們想得到更加準確的結果,因為錫膏區域不會太大或太小,因此我們使用連接元件分析去消除那些有太多或太少元素數目的元件。我們並計算連接元件與訓練出來的數據的色彩距離,並將此作為是否保留元件的依據。 我們的方法在分割錫膏上是有效的,實驗數據讓我們知道這個方法是快速而且準確率高的。
Our method can be briefly divided into three phases: training phases, thresholding phase, and refining phase. We only have to train once. We do not have to train again until we have different color PCB (Printed Circuit Board) images. Thresholding and refining phases are used to segment every image. The goal of training phase is to calculate the centroid of solder color. In thresholding phase, apply an automatic threshold finding algorithm to find the threshold recursively. After thresholding, we want to obtain better result. Consequently, we use connected component analysis to remove the component with too many or too few elements, because solder area is not too big or too small. Calculate the minimum color distance d from the centroid of solder color to connected component. Our method is effective for solder image segmentation. Experiment data show us this method has high-speed and high-precision.