0% found this document useful (0 votes)
1K views

Real Time Object Measurement

Uploaded by

Thong Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

Real Time Object Measurement

Uploaded by

Thong Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

ISSN 2321 3361 © 2021 IJESC

Research Article Volume 11 Issue No. 02

Real Time Object Measurement


Shweta Pardeshi1, Pranali Pawar2, Nikhil Raj3
B. Tech, Computer Science Engineering1, 2, 3
MIT ADT University, MIT School of Engineering, India

Abstract:
In these days of the 4th industrial revolution, real-time object detection and dimensioning is an important aspect from an
industrial point of view. These are requisite topics of computer vision problems. This study presents an augmented technique for
detecting objects and computing their real-time measurements from an IoT video device such as a webcam. We have suggested an
object measurement technique in real-time using AI and IoT technologies like OpenCV libraries and webcam respectively.
OpenCV includes many libraries and algorithms that are used in this project. The technique has four stages: (1) capturing image
(2) object measurement process (3) save output (4) displaying output.

Keywords: Object dimension measurement, OpenCV, computer vision, Webcam, NumPy

I. INTRODUCTION  It has accuracy.


 Fewer chances of human error.
“Real-Time Object Measurement” is a program that can be  It will save money on instruments that we normally
used to detect real-time object’s dimensions. There are not use to take measurements.
many real-time object measurement models and this prototype  It is easy to use and will save time and effort.
can be used enormously further. This is an essential topic of
computer vision problems. As stated, this project presents a
technique for computing the measurements in real-time from IV. PLATFORM OR TECHNOLOGY USED:
images. To explain it’s working it basically uses a webcam
and a white paper background to detect the object. After PyCharm
detecting the object, it displays its dimensions in specified
measuring units at real time. In the implementation of the  It is an IDE (integrated development environment)
proposed technique, we designed a system that used OpenCV specifically used for the python language.
software library.  PyCharm is easy to use. It supports OpenCV and all
its libraries once dependencies are installed.
Some advantages of using this methodology are that it is very
 Supports all frameworks.
useful in the industrial field, it simplifies human work, and
many more which are noted below in the advantages and
OpenCV
disadvantages section. To calculate the size of each object, the
prerequisite is that we need to determine the reference object.
 It is an open-source library used in computer vision,
In this case, it is, plain white paper. After that, the dimensions
machine learning, image processing.
of the objects inside the reference are measured or it will be
 There are various applications and functionality of
calculated and hence the size of the object is displayed.
OpenCV which makes it versatile.
II. ADVANTAGES AND DISADVANTAGES
NumPy
Advantages:
• It reduces man error and increases proficiency.  It is a python library. It is basically used to do
mathematical operations and it is easy to work with
• It can be used easily. arrays.
• Less error is directly proportional to more profit.  It is easy to use and gives excellent results. It can
• Not expensive that is it is low cost only a webcam is perform great mathematical operations.
required.
Disadvantages: IOT Device-Webcam
 Saving output.
The output given does not get backed up in any  A device with various applications. Webcam with a
record hence there is a need for a backing system. mid-level pixel reading ability is perfect. Device
driver software needs to be installed and should work
III. FEATURES OF PROJECT well for the program to be executed.

 It is a more convenient way to take measurements.


 Easy implementation
 Has a better future scope.

IJESC, February 2021 27616 http:// ijesc.org/


V. BLOCK DIAGRAM AND FLOWCHART  Hence settings are done. Writing the code to measure
the image.
 Writing a python file (utlis.py ) to find the contours
and apply processes, as code, to the image input to
find the real-time object measurement.

Fig 01. Block diagram

The block diagram represents the basic working of the project


or system.

Fig 03. Canny image after applying dilation & erosion


operation

 Create a canny image of the input image. Apply


dilation and erosion features so that the process of
creating a canny image is smooth.
 Writing code to find the constraint of the white paper
which is a rectangle.
 Applying filter as a rectangle as the background white
paper is rectangle. Finalizing the countors and
appending the length and area. Hence specifying the
detection of the white paper.
 Applying mathematical concepts and with the help of
a canny image measure the object placed on the white
paper.
 Applying an arrowed line and put text to display the
estimated measurement of the object.

VI. EXPERIMENTAL RESULTS AND ANALYSIS


Fig 02. Flowchart

The flowchart display shows how the program works.

Steps of designing the proposed model:

 Download the dependencies OpenCV and Numpy in


IDE PyCharm. Import Open Cv as cv2 and numpy as
np.
 Write a Flag or a piece of code such that it lets the
webcam on or off. ( “webcam = False”). Capture the
video. Set parameters Width, Height, and Parameters.
 Code of all the settings required.

webcam=True
path='1.jpeg' Fig. 04 Experimental Screenshot
cap=cv2.VideoCapture(0)
cap.set(10,160) In Fig. 04 the screenshot is taken while performing it live
cap.set(3,1920) and the screen appears to be as such. The dimensions of
cap.set(4,1080) the objects are recognized and are shown in units cm. the
scale=3 right side is the live video frame of the object.
wP=210*scale
hP=297*scale

IJESC, February 2021 27617 http:// ijesc.org/


assurance of the manufactured product. As it is a one-time
investment it surely has a great future scope.

VIII. REFERENCES
1] Muthukrishnan.R and M.Radha “Edge Detection
Techniques for image Segmentation” International Journal of
Computer Science & Information Technology (IJCSIT) Vol3,
No 6, Dec 2011.

[2] Geng Xing, Chen ken, Hu Xiaoguang “An improved


Canny edge detection algorithm for color image” IEEE
TRANSATION, 2012 978-1- 4673-0311-8/12/$31.00 ©2012
IEEE.

[3] Chen.W, Yue.H, Wang.J, Wu.X. An improved edge


Fig. 05 Before Measuring detection algorithm for depth map in painting. Optics and
Lasers in Engineering 2014;55: 69–77.
As displayed in Fig. 05 the system captures the image as such
and then performs object measurement. [4] Moeslund T. Canny Edge detection. Denmark: Laboratory
of Computer Vision and Media Technology, Aalborg
University. 〈http://www.cvmt.dk/
education/teaching/f09/VGIS8/AIP/canny_09gr820.pdf〉
[March 2009].

[5] OpenCV, 2016. http://opencv.org/. [Accessed December


23, 2016].

[6] AnEmbeddedReal-
TimeObjectDetectionandMeasurementofitsSize.pdf

[7] Mengel, P., & Wertheimer, R. (2007). D52.300.1 camera


requirements and specifications. User Cams project
deliverable. Retrieved from http://www.prevent-
ip.org/en/public documents/deliverables/d523001 usercams
general specifications.htm from http://www.dl-
Fig. 06 Dimensioned object c.com/Temp/downloads/Whitepapers/Basics.pdf

After calculating the measurements it displays specifically the [8] Modrow, D., Laloni, C., Doemens, G., & Rigoll, G.
length and the breadth of the two-dimensional object. Check (2007). 3d face scanning systems based on invisible infrared
Fig. 06. coded light. Advances in Visual Computing, 521-530.

VII. CONCLUSION AND FUTURE SCOPE [9] Nedev, S., & Ivanova, V.C. (2006). Web camera as a
measuring tool in the undergraduate physics laboratory.
Conclusion:
As a result of this system, many improvements can be made to European Journal of Physics 27, 1213.
the industrial sector. The project successfully measures the
dimensions of the object in real-time. Hence the computer [10] Oggier, T., Kaufmann, R., Lehmann, M., Buttgen, B.,
vision (webcam device and code) is used to measure the Neukom, S., Richter, M., Schweizer, M., Metzler, P.,
dimensions in real-time. It captures the image from the real- Lustenberger, F., & Blanc, N. (2005). Novel pixel architecture
time video frame and then displays its dimensions. A Canny with inherent background suppression for 3 D time-of-flight
edge detector is successfully used to detect the dimensions. imaging, Proc. SPIE, pp. 1-8.
This technique works fast and has many advantages and
salient features that can be implemented in the real world. [11] Rahi, M.F. (2010). Driver circuit construction using
visible semiconductor laser for distance measuremen. Al-
Future Scope: Mustansiriyah University, College of Science, Dep. Physics.
Machines are used in every part of human life. Machines work
according to us but in today’s world, we work according to [12] Sachs, J. (1996). Digital image basics. Digital Light &
machines. The rush to soar high is immense. Hence, machines Color. Retrieved from http://www.dl-
are important and so are the parts of them. If the parts do not c.com/Temp/downloads/Whitepapers/Basics.pdf
fit well a machine cannot work properly. The dimensions of
the objects sure make a great impact. This AI IOT based [13]https://www.researchgate.net/publication/330728646_An
project will help in measuring the dimensions in real-time. It is _Embedded_Real-
convenient and easy to use. It also gives accuracy and Time_Object_Detection_and_Measurement_of_its_Siz

IJESC, February 2021 27618 http:// ijesc.org/

You might also like