0% found this document useful (0 votes)
22 views

Real Time Object Detection and Measurement

In these days, real-time object detection and dimensioning of objects is an important issue from many areas ofindustry. This is a vital topic of computer vision problems. This study presents an enhanced technique for detecting objects and computing their measurements in real time from video streams. We suggested an object measurement and Detection technique for real-time video by utilizing Open CV libraries and includes the canny edge detection, dilation, and erosion algorithms.

Uploaded by

SMARTX BRAINS
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)
22 views

Real Time Object Detection and Measurement

In these days, real-time object detection and dimensioning of objects is an important issue from many areas ofindustry. This is a vital topic of computer vision problems. This study presents an enhanced technique for detecting objects and computing their measurements in real time from video streams. We suggested an object measurement and Detection technique for real-time video by utilizing Open CV libraries and includes the canny edge detection, dilation, and erosion algorithms.

Uploaded by

SMARTX BRAINS
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/ 6

Journal Publication of International Research for Engineering and Management (JOIREM)

Volume: 10 Issue: 04 | may-2023

Real Time Object Detection And Measurement


Gayatri Pagar1 Lubdha Shelke2 Bhushan Nemade3 Jigar Shinde4

Prof. Dr A. A Bhadre

Department of Computer Engineering Brahma Valley College of engineering anjaneri nashik,

---------------------------------------------------------------------***---------------------------------------------------------------------
ABSTRACT – a. The execution of this procedure has a high
computation rate and it is dependent on the resolution
In these days, real-time object detection and of frames. The achievement of identifying objects and
dimensioning of objects is an important issue from separate these objects from the background is perfect
[1-4]. To calculate the size of each object, firstly we
many areas of industry. This is a vital topic of computer
need to determine the reference object. After that, the
vision problems. This study presents an enhanced dimensions of the reference objects will be used to
technique for detecting objects and computing their calculate the size of other objects. We calibrate the
measurements in real time from video streams. We camera according to the reference Object. The
suggested an object measurement and Detection reference object always is the left-most object in the
image. Also, to calibrate your pixels per metric
technique for real-time video by utilizing Open CV variable, the reference object can be utilized and from
libraries and includes the canny edge detection, there calculate the size of other objects in all frames
dilation, and erosion algorithms. The suggested [5]. Completely computational procedures are
technique comprises of four stages: (1) identifying an assessed through a operating system using a running
object to be measured by using canny edge detection with a frequency of 1.3 GHz [6-10]. Every processes
utilize the libraries of Open CV [11]. We have found
algorithm, (2) using morphological operators includes various papers attached to a measurement system.
dilation and erosion algorithm to close gaps between Each measurement applications are utilized for various
edges, (3) find and sort contours, (4) measuring the purposes. Real-Time Object Measurement” is a
dimensions of objects. In the implementation of the program that can be used to detect real-time object’s
proposed technique, we designed a system that used dimensions. There are not many real-time object
measurement models and this prototype can be used
Open CV software library. 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 images. Some advantages of using
Key Words: Object Detection, Object Dimension this methodology are that it is very useful in the
Measurement, Computer Vision, Open CV, Canny industrial field, it simplifies human work, and many
more which are noted below in the advantages and
Edge Detection.
disadvantages section. To calculate the size of each
object, the prerequisite is that we need to determine the
reference object. In this case, it is, plain white paper.
After that, the dimension of the objects inside the
reference are measured or it will be calculated and
1. INTRODUCTION hence the size of the object is displayed
Real-time object detection and measurement systems I. PROPOSED METHODOLOGY FOR REAL TIME OBJECT
are very vital tasks in the industrial process. Object DETECTION AND MEASUREMENT
detection is often used in product quality stages in the The system consists of two parts which are object
industry. The proposed system can be applied to an detection and object measurement. In the first part,
industrial quality control system. Likewise, it can be laptop camera used to achieve the frames. In the
utilized for various industrial systems or for security second part, computer vision module will be applied
purposes. Generally, it is identifying objects in public to the captured frames to determine the objects, then,
area and measure dimensions of each of them. The we will measure each object. The detected object of
competence of the proposed system has been the current frame immediately will be processed to
confirmed through utilizing real videos that taken from extract dimensions of objects. In the proposed system,

© 2023, JOIREM www.joirem.com| | Page 1


Journal Publication of International Research for Engineering and Management (JOIREM)

Volume: 10 Issue: 04 | may-2023

firstly, we need to preprocess our image. The camera In the compute gradient stage, we detect the edge
will capture a frame and the frame will convert to gradient and direction for each pixel. For The define
grayscale to increase quickness and accuracy. Objects the gradient at every pixel of smoothened frame, Sobel
are detected via canny edge detector algorithm. It is operator utilized.
used to detect only one object or multiple objects. By
A complete scan of frame will be done afterward
the help of canny edge detector, the converted image
receiving gradient magnitude and direction, to
will be processed. The canny edge algorithm scans the
eliminate any undesirable pixels which might not
entire image. After that, execute dilation and erosion
establish the edge. In this stage, just local maxima must
algorithm to close holes among edges in the edge
be considered as edges through applying Non-
frame [16-18]. Figure 1, shows that the flow chart for
maximum suppression. Non-maximum suppression
the recommended system.
exchanges the smoothed edges in the frame of the
gradient magnitudes to sharp edges. Non-maximum
suppression is carried out to keep every local
maximum in the gradient picture, and removing the
whole thing else. Figure 4, shows that the frame after
apply non-maximum suppression.
The final stage of canny edge detector algorithm is
hysteresis thresholding. This stage selects which are
every edges are surely edges and which aren’t edges.
The two threshold values are empirically selected and
their definition will upon on the content of a given
frame. This is achieved via choosing big and small
threshold values. If Edge pixels stronger than the big
threshold, it is marked such as sturdy. Strong edges
will be measured as the last edges. Also, edge pixel
will be suppressed If an edge pixels weaker than the
small threshold, and it is marked as weak edge if an
edge pixel among the big and small thresholds.
To obtain the better result and more accurate object
detection, the canny edge detection procedure has
Figure 2, shows the input frame that used for canny
been improved with some Morphological operations
edge detection. First stage in canny edge detector
algorithm is delete the noise in the frames by applying [19]. These procedures are commonly a combination
a Gaussian filter. The frame after converting to gray of nonlinear procedures performed relatively on the
scale and apply Gaussian filter is appeared in Figure 3 preparation of pixels without changing their numeral
values. Erosion and dilation are the keys for
morphological operations.
Figure 2. Input frame
In this study, a morphological process is performed
such as a mixture of dilation and erosion. The opening
is the initial procedure in which erosion is followed
through dilation. Closing is the second operation in
which dilation is followed through erosion. As a
mixture of these processes we are capable to acquire
superior determination for discovery edges in-depth
frame. Figure 5 shows that the frame after applying
erosion and dilation operation.

Figure 3. Grayscale and Smoothed input frame

© 2023, JOIREM www.joirem.com| | Page 2


Journal Publication of International Research for Engineering and Management (JOIREM)

Volume: 10 Issue: 04 | may-2023

To briefly summarize object measurement, after edge


detection and close any gaps between edges, we detect
contours by using an Open CV function that is
cv2.findContours to find the shapes of the objects in
the edge map. We arrange contours from left to right.
The reference object in the frame is permanently the
left one. By depending to the reference object, we
calibrate the camera and set the value of parameter.
Next, we scan every contours, begin looping above
Figure 4. Input frame apply non-maximum suppression. every individual contours. After that, the rectangle
The final stage of canny edge detector algorithm is around objects will be drawn in green. So, the points of
hysteresis thresholding. This stage selects which are the bounding box rectangle will draw in a small purple
every edges are surely edges and which aren’t edges. rounds. After that, we can get midpoints because the
The two threshold values are empirically selected and bounding box is ordered. Finally, we calculate pixels
their definition will upon on the content of a given Per Metric variable through dependence on reference
frame. This is achieved via choosing big and small object. The height-distance in pixels will put on hD
threshold values. If Edge pixels stronger than the big (height) variable and width distance will put on wD
threshold, it is marked such as sturdy. Strong edges (width) variable. Then, we calculated the Euclidean
will be measured as the last edges. Also, edge pixel distance among sets of center points.
will be suppressed If an edge pixels weaker than the
small threshold, and it is marked as weak edge if an
edge pixel among the big and small thresholds. To RESULTS EXPERIMENTAL:
obtain the better result and more accurate object
detection, the canny edge detection procedure has We proposed the system to measure objects in a real
been improved with some Morphological operations time video and pictures. We prepared a few
[19]. These procedures are commonly a combination experimental setups to test the correctness of the
of nonlinear procedures performed relatively on the
proposed method. The implement the proposed system
preparation of pixels without changing their numeral
values. Erosion and dilation are the keys for has made by the help of Python language. Figure. Show
morphological operations. that the setup of the prepared system. Except the
In this study, a morphological process is performed hardware formation, the software’s required has
such as a mixture of dilation and erosion. The opening installed.
is the initial procedure in which erosion is followed
through dilation. Closing is the second operation in For the experiment the camera has been effectively
which dilation is followed through erosion. As a capturing the pictures. The proposed system applies
mixture of these processes we are capable to acquire four operations such as record frames, find edges, find
superior determination for discovery edges in-depth objects, and measure size for each objects. When we
frame. Figure 5 shows that the frame after applying run the application, the output screen displays on the
erosion and dilation operation. PC screen as appear in figure 6.

Figure 5. Input frame after apply dilation & erosion operation

© 2023, JOIREM www.joirem.com| | Page 3


Journal Publication of International Research for Engineering and Management (JOIREM)

Volume: 10 Issue: 04 | may-2023

TABLE I. ACCURACY OBJECT MEASUREMENT


FOR ONE FRAME

Figure 6. Display output on the screen

Figure 7, illustrates the object detection and Nevertheless, not every results are perfect, since this
measurements. The size of each object in the frame is due to the seeing angle and lens deformation. By
which are calculated. calibrate the camera and set good width parameter,
accuracy will be increase.
In the second experiment, we set the camera above the
objects. Figure 7, shows that the results of the object
detection and measurement for another objects. And
the Table II, demonstrations the accuracy values
among actual measure andsystem measure.

TABLE II. ACCURACY OBJECT MEASUREMENT


WHEN CAMERA ABOVE THE OBJECTS

The result for error column displays very low errors.


The error rate is especially smaller when camera above
the objects.

In the first experiment we measured size of objects


such as white glasses, orange cup, bottle, potatoes.
Table I Shows the accuracy of proposed object
measurement system for these objects. Abbreviations
in the table are as follows; AM-H: Actual Measure-
Height, PM-H: Proposed Measure-Height, AM-W:
Actual Measure-Width, PM-W: Proposed Measure-
Width.

© 2023, JOIREM www.joirem.com| | Page 4


Journal Publication of International Research for Engineering and Management (JOIREM)

Volume: 10 Issue: 04 | may-2023

CONCLUSION: REFERENCES:

In this study, an powerful real time object measurement [1] Muthukrishnan.R and M.Radha “Edge
method is proposed for industrial systems. In the
offered system, Computer Vision used to detect and Detection Techniques for image Segmentation”
measure objects. The system can detect and measure International Journal of Computer Science &
objects in a real time video. After the object has been
detected by using canny edge detector, the size is Information Technology (IJCSIT) Vol3, No 6, Dec
obtained for each object by using Open CV functions. 2011. [2]Geng Xing, Chen ken, Hu Xiaoguang
We enhanced the canny edge detector algorithm
through utilizing Morphological operations. This “An improved Canny edge detection algorithm for
procedure benefits to eliminate extra noises.
color image” IEEE TRANSATION, 2012 978-1-
Furthermore, whereas eliminating the extra noises it
likewise smoothens the shape and keeps the outline and 4673-0311-8/12/$31.00 ©2012 IEEE.
size of each object. Thus, the outlines of the different
objects in the scene were kept.
[2] Chen.W, Yue.H, Wang.J, Wu.X. An improved
edge detection algorithm for depth map in
FUTURE SCOPE:
painting. Optics and Lasers in Engineering 2014;

Machines are used in every part of human life. 55: 69–77.


Machines work according to us but in today’s world,
we work according to machines. The rush to soar high [3] Moeslund T. Canny Edge detection. Denmark:
is immense. Hence, machines are important and so are
Laboratory of Computer Vision and Media
the parts of them. If the parts do not fit well a machine
cannot work properly. The dimensions of the objects Technology,AalborgUniversity.〈http://www.cvmt.
sure make a great impact. This AI ML based project
dk/education/teaching/f09/VGIS8/AIP/canny_09gr
will help in measuring the dimensions in real-time. It
is convenient and easy to use. It also gives accuracy 820.pdf〉 [March 2009] Open CV,
and assurance of the manufactured product. As it is a
one-time investment it surely has a great future scope. 2016.http://opencv.org/.[Accessed December 23,
The object recognition system can be applied in the 2016].
area of surveillance system, face recognition, fault
detection, character recognition etc. The objective of [5] Aydin and N. A. Othman, "A new IoT combined
this thesis is to develop an object recognition system
to recognize the 2D and 3D objects in the image. The face detection of people by using computer vision
performance of the object recognition system depends for security application," 2017 International
on the features used and the classifier employed for
recognition. In this thesis, an effort has been made to Artificial Intelligence and Data Processing
develop an algorithm to provide the base for future Symposium (IDAP), Malatya, 2017, pp. 1-6.
applications such as listed below. In this research
work, the object Identification and Visual Tracking
has been done through the use of ordinary camera. The [6] N. A. Othman and I. Aydin, "A new IoT
concept is well extendable in applications like combined body detection of people by using
Intelligent Robots, Automatic Guided Vehicles,
Enhancement of Security Systems to detect the computer vision for security application," 2017 9th
suspicious behavior along with detection of weapons, International Conference on Computational
identify the suspicious movements of enemies on
boarders with the help of night vision cameras and Intelligence and Communication Networks.
many such applications.
[7]A.J. Lipton, H. Fujiyoshi and R.S. Patil
discussed an algorithm based on frame
differencing [8]. The algorithm has no

© 2023, JOIREM www.joirem.com| | Page 5


Journal Publication of International Research for Engineering and Management (JOIREM)

Volume: 10 Issue: 04 | may-2023

complexities and is fairly accurate for objects that


do not change size or color etc. However the error
between two frames grows exponentially
throughout the video sequences.

[8]A.J. Lipton, H. Fujiyoshi and R.S. Patil


discussed an algorithm based on frame
differencing [8]. The algorithm has no
complexities and is fairly accurate for objects that
do not change size or color etc However the error
between two frames grows exponentially
throughout the video sequences.

[9] Owensa, Hunterb and Eric [9] proposed an


algorithm that tracks moving objects based on
morphological char- acteristics. This algorithm
provides the solution of object merging while
tracking multiple objects however the object
recognition through morphological methods is a
bit complex process and is repeated continuously
[9]

[10] Carlo Tomasi, Takeo Kanade [10] proposed


one simple object tracking method which
minimizes the sum of squared intensities between
two consecutive frames. This method is
computationally fast and robust in nature and is
recommended for the real time object tracking.

© 2023, JOIREM www.joirem.com| | Page 6

You might also like