University of Oulu

Esineiden mittaaminen älypuhelimella

Saved in:
Author: Jyrkkä, Joonas1; Mustaniemi, Janne1; Ristimella, Eemeli1
Organizations: 1University of Oulu, Faculty of Information Technology and Electrical Engineering, Department of Computer Science and Engineering, Computer Science
Format: ebook
Version: published version
Access: open
Online Access: PDF Full Text (PDF, 1.8 MB)
Persistent link: http://urn.fi/URN:NBN:fi:oulu-201707082714
Language: Finnish
Published: Oulu : J. Jyrkkä; J. Mustaniemi; E. Ristimella, 2017
Publish Date: 2019-04-03
Thesis type: Bachelor's thesis
Thesis subtype: Kurssisuoritus
Description:

Tiivistelmä

Tämä työ esittelee ohjelmistoratkaisun esineiden mittaamiseen Android-älypuhelimelle. Mittaaminen tapahtuu kameran kuvaa hyödyntäen vertaamalla mitattavia kohteita referenssiesinein, jonka mitat tunnetaan. Mitattavat kohteet ja oleelliset mitat täydennetään kameranäkymään. Sovelluksen kannalta tärkeimmät prosessit ovat referenssiesineen ja mitattavan esineen tunnistaminen.

Referenssiesineen tunnistus tapahtuu värin perusteella. Aluksi kuva muutetaan harmaasävykuvaksi, minkä jälkeen sovelletaan Cannyn algoritmia reunojen tunnistamiseen. Syntyvä binäärikuva käsitellään dilaatio-operaatioilla, jonka jälkeen hyödynnetään OpenCV-kirjaston findContours-metodia, joka etsii kuvasta suljetut alueet (contours). Löytyneiden alueiden joukkoa karsitaan värisävyn perusteella.

Mitattavan esineen tunnistusprosessi alkaa myös harmaasävymuunnoksella, josta syntyvä kuva kynnystetään binäärikuvaksi. Syntyneeseen binäärikuvaan sovelletaan findContours-metodia ja löytyneet alueet suodatetaan pinta-alan mukaan.

Sovelluksesta toteutettiin kaksi versiota, jotka molemmat testattiin ennalta määritellyillä testipattereilla. Testien perusteella näyttää siltä, että sovellus toimii hyvin tasaisissa valaistusolosuhteissa, mutta kuvioitu pinta ja haastava valaistus saattavat hankaloittaa tunnistamista. Ongelmia syntyy myös referenssiesineen ja mitattavan esineen ollessa toistensa päällä ja silloin, kun mitattava esine ei erotu tarpeeksi hyvin taustasta.

Measuring objects with a smartphone

Abstract

This bachelor’s thesis presents an Android-based solution to measure ubiquitous objects. The measurement process is executed by comparing measurable objects to a known reference object. The measures of the object will be added on top of camera feed. The crucial processes of the application are detecting the reference object and the measurable object.

The detection of the reference object is achieved on the basis of color information. The process starts with converting the camera feed to grayscale, and then applying Canny’s edge detection algorithm. The resulting binary image is dilated, and the contours of the image are detected using findCountours-method from OpenCV-library. The detected contour areas are filtered by color and size.

The detection of a measurable object begins also with grayscale-transform followed by binary thresholding. FindContours-method is applied to the resulting binary image, and the areas detected are filtered by size.

Two versions of the application were implemented, and they both were tested with predefined test suites. According to the tests, it seems the application succeeds to carry out the measurement process. However, there is still work to be done to enhance the detection rate especially in a challenging lightning environment and on patterned surfaces.

see all

Note: Kandidaatintyö. Tekijä: Eemeli Ristimella. Kurssisuoritus tekijöille Janne Mustaniemi ja Joonas Jyrkkä.
Bachelor's thesis by Eemeli Ristimella. Completion of the course accredited to Janne Mustaniemi and Joonas Jyrkkä.
Subjects:
Copyright information: © Joonas Jyrkkä; Janne Mustaniemi; Eemeli Ristimella, 2017. This publication is copyrighted. You may download, display and print it for your own personal use. Commercial use is prohibited.