887-Article Text-1441-1-10-20220922
887-Article Text-1441-1-10-20220922
ISSN: 2094-0343
2326-9865
Real-Time Object Measurement Using Image Processing
sukeshjiwane30@gmail.com
Introduction
The real-time object measurement system is a program for detecting the dimensions of objects
in real-time. There aren't many real-time object measuring models out there, so this method of
measuring and dimensioning an object in real-time that we've proposed here has a lot of
potentials. This is a critical characteristic of an issue in computer vision. As indicated, this
project depicts a real-time approach for calculating measurements of the objects from images
taken by the user. It identifies the object using a webcam and hovers its dimensions in real-time,
including the area, in the appropriate units of measure. We created a system that uses the
OpenCV software package to implement the proposed technique.
Automated technology relies largely on numerous sensors and cameras, and it also has gained a
lot of traction in recent years. Running robots necessitates far too much automation. It's also
important to figure precisely where an object is, how tall it is, and how wide it is. We learned
how to measure the size of an object using IoT devices like a webcam and OpenCV in this
project.
This system has various benefits, including being highly effective in the industrial field and
simplifying human work.
Recently, much research has been done on this topic, and several researchers have published
their findings.
M. Naveen Kumar et al. presented the OpenCV implementation including Python and
MATLAB. This research makes use of a CUDA-based GPU interface. OpenCV is now available
for Windows, Android, and a variety of other platforms. This study now introduces OpenCV
Robotic methods. [2]
The LiDAR Imaging System, developed by Santiago Royo et al., works in both 2D and 3D
settings. This research looked into the various LiDAR system configurations available for self-
driving automobiles. The development of new imaging techniques, scanners, and detector arrays
is the key strategy.[3]
Zarine Abdelmoghit devised many real-time object detection methods. They used a stereo
camera to accomplish their goal. The distance between two objects is detected and quantified
using this method. [4]
Edge published Detection with Embedded Confidence, in which he elaborated on a core module
in many computer vision operators that compute the heavy measure of the pixels in a frame.
Meer, P., Georgescu, B.: The procedure is stated, in a linear space, emphasizing the importance
of the many subspaces. [5]
A study on updated canny edge, presented by LiSheng Ding, looks over the theory behind the
primitive canny edge thus, improves in location accuracy and has a more perceptible de-noising
effect, according to the trial. [6]
2. Proposed Methodology
The system is primarily based on the use of Canny edge for detecting the edges and contouring
part of an image given as an input, OpenCV for image processing and reading images from the
system via an external webcam, and NumPy for rapidly and accurately formulating
mathematical computations and determining the measurements of the desired objects placed
within the constraints.
The canny edge can precisely locate the edges and the vertices of the object placed within the
periphery of the system. This provides the values for (X1, X2) and (Y1, Y2) respectively which
are then taken as an input for implementing √((X2 – X1)² + (Y2-Y1)²). The system uses this
formula for calculating the length and width of the object which are then used for calculating
the area of the object.
1. Noise reduction
Applying Gaussian blur to the image is one technique to smooth it out and get rid of the noise.
1 (𝒊−(𝒌+𝟏))² + (𝒋−(𝒌+𝟏))²
exp ((− );
2𝜋𝜎² 𝟐𝝈²
1 ≤ i, j ≤ (2k+1)
2. Gradient calculation
The Gradient calculation step analyses the edge strength using the edge-finding algorithms to
calculate image grading.
3. Non-maximum suppression
This approach looks for pixels with the greatest value within the edge directions throughout all
positions on the gradient intensity matrix.
4. Double threshold
The double threshold approach attempts to distinguish between three main types of pixels:
strong, weak, and unrelated.
Unless at least one pixel around the processor is strong, hysteresis converts weak pixels into
solid ones based on the threshold of the results.
3. Procedural Explanation
Further, a flag chunk of code to turn the webcam on or off which will contain a boolean value
either “True” or “False”. "webcam = False," for example. Record the video. Set the Width,
Height, and Parameters.
In PyCharm or any other IDE, download the OpenCV and NumPy requirements. Import
NumPy as np and OpenCV as cv2.
As a result, the settings are complete. Then create the code that will be used for the
measurement of the object in the image.
To obtain real-time object measurement, a python file (utlis.py) recognizes contours and
applies methods to picture input as code.
• Generate a duplicate of the input image. To make the process of creating a canny image
move as smoothly as possible, use dilation and erosion effects.
• The background provided to the system must be a white paper or it is equivalent and
rectangular, the filter being applied should also be a rectangle similar to the white
background.
• After finalizing the right contours with the Canny Edge Detector Algorithm along with the
addition of the length and area to the objects within the resulting output, the white paper
detection is specified.
• The system uses mathematical concepts and an illustration that measures the object that has
been placed on white paper with the help of a mathematical formula and finds out the
measurement of the object.
• It finds out the length, width, and area of the particular object which is present in the image
and afterward denotes it over the image.
• The system uses arrowed lines and text to represent the object's dimensions, which are its
length, width, and area over the image.
On conducting several tests on numerous objects our system was able to achieve an accuracy
of 96.9% which is higher than any other object measurement and detection model previously
developed.
5. Results
After running the system there comes two images as the output, with one being the original and
the other with the measurements and dimensions displayed as an output. The original image is
the image that the user has uploaded to the system. The result of the measurements of the
objects is present below.
6. Conclusion
This method can lead to many developments in various sectors prone to human errors caused
during dimensioning and taking measurements. It depicts the proportions of objects within an
image taken from a live video frame. Using a Canny edge detector, the dimensions are
appropriately identified. This method is easy to use and has a variety of benefits and remarkable
features that can be used in the real world.
7. References:
[1] Erhan D, and C. Szegedy. Scalable object detection using deep neural networks. In
CVPR, 2014 IEEE
[2] R. Girshick, and J. Malik. In CVPR. 2014 IEEE Conference on, pages 580–587. IEEE,
2014.
[3] J. Uijlings, and A. Smeulders. Selective search for object recognition. International
journal of computer vision, 104(2):154–171, 2013.
[4] Hariharan B, Arbelaez P, Girshick G, and J. Malik. Detection and segmentation pages
297–312. Springer, 2014.
[5] J. Yan, Z. Lei, L. Wen, and S. Z. Li. The fastest deformable part model for object
detection. In CVPR, 2014 IEEE Conference on, pages 2497–2504. IEEE, 2014.
[6] C. L. Zitnick and P. Dollar. Edge boxes: In Proceedings of the CVPR pages 391–405.
Springer, 2014.
[7] Navneet B, Rama C, and Larry D. Soft-NMS–improving object detection with one line
of code. In ICCV, pages 5561–5569, 2017.
[8] Zhaowei C and Nuno V. Cascade R-CNN: Delving into high-quality object detection. In
CVPR, pages 6154–6162, 2018.
[9] Jiale C and Xuedong L. Hierarchical shot detector. In Proceedings of the ICCV, 2019.
[10] K. Jeong and H. Moon, “Object Detection Using FAST Corner Detector Based on
Smartphone Platforms”, First ACIS/JNU International Conference on Computers-
Networks Systems and Industrial Engineering (CNSI), pp. 111 - 115, May 2011.