Saturday, August 8, 2015

Metadata Extraction for Calculating Object Perimeter in Images

The objective of this paper is to present the results of a class developed with routines in Java language, and contribution of OpenCV library, for analysis and extraction of metadata from images. To evaluate the developed class, three different figures were produced in cardstock and their perimeters were measured with a millimeter ruler. Then these figures were scanned for further image analysis with aid of the developed class. The images of the figures were initially saved in BMP format. After it, each of the images in BMP format were saved in JPG and PNG file formats resulting, at the end, on nine images. The validation of the correct extraction of the image metadata and so the perimeter value of the object was performed by comparing the values obtained by direct measurement perimeter of the figure, with a millimeter ruler, and the values obtained with digital image processing, counting the contour pixels of the image of the figure, and using the image resolution, one of the extracted metadata. For the edge detection and counting of the contour pixels of object, the algorithms cvFindContours() and cvContourPerimeter(), of OpenCV library, were used. It was obtained, for the worst case, a percentage error of 8.0 %, for images with BMP and PNG format. Therefore, the developed class presents satisfactory results and is recommended to extract and calculate measures of an object present in the image.  [+] Full Paper