Geri Dön

Yürüyen robotlar için bir çift kamera ile elde edilen görüntülerden cisimlerin konum bilgilerinin elde edilmesi

The position determination of the objects from images taken by a pair of camera for walking robots

  1. Tez No: 397938
  2. Yazar: CAFER SİNAN KATI
  3. Danışmanlar: PROF. DR. HİKMET KOCABAŞ
  4. Tez Türü: Yüksek Lisans
  5. Konular: Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol, Makine Mühendisliği, Computer Engineering and Computer Science and Control, Mechanical Engineering
  6. Anahtar Kelimeler: Belirtilmemiş.
  7. Yıl: 2015
  8. Dil: Türkçe
  9. Üniversite: İstanbul Teknik Üniversitesi
  10. Enstitü: Fen Bilimleri Enstitüsü
  11. Ana Bilim Dalı: Makine Mühendisliği Ana Bilim Dalı
  12. Bilim Dalı: Konstrüksiyon Bilim Dalı
  13. Sayfa Sayısı: 75

Özet

Otomatik çalışan ve hareket kabiliyeti olan bir sistemde etraftaki cisimlerin algılanması kaçınılmaz bir gereksinimdir. Mesafe sensörleriyle bu bir nebze yapılabilse de robotlar gibi karar mekanizmalarına sahip olması gereken sistemler için yeterli olmamaktadır. Bu tarz sistemlerin bir lineer doğrultuda bulunan cisimlerin tespitinden çok bulunulan çevreyi görebilmeleri, bu çevredeki cisimleri algılayıp konumlarını tespit edebilmeleri gerekmektedir ki insan kontrolü olmadan hareket edebilme yeteneğine sahip olsun. Bu tarz bir gereksinim için de dijital kameralar oldukça uygundur. Ancak dijital kameralar ile alınan iki boyutlu görüntüler kendi başlarına cisimlerin konumlarının algılanmasında yeterli olmamaktadır. Konum tespitinde önemli olan derinlik bilgisinin elde edilebilmesidir. İki boyutlu görüntülerden derinlik bilgisinin elde edilebilmesi için günümüz teknolojisinde birçok çalışma yapılmış ve çeşitli yöntemler geliştirilmiştir. Genel prensip öncelikle cisimlerin kenarlarının tespit edilmesidir. Kenar tespiti görüntülerin yapısal özelliklerini bozmadan işlenilen data miktarını büyük ölçüde azaltmakta ve kullanılmayan bilgileri filtrelemektedir. Bu sebeplerden ötürü cisimlerin tespiti ve derinlik bilgisinin elde edilmesi için kenar tespiti en önemli işlemlerden birisidir. Bu önemli proses için çeşitli algoritmalar oluşturulmuştur. Sobel, Prewitt, Roberts, Canny bu algoritmalardan bazılarıdır. Kenar belirleme algoritmaları gradyan ve laplasyan olmak üzere iki temel kategoride incelenebilir. Gradyan metodunda görüntüden gelen sinyal fonksiyonlarının birinci türevindeki minimum ve maksimum noktalarına bakarak kenar belirlemesi yapılır. Laplasyan metodunda ise fonksiyonun ikinci türevinde sıfırdan geçişe bakılarak kenar tespiti yapılır. İnsan görme sisteminde sağ göz ve sol göz manzarayı farklı açılardan görmektedir ve bu görüntüler beyinde birleştirilerek derinlik bilgisi elde edilir. Bu tekniklerden yola çıkarak, iki kamera belirli bir aralıkta yerleştirilerek anlık olarak bir manzaranın iki farklı açıdan görüntüsü elde edilir. Oluşan görüntüler üst üste konulduğunda manzaranın aynı noktaları aynı kare içerisinde farklı konumlarda olacaktır. Bunun sebebi de iki kameranın manzarayı farklı açılardan görüntülemesidir. İşte aynı iki noktanın birbirlerine olan mesafesi tespit edilerek derinlik bilgisi hesap edilebilir. Görüntü işlemede kullanmak amacıyla C++ programlama dilinde oluşturulmuş açık kaynak kodlu kütüphaneler mevcuttur. Bu kütüphanelerin başında da Intel Rusya tarafından geliştirilen OpenCV gelmektedir. OpenCV kütüphanesi görüntü işleme üzerine çok geniş araştırmalar sonucu optimize edilmiş kodlar içermektedir ve bunları yeni yazılımların geliştirilmesi amacıyla ücretsiz olarak insanların kullanımına açmaktadır. OpenCV kütüphanesinin stereo görüntüleme araştırmalarına ağırlıklı olarak kullanılan temel bileşenleri CV ve HighGUI bileşenleridir. CV bileşeni stereo görüntü işlemede kullanılan tüm bilgisayarlı görüntüleme algoritmalarına sahiptir. HighGUI ise okuma, yazma, görüntüleme amacıyla ve parametre ayarlamak amacıyla kullanılan ayar çubuklarını oluşturmak üzere kullanılmaktadır. Uzaklık tespiti için C++'ta geliştirilen yazılımda OpenCV kütüphanesinden faydalanılmıştır. Kameralardan gelen görüntüleri doğru şekilde işleyebilmek için kameraların kalibre edilmesi gerekmektedir. Pratikte, kamera referansına göre üç boyutlu koordinatları bilinen her obje kalibrasyon targeti olarak kullanılabilir. Ancak bu çalışmada, yaygın olarak kullanılan dama tahtası tercih edilmiştir. Kamera kalibrasyon metodu olarak ise Heikkila ve Silven'in geliştirdiği metot kullanılmıştır. Bu metot Bougeuet tarafından bir MATLAB yazılımı haline getirilmiştir. Stereo görüntü çiftlerin rektifikasyonu, bu görüntülerin biçimsel bozulmasını gidererek görüntülerdeki eş piksellerin aynı çizgi üzerinde yerleşmesi sağlanır. Daha teknik ifade etmek gerekirse aşağıda görülen epipolar çizgilerin eş doğrusal olması sağlanır. Korelasyon işleminde sağ ve sol kameradan alınan düzeltilmiş görüntüler kullanarak, bu görüntülerdeki aynı noktalar eşleştirilir. Kameradan olan uzaklığı tespit etmek için ise, görüntülerdeki aynı noktanın lokasyonunun kayması anlamına gelen“disparity”bilgisinin elde edilmesi gerekmektedir. Blok eşleştirme tekniği, korelasyonu hesaplamak ve disparity bilgisini elde etmek için kullanılan algoritma türlerinden birisidir. Bu algoritmada mutlak uzaklıkların toplamı (MUT) pencereleri kullanılarak uyumluluk bulunur. MUT pencereleri, görüntüdeki her bir piksele çevresindeki komşularını da göz önünde bulundurarak bir skorlama metodu kullanır. OpenCV'de blok eşleştirme tekniği için; ön filtreleme, uyumluluk ve son filtreleme olmak üzere üç adım uygulanır. Bu işlemler sırasında sol ve sağ görüntüler normalize edilerek aynı ışık seviyelerinin elde edilmesi sağlanır. Sağ görüntüde aranan kısımdaki en düşük skora sahip piksel en iyi eşleşme olarak öngörülür. Bu piksel ile sol görüntüdeki orijinal piksel arasındaki fark disparity değeri olarak alınır ve bu değer ile derinlik bilgisi hesaplanır Tez kapsamında uzaklık tespiti için kurulan sistem donanımları bir çift kamera ve dizüstü bilgisayardır. Kameralar bilgisayara“Evrensel Seri Veriyolu”ile bağlanmıştır. Kameraların aynı anda çalışması ve işletilmesiyle alakalı tüm yazılım C++ dilinde Visual Studio programı yardımıyla derlenmiştir. Bu sistem ile kenar tespiti başarı ile yapılmış ve geliştirilen yazılım ile uzaklık tespiti gerçekleştirilmiştir. Ancak daha doğru ölçümler için kameraların kalibrasyonun yapılması gerekmektedir ve bu çalışma ilerleyen safhalarda yapılacaktır

Özet (Çeviri)

In the mobile machines such as robots or vehicles, it is unavoidable that to have a detection system that give the ability of detection of objects around and prevent the crash of the machine. Especially the ones which have no human control there must also be a desicion making mechanism additional to detection systems. In these kind of systems where there is no human control the importance of the detection system increases. They must see the objects not only in a linear direction but also a wide angle so that they can move without supervision of a human. In this requirement, cameras are good solutions because they have enough angle of vision which is close to a human eye. However, cameras have a 2D vision and it is not possible to get the depth information directly. To get the depth information from a 2D vision lots of studies conducted in recent years. The main principal in getting depth information from 2D views is firstly deceting the edges. By detecting edges it is possible to process very less data and reduce unnecessary information without deforming the structural properties of the image. Therefore it is one of the most important steps to detect objects and get depth information. There are many ways to perform edge detection, however, the majority of the different methods may be grouped by“gradient based edge detection”and“laplacian based edge detection”. In the gradient method, the edge detection is done by looking for the minimum and maximum points of the first derivative of the signal coming from the image. In the laplacian method, it is looked for the zero crossing in the second derivative of the function. In the human vision system, the left and right eye see the view from different angles, and these images are somehow processed in the brain which lets us to get the depth information. By using two cameras which are fixed on the same line and have a constant distance between them, it is possible to simulate human vision. The problem is to simulate what the brain does. This thesis aim to solve this problem by developing a source code which can process the images and get the depth information. To achieve this, firstly the images are converted to mathematical model, than the images are put in to the same frame. The distance between the same pixels on different images is detected. Than, by using the stereo vision geometry, the deth information is calculated. In this study, C++ programming language is used to process the images. Also there are some libraries which are specially developed for image processing, in C++. OpenCV is one of the most popular open source library which is developed by Intel Russia. OpenCV is a library which is develop by comprehensive studies and includes optimized codes for image processing and these codes are free and open for everyone to develop new software for image processing. CV and HighGUI are the main components of OpenCV which are widely used. CV has all computer vision algortithms which are used in image processing. HighGUI is used for reading, writing and screening and also to create slide bars to set parameters. To process the images correctly, the cameras have to be calibrated. Practically, any object can be used as a calibration target as long as the coordinates of the target are known in reference to the camera. However in this study chessboard is used which is one of the most popular one. After getting the images from calibrated cameras, rectification process is done. The rectification of the image pairs is putting the corresponding pixels in the same line. More formally, epipolar lines becomes collinear afte rectification. Rectification is commonly performed to improve the speed of the search for stereo correspondences. Given two cameras where the intrinsic parameters are known, the images undistorted, and the image planes have been rectified, the cameras can be calibrated so that the rotation and translation of one camera is known with respect to the other. These relations are found in the rotation matrix and the translation vector. The rotation matrix contains parameters that rotate the left camera so that its image plane is mathematically coplanar with the right camera. The translation vector relates the positioning, or offset, of the left camera with respect to the right camera. The correlation process, in which the depth information is calculated, follows the rectification. In this process, rectified images are used to match the points from one image to the other. In order to determine the distance from the camera, the disparity needs to be found which is the change in location of points in the left image to the right. It follows that there must be an overlap in the two images so that a point in the left image also exist in the right image and a correspondence can be found. An algorithm that can be used to compute correlation and find disparities is a block matching technique where sum of absolute distances (SAD) windows are used to find correspondences. SAD windows are used as a scoring method for each pixel in the image based on its surrounding neighbors. There are three steps to the block matching technique that OpenCV uses; prefiltering, correspondence search, and post filtering. In prefiltering step, the left and right images are normalized by a filter. In the correspondence search step, the matcing points in the image pairs are found. The point in the right image within the search area with the lowest score is considered the best match for the point in the left image. The offset of this point from the original point in the left image is taken as the disparity for that correspondence and from that information the depth is computed. Points with large disparity values represent points that are closer to the camera and smaller disparities represent points that are farther away from the camera. Post filtering is done to remove correspondences that are considered false matches. For this, OpenCV uses a uniqueness ratio as well as a texture threshold. The uniqueness ratio is used to make sure that the value that was calculated for the matched point is not just the closest score, but is an outlier score where it is surrounded by scores that are far from being a match. The texture threshold is set so that noise can be reduced during the matching process, not score that is below the texture threshold is considered. In this study, in order to determine the distance, a laptop and two cameras are used as hardwares. Cameras are connected to laptop by USB ports. The operation of two cameras at the same time and all image processing codes are created in Visual Studio and C++ programming language. The code accepts two images and a calibration data file as arguments. The calibration file was created using the Matlab toolkit during the calibration phase. The application is set up to process the images automatically and then display the distance. A slide bar window was created so that various parameters dealing with the correlation process can be adjusted. With the code developed distance determination is done however the calibration of the camera will be improved to get better result.

Benzer Tezler

  1. Linear inverted pendulum model and swing leg dynamics in biped robot walking trajectory generation

    Doğrusal ters sarkaç modeli ve iki bacaklı yürüyen robotlarda yörünge elde edilmesinde salınan bacak dinamiği

    UTKU SEVEN

    Yüksek Lisans

    İngilizce

    İngilizce

    2007

    Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve KontrolSabancı Üniversitesi

    Elektronik Mühendisliği ve Bilgisayar Bilimi Ana Bilim Dalı

    YRD. DOÇ. DR. KEMALETTİN ERBATUR

  2. İnsansı robotların tüm vücut kinematik ve dinamik modellenmesi ve kontrolü

    Whole body kinematic and dynamic model and control of humanoid robots

    EMRE SARIYILDIZ

    Doktora

    Türkçe

    Türkçe

    2016

    Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrolİstanbul Teknik Üniversitesi

    Kontrol ve Otomasyon Mühendisliği Ana Bilim Dalı

    PROF. DR. HAKAN TEMELTAŞ

  3. Joint friction estimation and slip prediction of biped walking robots

    İki bacaklı yürüyen robotlar için eklem sürtünmesi ve ayak kayma tahmini

    IYAD F.I. HASHLAMON

    Doktora

    İngilizce

    İngilizce

    2014

    Mekatronik MühendisliğiSabancı Üniversitesi

    Mühendislik Bilimleri Ana Bilim Dalı

    Assoc. Prof. Dr. KEMALETTİN ERBATUR

  4. Reflex based walking pattern adaptation for biped robots

    İki ayaklı robotlar için refleks tabanlı yürüyüş şekli uyarlaması

    YASSER EL-KAHLOUT

    Yüksek Lisans

    İngilizce

    İngilizce

    2003

    Elektrik ve Elektronik MühendisliğiSabancı Üniversitesi

    YRD. DOÇ. DR. KEMALETTİN ERBATUR

    YRD. DOÇ. DR. GÖKHAN GÖKTUĞ

  5. Yürüyen robotların kinematik ve dinamik modellerinin modüler yaklaşım ile elde edilmesi

    Kinematical and dynamical modeling of walking robots using modular approach

    SÜLEYMAN BARAN HEPGÜVEN

    Yüksek Lisans

    Türkçe

    Türkçe

    2016

    Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrolİstanbul Teknik Üniversitesi

    Kontrol ve Otomasyon Mühendisliği Ana Bilim Dalı

    PROF. DR. HAKAN TEMELTAŞ