Кіріспе
Компьютерлік көру және бейне өңдеуде Нобуюки Оцу (大津展之) атымен аталатын Оцу әдісі автоматты бейне шегін табу үшін қолданылады. Ең қарапайым нұсқасында алгоритм пикселдерді екі классқа – алдыңғы және артқы планға – бөлетін бір ғана интенсивтілік шегін анықтайды. Бұл шек класс ішіндегі интенсивтілік дисперсиясын азайту арқылы, немесе балама түрінде класс аралық дисперсияны барынша арттыру арқылы анықталады. Оцу әдісі – Фишердің дискриминантты талдауының бір өлшемді дискретті аналогы, ол Дженкс оптимизациялау әдісімен байланысты және интенсивтілік гистограммасында жүзеге асырылатын жаһандық оптималды k-ортасына тең. Көп деңгейлі шегін табуға қатысты кеңейтім түпнұсқа мақалада сипатталған.
In computer vision and image processing, Otsu's method, named after Nobuyuki Otsu (大津展之), is used to perform automatic image thresholding. In the simplest form, the algorithm returns a single intensity threshold that separate pixels into two classes, foreground and background. This threshold is determined by minimizing intra class intensity variance, or equivalently, by maximizing inter class variance. Otsu's method is a one dimensional discrete analogue of Fisher's Discriminant Analysis, is related to Jenks optimization method, and is equivalent to a globally optimal k means performed on the intensity histogram. The extension to multi level thresholding was described in the original paper,
Теңгерімсіз суреттер үшін нұсқа
Суреттің сыныптарының сұр деңгейлерін қалыпты үлестірімдер деп қарастыруға болады, бірақ тең емес мөлшерде және/немесе тең емес дисперсияларда, Оцу алгоритмі үшін қажетті шарттар орындалмайды. Киттлер Иллингворт алгоритмі (Минималды қателі шегі деп те аталады) итеративті трикласс шегі алгоритмі – бұл шектеуді айналып өту үшін Оцу әдісінің өзгеруі. Сурет берілген кезде, бірінші итерацияда трикласс шегі алгоритмі Оцу әдісін қолдана отырып шекті есептейді. Алгоритм жоғарыдағы пикселдердің орташа мәнін және төмендегі пикселдердің орташа мәнін есептейді. Содан кейін алгоритм кескінді үш сыныпқа бөліп көрсетеді (сондықтан трикласс деп аталады), жоғарғы орташа мәннен жоғары пикселдер уақытша алдыңғы план класына, ал төменгі орташа мәннен төмен пикселдер уақытша фон класына жатады. Арадағы пикселдер анықталуға тиіс (TBD) аймақ ретінде белгіленеді. Бұл алгоритмнің бірінші итерациясын аяқтайды. Екінші итерация үшін Оцу әдісі жаңа шекті алу үшін ғана TBD аймағына қолданылады. Алгоритм TBD аймағындағы жоғарғы орташа мәннен жоғары пикселдердің орташа мәнін және TBD аймағындағы төменгі орташа мәннен төмен пикселдердің орташа мәнін есептейді. TBD аймағындағы жоғарғы орташа мәннен үлкен пикселдер уақытша алдыңғы планға қосылады, ал TBD аймағындағы төменгі орташа мәннен кіші пикселдер уақытша фонға қосылады. Сол сияқты, барлық арадағы пикселдерді қамтитын жаңа TBD аймағы алынады. Бұл екінші итерацияны аяқтайды. Алгоритм тоқтату критерийіне сәйкес келгенше жаңа TBD аймағын өңдеу үшін келесі итерацияға өтеді. Критерий бойынша, екі тікелей итерациядан есептелген Оцу шектері арасындағы айырмашалық кішкентай саннан кем болса, итерация тоқтатылады. Соңғы итерацияда жоғарғы пикселдер алдыңғы план класына, ал төменгі пикселдер фон класына тағайындалады. Соңында, барлық уақытша алдыңғы план пикселдері біріктіріліп соңғы алдыңғы план құрайды. Барлық уақытша фон пикселдері біріктіріліп соңғы фонды құрайды. Іске асыруда алгоритм итерацияларды тоқтату критерийінен басқа параметрлерді қамтымайды. Оцу әдісін итеративті түрде қолдану және сегментация үшін TBD аймағын біртіндеп қысқарту арқылы алгоритм стандартты Оцу әдісіне қарағанда нашар объектілерді жақсы сақтайтын нәтижеге қол жеткізе алады.
Iterative triclass thresholding algorithm is a variation of the Otsu’s method to circumvent this limitation. Given an image, at the first iteration, the triclass thresholding algorithm calculates a threshold using the Otsu’s method. Based on threshold , the algorithm calculates mean of pixels above and mean of pixels below Then the algorithm tentatively separates the image into three classes (hence the name triclass), with the pixels above the upper mean designated as the temporary foreground class and pixels below the lower mean designated as the temporary background class. Pixels fall between are denoted as a to be determined (TBD) region. This completes the first iteration of the algorithm. For the second iteration, the Otsu’s method is applied to the TBD region only to obtain a new threshold The algorithm then calculates the mean of pixels in the TBD region that are above and the mean of pixels in the TBD region that are below Pixels in the TBD region that are greater than the upper mean are added to the temporary foreground And pixels in the TBD region that are less than the lower mean are added to the temporary background Similarly, a new TBD region is obtained, which contains all the pixels falling between This completes the second iteration. The algorithm then proceeds to the next iteration to process the new TBD region until it meets the stopping criterion. The criterion is that, when the difference between Otsu’s thresholds computed from two consecutive iterations is less than a small number, the iteration shall stop. For the last iteration, pixels above are assigned to the foreground class and pixels below the threshold are assigned to the background class. At the end, all the temporary foreground pixels are combined to constitute the final foreground. All the temporary background pixels are combined to become the final background. In implementation, the algorithm involves no parameter except for the stopping criterion in terminating the iterations. By iteratively applying the Otsu’s method and gradually shrinking the TBD region for segmentation, the algorithm can obtain a result that preserves weak objects better than the standard Otsu’s method does.