Geri Dön

Gerçek zaman uygulamaları için görüntü bölütleme yöntemlerinin geliştirilmesi

Improvement of image segmentation methods for real time applications

  1. Tez No: 553322
  2. Yazar: YUNUS KOÇ
  3. Danışmanlar: PROF. DR. TAMER ÖLMEZ
  4. Tez Türü: Yüksek Lisans
  5. Konular: Elektrik ve Elektronik Mühendisliği, Electrical and Electronics Engineering
  6. Anahtar Kelimeler: Belirtilmemiş.
  7. Yıl: 2019
  8. Dil: Türkçe
  9. Üniversite: İstanbul Teknik Üniversitesi
  10. Enstitü: Fen Bilimleri Enstitüsü
  11. Ana Bilim Dalı: Elektronik ve Haberleşme Mühendisliği Ana Bilim Dalı
  12. Bilim Dalı: Telekomünikasyon Mühendisliği Bilim Dalı
  13. Sayfa Sayısı: 111

Özet

Gerçek zamanlı sistemlerde görüntü bölütleme, akıllı ev ve araç sistemlerinden, eğitim alanına, tıbbi uygulamalardan askeri teknolojilere kadar uzanan çok geniş bir uygulama alanına sahiptir. Literatürde çeşitli alanlarda kullanılmak üzere öne çıkan, herhangi bir eğitim seti ve karmaşık algoritmalar gerektirmeden görüntü üzerinden öğrenme ve bölütleme yapabilen piksel tabanlı birçok yöntem mevcuttur. Bu anlamda gözetimsiz yöntemler içerisinde Bulanık C-Ortalamalar (FCM) ve K-Ortalamalar (KM) algoritmaları oldukça sık kullanılan yöntemler olarak öne çıkmaktadır. Ancak bilinen FCM ve KM algoritmaları; gürültü, ışık/gölge etkileri, dokusal özellikler vb. etkenlerden dolayı görüntü içerisindeki pikselleri sınıflandırmakta bazen yetersiz kalmakta ve gerçek zaman kriterlerine uygun olmayacak derecede yavaş çalışabilmektedir. Özellikle gerçek zamanda kamera vb. optik algılayıcılarla alınan görüntülerde bu gibi bozucu etkilere çok sık rastlanıldığından algoritmaların hem kendi içerisndeki işleyişinin geliştirilmesi hem de görüntüler üzerinde bazı ön işleme yöntemlerinin kullanılması ihtiyacı doğmaktadır. Bu sebeple mevcut çalışmada FCM ve KM algortmaları kullanılarak daha doğru bölütlemenin gerçek zaman kriterleri içerisinde yapılabilmesi için ilk aşama olarak görüntü ön işleme yöntemleri ele alınmıştır. Bu kapsamda algoritma içerisindeki piksel yükünü azaltmak için çözünürlük azaltma yöntemleri; en yakın komşuluk, bilineer ve bikübik interpolasyon yöntemleri kapsamında incelenmiştir. Üç yöntem de gerek işlem süresi gerekse de orjinal çözünürlüğe göre bilgiyi mümkün olduğunca muhafaza edebilmesi açısından gözlemlenmiş ve bikübik interpolasyon yönteminin bu ölçütler açısından avantajlı olduğu görülmüştür. Çözünürlüğün azaltılmasıyla birlikte hem sonraki ön işleme adımları için hem de bizzat FCM ve KM algoritmaları için piksel bazında işlem kazancı sağlanmış ve sistemin hızı artırılmıştır. İkinci ön işleme adımı olarak ışık ve gölge etkilerinin giderilmesi kapsamında uyarlamalı eşikleme ve gama doğrulama yöntemleri incelenmiştir. Literatürde birçok uyarlamalı eşikleme yöntemine yer verilse de bu çalışmada sık kullanılan Otsu, Niblack, Sauvola, Wellner ve İntegral eşikleme methodları incelenmiştir. Daha sonra örnek görüntüler üzerinden bu yöntemlerin ışık/gölge etkileri altındaki performansları ve işlem süreleri gözlemlenmiştir. Elde edilen sonuçlara göre integral yöntemi diğerlerine göre nispeten daha üstün çıkmıştır. bu sebeple integral eşikleme yöntemi, gri seviye görüntülerin siyah ve beyaz olmak üzere ikili seviyede bölütlenmesini gerektiren temel uygulamalar doğrultusunda kullanılabilir. Ancak gerçek zamanlı görüntü işleme sistemlerinde renk bilgisi birçok uygulama alanı için göz ardı edilemediğinden mevcut yöntemler bu çalışmada kullanılmamış, renk bilgisinin de korunarak ışık ve gölge etkilerinin bastırıldığı gama doğrulama yöntemi esas alınmıştır. Gama doğrulama yönteminde piksellerin renk tonundaki değişimlerin modellendiği gama fonksiyonu kullanılmaktadır. Bu fonksiyon yardımıyla ışık etkisinde kalmış ve açık renkli görünen pikseller ile gölge etkisi altındaki kapalı tonda bulunan pikseller arasında bir ilişki kurularak görüntü bazında bir ortalama değere göre gama değerleri dengelenmektedir. Başka bir deyişle açık tonlar nispeten daha kapalı hale gelmekte, kapalı tondaki pikseller de daha fazla aydınlatılmaktadır. Böylelikle bozucu etkiler altındaki dokular açığa çıkartılarak bölütlemenin daha doğru yapılmasına katkı sağlanmıştır. Bir sonraki görüntü ön işleme adımı oarak gürültü giderme ve görüntü monotonlaştırma yöntemleri incelenmiş, ele alınan yöntemler, kenar korunumlu ve kenar korunumlu olmayan yöntemler olmak üzere iki ayrı gurupta incelenmiştir. Kenar korunumlu olmayan yöntemler çalışmada referans olarak kullanılmamakla birlikte Gauss filtresi ve kayan pencere ortalamsı kapsamında irdelenmiştir. Her iki yöntem de görüntüde gürültüyü bastırma ve dokusal renk saçılmalarını giderme anlamında doku ya da nesnelere ilişkin kenar/sınır bölgelerini koruyamadığından görüntünün genelinde bulanıklılık algısı oluşturmaktadır. Ayrıca kenar bölgelerinin korunmaması, detayların kaybolmasına ve bölütleme doğruluğunun azalmasına yol açmaktadır. Bu sorunun önüne geçilebilmesi için kenar korunumlu yöntemler irdelenmiş ve bu konu dahilinde bölgesel benzerlik, süperpiksel ve bilateral filtre yöntemleri incelendiğinde gürültüler bastırılırken, dokuların kendi içerisinde çok daha tekdüze hale geldiği, doku içerisindeki renk farklılıklarının giderildiği ve bunun yanında kenar bölgelerinin de önemli ölçüde korunduğu görülmüştür. Elbette ki işlem süreleri ve görüntü monotonlaştırma açısından üç yöntemin birbirlerine göre üstün ve zayıf yönlerinin olduğu da anlaşılmıştır. Bu anlamda MATLAB benzetimlerine göre, bölgesel benzerlik yönteminde işlem hızı diğerlerine göre daha düşük iken, süperpiksel yönteminin nispeten daha hızlı olduğu görülmüş ancak kenar bölgelerinin korunması açısından performansı zayıf kalmıştır. Bilateral filtre ise üç yöntem içerisinde çok daha öne çıkmış ancak mevcut işlem süresinin gerçek zaman sistemler için çok yüksek olduğu gözlemlenmiştir. Bu sebeple, bilateral filte yöntemi, hem işlem hızının artırılması hem de gömülü Linux sistemlere uyumlu hale getirilmesi amacıyla PYTHON/OpenCV kütüphanesi üzerinden tekrar gerçeklenmiş ve mevcut durumda 90 Fps işlem hızlarına kadar ulaşıldığı görülmüştür. Bununla birlikte RGB renk uzayından CIELab renk uzayına geçilmesiyle mevcut bilateral filtre yönteminin görüntü monotonlaştırma performansı da artırılmıştır. Tüm bu ön işleme adımları ile artık görüntüler FCM ve KM algoritmalarında bölütlenmeye daha elverişli hale getirilmiştir. Bununla birlikte, FCM ve KM algoritmaları özelinde de bazı önemli geliştirmeler yapılmıştır. Bunlardan ilki, görüntülerin matris formundan vektör formuna dönüştürülerek işlenmesidir. Bu sayede özellikle FCM algoritmasındaki üyelik matrisi hesabı önemli ölçüde sadeleştiğinden ve işlemciler için vektör işlemleri matris işlemlerine göre çok daha kolay ve hızlı yapıldığından her iki algoritmanın işlem hızı, matris tabanlı çalışan türlerine göre yaklaşık 5-7 kat artmıştır. Ayrıca başlangıç sınıf değerlerine bağlı olarak FCM ve KM algoritmalarının sınıflandırma performansı ve işlem süresi değiştiğinden, başlangıç sınıf değerlerinin ideal değerlere yakın olarak belirlenmesi konusu da yine çalışma kapsamında irdelenmiştir. Mevcut FCM ve KM algoritmalarında rastgele olarak belirlenen başlangıç sınıf değerleri, bu çalışmada sıralı bölünme yöntemiyle özel bir kurala göre belirlenerek bölütlemenin daha doğru, daha kararlı ve daha hızlı yapılması sağlanmıştır. Son olarak, hem FCM hem de KM algoritması için algoritmaların işlem yükünün azaltılmasına yönelik görüntü verilerinde piksel indirgeme işlemi yapılmış ve mevcut algoritmalara uyarlanmıştır. Bu yöntemde aslında görüntü içerisinde aynı değere sahip pikseller tek bir piksel olarak temsil edilmiş ve bu temsili pikseller üzerinden sınıflandırma yapılmıştır. Bu sayede özellikle ön işleme adımlarında gürültüden arınmış ve monotonlaşmış görüntüler için aynı yoğunluk değerine sahip piksellerin sayısı arttığından indirgenme oranı da artmış ve verinin büyüklüğü o nispette azalmıştır. Yapılan benzetimler sonucunda, görüntüler piksel bazında %88'lere varan oranlarda sadeleştirilebilmiş ve algoritmaların işlem yükü önemli ölçüde azaltılmıştır. Sonuç olarak mevcut FCM ve KM yöntemleri, gerek görüntü ön işleme adımlarıyla gerekse de algoritma özelinde yapılan iyileştirmelerle desteklenerek geliştirilmiş, PYTHON dili kullanılarak da gerçek zamanlı gömülü Linux sistemlere uyumlu çalışabilecek şekilde gerçeklenmiştir. İleriki çalışmalar için ise, görüntü ön işleme aşamasında kullanılan filtrelere ilişkin parametrelerin görüntü istatistiklerine ya da farklı özniteliklerine göre kendiliğinden belirlendiği bir sistem öngörülmektedir.

Özet (Çeviri)

Image segmentation in real time systems has variety of application areas range from smart home appliances, vehicle systems and educational tools to biomedical applications and military technologies. There are a number of unsupervised methods in literature which stand out for such kind of areas, capable of learning from test images and making segmentation without requiring any training set and complex algorithm structures. In this case, Fuzzy C-Means (FCM) and K-Means (KM) algorithms are commonly used methods for image segmentation applications. However, both traditional FCM and KM algorithms may become insufficient while dealing with pixel based segmentation under the noise, illumination/shadow effects and texture complexity conditions; furthermore, the algorithms may run too slow for real time embedded image processing systems. The corruptive effects on image and the number of pixels caused by high resolution make the image segmentation process much more challenging and bring about computational cost on the embedded systems. Especially the images taken from optical camera, laser scanners and infrared imaging sensors naturally and frequently consist of these drawbacks. Hence, it is needed to make some enhancement for both segmentation accuracy and computational cost point of view while considering real time limitations. At this point, some pre-processing techniques which are covered to include; decreasing of resolution, illumination/shadow compensation, noise cancellation with image smoothing are taken into consideration in this study at first. Three major resolution decreasing methods which are nearest neighborhood, bilineer and bicubic interpoation methods are examined. It is obviously seen that, each methods have some advantages and disadvantages when compared to each other for different resolution rate. For example, nearest neighborhood method is observed as fastest one and more immune to higher resolution rates as well. Nonetheless, bicubic interpolation method is much better in terms of preserving fine details and texture monotony characteristics. Each methods are also shows similar processing time performance at lower resolution rates. Thus, the bicubic interpolation is determined as optimum resolution decreasing method in terms of its contribution on segmentation accuracy and available processing speed. Bicubic interpolation method gets the segmentation process to run faster by means of reducing computational cost of further pre-processing techniques with FCM and KM algorithms as well. After that, illumination and shadow compensation techniques are derived so as to diminish light reflections on images. In this study, the methods are considered in two groups which are adaptive thresholding methods and gamma correction method. In adaptive thresholding methods, the gray scale images are processed as locally by means of intensity based statistics or globally by using histogram features. Otsu method is commonly used thresholding method using global histogram features, but the method is actually can not achieve satisfactory results on sharp illumination or shadow variations. Niblack, Sauvola, Wellner and Integral are other adaptive thresholding methods included in this study which perform local processing. Among these methods, especially Integral thresholding comparatively shows better response and reveal the textures more effectively under the severe shadow/illumination conditions. Unfortunately, all adaptive methods in this study deal with gray scale images and the gray scale processing results in information loss come through with color features. Hence, gamma correction method is investigated in order to compensate shadow and illumination conditions while preserving color information. By the way, the concept of gamma is derived as a function of relationship between light or dark pixels by using conformal mapping. After that, the gamma values are balanced by referencing mean value of total image intensity. In other word, the RGB (Red Green Blue) color values in lighter pixels are decreased while those of darker ones are increased up to mean value. Accordingly, it is clearly seen that shadows and illuminations are disappeared at a certain rate by arranging some control parameters. The final pre-processing step is noise reduction and image smoothing providing much more smoothed textures. In this case, edge preserving and non-edge preserving smoothing methods are introduced in this study. Firstly the researches related to the color space analysis are observed and general results show that CIELab color space has much more monotonous intensity distribution compared to RGB space. Accordingly, all filters are designed and performed on both RGB and CIELab so as to demonstrate color space advantages on smoothing. After that, gaussian and mean of sliding window are evaluated in processing time point of view at first glance. The results show that each filter has approximately same and appropriate computational time; however, the filters do not behave as edge selective and generally lead to blur effects on image. That's why, the fine details of objects or textures are disappeared, each clusters structures in image becomes distorted and then the segmentation error always goes up. On this issue, edge preserving smoothing techniques are examined and derived in three groups like local similarity measurement, superpixel, and bilateral filter methods. In local similarity measure, the filter uses spatial and intensity features of pixels by using region of interest approach to determine filter coefficients. The coefficients are reshaped by intensity based distance calculations (gradients) and spatial distances. The gradients of pixels in same texture are generally low values as expected and the spatial distances are also has some clue about relation between center and its neighbor pixels through the sliding window over the image. When the filter window coincides to the texture part, smoothing characteristics of coefficients become more dominant. If the sliding rectangular window reaches edge regions, the gradient values are dramatically changes to high values and the coefficients turn to passive in smoothing point of view. In this manner, each clusters or textures in image are smoothed in itself while edges or boundaries are left as much close as to original forms. Nevertheless, MATLAB simulations illustrate that, local similarity measure is slowest method among the three edge preserving methods because of its high computational complexity. The superpixel algorithm is another edge preserving smoothing method that is actually faster method compared to local similarity measure. The method has different approach to smooth the texture while preserving edges by using superpixel concept which means a pixel group showing similar properties. In this method each pixels are considered as a vector containing CIELab color components and pixel spatial coordinates. After that, all image are presented as“K”amount of superpixels in which center pixel is determine either its own intensity or neighbor intensities by calculating the special combination of euclidean and spatial distance of pixels in superpixel region. The mean value of iteratively converging pixel intensities is represented as the main intensity of superpixel. In this approach, the edge parts actually equal to boundaries between the superpixels. Thus, while the concide pixels in superpixel region is become equal and smoothed, the edge parts of image are preserved with some tolerance depend on number of superpixels. The more superpixels are determined to represent total image, the better edge preserving performance are obtained; however, the smoothing performance also decreases at that rate. The final and more striking edge preserving smoothing method in this study is bilateral filtering which is a special form of gaussian filtering that changes its response according to pixels whether they are in edge region or not. Actually bilateral filter coefficients are determined as exponentially by euclidean distance of intensities and spatial distribution of pixels. In this method, central pixels are compared to its neighbor pixels along the specified sliding window. If the euclidean distances are equal or near at a certain rate while spatial distance is also close between center and neighbor pixels, then the filter decides that the pixels belongs to same class and the region should be smoothed severely. If the sliding window encounters edge part, the variance of pixels naturally seen as high values and the filter reduce smoothing degree and keeps the region as much sharp as possible. The filter smoothing function is also controlled by some parameters defined by manually. The computational cost of bilateral filter is approximately same as local similaritiy measure method and the MATLAB simulations show that while edge preserving performance is good enough, the processing time is not sufficient for real time limitation. On this issue, the method is implemented again by using PYTHON/OpenCV library with its effective and simple coding structure. The PYTHON implementation shows that the processing time is dramaticaly reduced and the system reaches 90 Fps processing rates. The implementation also enhance the current study to operate in real time embedded Linux systems. In this study, the system is also supported by algorithm based enhancement on pre-processing and improvement on FCM and KM algorithms as well. One of these improvements is vectorization of multidimensional matrix data such as mxnxk dimentional color images or mxnxc dimentional fuzzy membership matrix in FCM algorithm. It is generally known that the processors have more difficulty to handle memory allocation or to perform some complex filtering process, even make some basic mathematical computations while dealing with matrix data compared to vector data. Thus, the images taken from camera as a matrix form are turned to vector structure. According to MATLAB simulation, the vectorization method raised the system operating speed up to 5-7 times more. The another algorithm based improvement is initial cluster center determination for FCM and KM algorithms. It is very significant to define initial cluster centers as much close as ideal ones. In traditional FCM and KM algorithms, initial cluster centers are calculated as randomly that's why, the algorithm may not converge the true centers, segmentation error increases and the algorithm may require much more iterations. Thus, a novel method called as ordering split is adapted to both algorithms. In this method, both FCM and KM algorithms are initialized with more appropriate cluster centers and the algorithms run more robust with less iterations which means that more reliable and faster algorithms are obtained. The final algorithm based improvement is making pixel vise reduction on image. In this technique, the pixels having same intensity values are regarded as one pixel by using histogram data of image. Accordingly the more efficient smoothing is applied, the more pixel reduction is achieved in this method. The simulation results show that the images are shrinked based on pixel number up to %88 and the system computational cost is effectively reduced thanks to pre-processing steps. As a conclusion, traditional FCM and KM algorithms are improved by performing both pre-processing techniques and algorithm based enhancements. The system is also implemented on PYTHON to overcame the drawbacks of pre-processing techniques and ensure availability to embedded Linux systems. It is also possible to express that this study may enhanced by making some control parameters of pre-processing steps adaptively adjustable according to dramatically changing conditions of real time images as a future work.

Benzer Tezler

  1. Radiküler kist ve granülomların dijital histogram analizi ile ayırdedilmesi

    Differention of radicular cyst and granulomas with digital histogram analysis

    ÜLKEM AYDIN

    Doktora

    Türkçe

    Türkçe

    1998

    Diş HekimliğiGazi Üniversitesi

    Diş Hastalıkları ve Tedavisi Ana Bilim Dalı

    PROF. DR. TAYFUN ALAÇAM

  2. Prediction of COVID 19 disease using chest X-ray images based on deep learning

    Derin öğrenmeye dayalı göğüs röntgen görüntüleri kullanarak COVID 19 hastalığının tahmini

    ISMAEL ABDULLAH MOHAMMED AL-RAWE

    Yüksek Lisans

    İngilizce

    İngilizce

    2024

    Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve KontrolGazi Üniversitesi

    Bilgisayar Mühendisliği Ana Bilim Dalı

    PROF. DR. ADEM TEKEREK

  3. Görüntüdeki nesneleri çevreleme yöntemleri

    Surrounds methods of image objects

    SARA ALTUN

    Yüksek Lisans

    Türkçe

    Türkçe

    2017

    Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrolİnönü Üniversitesi

    Bilgisayar Mühendisliği Ana Bilim Dalı

    DOÇ. DR. MUHAMMED FATİH TALU

  4. Manipulation of visually recognized objects using deep learning

    Görsel tanınan nesnelerin derin öğrenme kullanarak hareket ettirilmesi

    ERTUĞRUL BAYRAKTAR

    Doktora

    İngilizce

    İngilizce

    2018

    Mekatronik Mühendisliğiİstanbul Teknik Üniversitesi

    Mekatronik Mühendisliği Ana Bilim Dalı

    DOÇ. DR. PINAR BOYRAZ