Journals / Bitlis Eren Üniversitesi Fen Bilimleri Dergisi / 2020 / Cilt: 9 - Sayı: 3

Real-Time Processing of the Image Taken from the Camera on the CNC Machine

Kameradan Alınan Görüntünün CNC Tezgâhında Gerçek Zamanlı Olarak İşlenmesi

Pages
1251–1263
DOI
—

Abstract

The aim of this study is to plot the image with the CNC (Computer Numeric Control) co-ordinated support, which is a common practice in the industry. The movement commands loaded on to the device are performed automatically on the device. The aim of this work is to combine the areas of use of image processing and the working areas of programmable machines in order to create useful work. The image is obtained from the camera and the necessary information obtained as a result of individual operations. To this end, a black-and-white (binary) picture was developed by adding a specific limit value to the picture, and the skeleton inferences were achieved and the coordinate values of the picture were acquired. In this study, the skeleton function was used for skeleton extraction in the Matlab program and the boundary was determined by the coordinate values. It is essential to transform the acquired coordinate values to' g code' in order to transform them to CNC movement commands. This phase has been finished with the Matlab program. The g code output file is transferred to the CNC with the help of the USB memory, and the image is drowned plotted in the x-y plane by removing the chips as desired. As a result, the aim of this study is to conduct the machining of the CNC machine as required by calculating the picture coordinates drawn from the camera. The Matlab program was used at the image processing stage and the Siemens Sinumerik CNC machine was used to write the machined picture as requested. The machining was carriedout without mistake as a consequence of the assessment experiments carried out on the prototype device. In comparisons and assessments, it is found that theoretical findings and practical outcomes are in great agreement.

Özet

Bu çalışmada endüstride yaygın olarak kullanılan bilgisayar destekli sayısal kontrolöre (CNC (Computer NumerikControl)) koordinat desteği ile görüntünün ölçekli olarak çizdirilmesi hedeflenmiştir. Bilgisayar ortamında alınangörüntünün görsel olarak benzetiminden sonra elde edilen iskelet yörünge koordinatları, CNC hareket yörüngekomutlarına dönüştürülmekte ve CNC ünitesine yüklenen hareket komutları makinede otomatik olarakişlenmektedir. Bu çalışma sayesinde görüntü işlemenin kullanım alanları ile programlanabilir makinelerin çalışmaalanları birleştirilerek, yararlı bir çalışma oluşturulması amaçlanmıştır. Görüntünün kameradan alınarak, üzerindebelirli işlemlerin uygulanılması sonucunda, kullanılacak gerekli bilgiler alınmıştır. Bunun için sırasıyla alınangörüntüye belirli bir eşik değeri uygulanarak siyah beyaz (binary) bir görüntü oluşturulmuş ve iskelet çıkarımlarıyapılarak görüntünün koordinat değerleri elde edilmiştir. Bu çalışmada, iskelet çıkarımı için Matlab programındagörüntünün iskeletini oluşturma (skeleton) fonksiyonundan yararlanılmış, koordinat değerleri ise sınır çıkarmafonksiyonları ile (bwboundaries) belirlenmiştir. Elde edilen koordinat değerlerini CNC’de hareket komutunadönüştürebilmek için 'g kod' una dönüştürmek gerekmektedir. Bu işlem basamağı Matlab programı kullanılarakgerçekleştirilmiştir. g kodu çıktı dosyası USB bellek yardımı ile CNC’ye aktarılarak x-y düzleminde görüntüyüistenen şekilde talaş kaldırarak çizdirilmiştir. Sonuç olarak bu çalışmada, kameradan alınan görüntününkoordinatlarının hesaplanması sayesinde istenen şekilde CNC tezgah tarafından işlemenin yapılmasıamaçlanmıştır. Görüntü işleme aşamasında Matlab programı kullanılmış, işlenen görüntüyü istenen şekilde talaşkaldırarak çizdirebilmek için Siemens’in Sinumerik CNC tezgâhı kullanılmıştır. Prototip makinedegerçekleştirilen işleme çıktıları üzerinde yapılan ölçüm testleri sonucunda işlemenin orijinal resme uygun hatasızbir şekilde gerçekleştiği gözlenmiştir. Yapılan karşılaştırma ve değerlendirmelerde teorik sonuçlarla pratiksonuçların büyük oranda örtüştüğü sonucuna varılmıştır.