Object_Detection_in_Images_and_Videos_Using_OpenCV_A_Comparative_Study_of_Deep_Learning_and_Traditional_Computer_Vision_Techniques
Object_Detection_in_Images_and_Videos_Using_OpenCV_A_Comparative_Study_of_Deep_Learning_and_Traditional_Computer_Vision_Techniques
Abstract— Using OpenCV, this research compares the Object detection models using CNNs, such as Faster R-
performance of deep learning with standard computer vision CNN, YOLO, and SSD, have obtained outstanding
approaches for detecting object in photos and videos. performance on these datasets. Considering the success of
CNNs, classical computer vision techniques remain popular
Recognizing and localizing objects inside an image or video due to their ease of application and effectiveness [2]. These
is a fundamental task in computer vision. Convolutional neural techniques are often based on handmade characteristics and
networks, for example, have recently demonstrated greater categorize objects in photos using machine learning
accuracy in object detection trials. Traditional computer vision
algorithm like Random Forests , Support Vector Machine
approaches, such as the Viola-Jones algorithm, remain popular
due to their ease of use and performance. In this work, we use
and. The Viola-Jones technique, for example, detects faces
OpenCV, a famous computer vision toolkit, to compare the using Haar-like characteristics and a cascade classifier.
efficacy of both of these methods. On diverse data sets, we OpenCV is a famous open-source computer vision package
evaluate the precision, speed, and complexity of each strategy which offers a vast category of picture and motion graphic
and provide insights into the strengths and drawbacks of each processing operations and tools [7].
method. This paper offers a complete overview of current
object identification strategies and can assist researchers and
practitioners in selecting the best effective approach for their
individual application.
I. INTRODUCTION
Object detection constitutes one of the most difficult and
important jobs in computer vision. It entails locating and
recognizing things of interest within an image or video feed.
There are numerous uses for object detection, including self-
driving cars, monitoring, image search, and robots.
Traditional computer vision approaches have been used to
handle this problem for decades, but the introduction of deep
learning has resulted in a dramatic shift towards using neural
networks to conduct object detection[1]. Fig. 1. A model detecting various objects inside a video frame
CNNs (Convolutional Neural Networks) are the most
widely used deep learning approach for object detection. In this study, we use OpenCV to compare the efficacy of
CNNs are trained to detect objects by using enormous deep learning with classical computer vision approaches for
collections of labelled images. They have demonstrated object detection in photos and videos. Our main goal is to
outstanding performance on a variety of object detection give a detailed study of the most recent object identification
benchmarks, including COCO, PASCAL VOC, and techniques and to explain the strengths and limits of each
ImageNet. methodology. We assess each technique's speed, precision,
and intricacy on a variety of data sets, including COCO,
142
Authorized licensed use limited to: Universita degli Studi di Napoli Federico II. Downloaded on March 30,2025 at 22:36:11 UTC from IEEE Xplore. Restrictions apply.
2023 10th IEEE Uttar Pradesh Section International Conference on Electrical, Electronics and Computer Engineering (UPCON)
143
Authorized licensed use limited to: Universita degli Studi di Napoli Federico II. Downloaded on March 30,2025 at 22:36:11 UTC from IEEE Xplore. Restrictions apply.
2023 10th IEEE Uttar Pradesh Section International Conference on Electrical, Electronics and Computer Engineering (UPCON)
Fig. 6. Max and min mAP scores on COCO dataset of different extractor REFERENCES
modelt [1] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image
recognition,” in IEEE Conference on Computer Vision and Pattern
SSD MobileNet was the fastest; Faster R-CNN Recognition, Jun 2016, pp. 770–778
Inception Resnet was the slowest. First one was trained [2] S. Ren, K. He, R. Girshick, and J. Sun, “Faster r-cnn: Towards real-
with resolution of 300 whereas the second was trained with time object detection with region proposal networks,” in Advances in
Neural Information Processing Systems 28, 2015, pp. 91–99.
600. Lowest accuracy was achieved by R-FCN MobileNet,
[3] W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. E. Reed, C. Fu, and
and Faster R- CNN Inception Resnet had the highest A. C. Berg, “SSD: single shot multibox detector,” CoRR, 2015.
accuracy. [4] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You only look
Faster R-CNN gives out the most accurate results. It once: Unified, real-time object detection,” in IEEE Conference on
Computer Vision and Pattern Recognition, 2016, pp. 779–788.
also takes a lot of time to do so, about 100 milliseconds per
[5] Redmon, J. (n.d.). YOLO: Real-Time Object Detection.
image. In contrast, SSD and R-FCN models are usually http://pjreddie.com/yolo/
faster which might come at the cost of accuracy of the [6] Wu W, Dasgupta D, Ramirez E, et al. Classification accuracies of
model. The slower more accurate models can be tweaked physical activities using smartphone motion sensors[J]. Journal of
to take less time by varying the number of proposed medical Internet research,2012,14(5): el30-el30.
regions. The correlation of accuracy of feature extractors [7] GeeksforGeeks. (2023). Detect an object with OpenCV Python.
and the mean Average Precision scores on COCO dataset GeeksforGeeks. https://www.geeksforgeeks.org/detect-an-object-
stands true only for the models that do not have a greater with-opencv-python/
dependency on the classification from their feature [8] Kumar, V. (2022, March 30). How to Detect Objects in Real-Time
extractors. Using OpenCV and Python. Medium.
https://towardsdatascience.com/how-to-detect-objects-in-real-time-
using-opencv-and-python-c1ba0c2c69c0.
GPU Time and mAP Scores [9] Great Learning Team. (2022, March 22). Object Detection Using
OpenCV YOLO | Great Learning. Great Learning Blog: Free
1000 Resources What Matters to Shape Your Career!
https://www.mygreatlearning.com/blog/yolo-object-detection-using-
900 opencv/
800 [10] Waseem, M. (2023). Object Detection with OpenCV-Python Using a
Haar-Cascade Classifier. Stack Abuse. https://stackabuse.com/object-
700 detection-with-opencv-python-using-a-haar-cascade-classifier/
[11] P. K. Kushwaha and M. Kumaresan, "Machine learning algorithm in
600 healthcare system: A Review," 2021 International Conference on
Technological Advancements and Innovations (ICTAI), Tashkent,
500 Uzbekistan, 2021, pp. 478-481, doi:
400 10.1109/ICTAI53825.2021.9673220.
[12] P. K. Kushwaha, B. P. Lohani and D. Singh, "Review on information
300 security, laws and ethical issues with online financial system," 2016
International Conference on Innovation and Challenges in Cyber
200 Security (ICICCS-INBUSH), Greater Noida, India, 2016, pp. 49-53,
0 2 4 6 8 10 12 doi: 10.1109/ICICCS.2016.7542350.
[13] G. Gulati, B. P. Lohani and P. K. Kushwaha, “A Novel Application
mAP Score GPU Time Of IoT In Empowering Women Safety Using GPS Tracking Module,”
2020 Research, Innovation, Knowledge Management and Technology
Fig. 7. GPU times and mean Average Precision values for all the Application for Business Sustainability (INBUSH), Greater Noida,
combinations India, 2020, pp. 131-137, doi:
10.1109/INBUSH46973.2020.9392193.
IV. CONCLUSION [14] D. Pareta, I. N. Verma, B. P. Lohani, P. K. Kushwaha and V. Bibhu,
"IoT Enabled Smart and Efficient Musical Water Fountain," 2022 2nd
There exists a trade-off between accuracy and International Conference on Innovative Practices in Technology and
investment of time and resources in the case of traditional Management (ICIPTM), Gautam Buddha Nagar, India, 2022, pp. 369-
computer vision algorithms versus CNNs. In order to train 373, doi: 10.1109/ICIPTM54933.2022.9754129.
144
Authorized licensed use limited to: Universita degli Studi di Napoli Federico II. Downloaded on March 30,2025 at 22:36:11 UTC from IEEE Xplore. Restrictions apply.
2023 10th IEEE Uttar Pradesh Section International Conference on Electrical, Electronics and Computer Engineering (UPCON)
[15] B. P. Lohani, M. Trivedi, R. J. Singh, V. Bibhu, S. Ranjan and P. K. Analysis and Knowledge Management (ABLAZE), Greater Noida,
Kushwaha, "Machine Learning Based Model for Prediction of Loan India, 2015, pp. 206-211, doi: 10.1109/ABLAZE.2015.7154993.
Approval," 2022 3rd International Conference on Intelligent [31] Behl, R., Khatter, H., Singh, P., Bhardwaj, G., Chaturvedi, P. (2021).
Engineering and Management (ICIEM), London, United Kingdom, Automated and Curated Sack Count Leveraging Video Analysis on
2022, pp. 465-470, doi: 10.1109/ICIEM54221.2022.9853160. Moving Objects. In: Awasthi, S., Travieso-González, C.M., Sanyal,
[16] A. Kumar, B. P. Lohani and P. K. Kushwaha, "Robust Secured G., Kumar Singh, D. (eds) Artificial Intelligence for a Sustainable
Framework for Online Business Transactions over Public Network," Industry 4.0. Springer, Cham. https://doi.org/10.1007/978-3-030-
2021 2nd International Conference on Intelligent Engineering and 77070-9_17.
Management (ICIEM), London, United Kingdom, 2021, pp. 555-560, [32] L. Das, S. Sharma, A. Naval, A. Singh and P. Anand, "Distributive
doi: 10.1109/ICIEM51511.2021.9445380. and Governing System for Descriptive Error Identification of High
[17] P. K. Kushwaha and B. P. Lohani, "A review of security of the cloud Speed Railway Illustrations and Images using Convolutional Neural
computing over business with implementation," 2016 International Networks," 2022 3rd International Conference on Intelligent
Conference on Innovation and Challenges in Cyber Security Engineering and Management (ICIEM), London, United Kingdom,
(ICICCS-INBUSH), Greater Noida, India, 2016, pp. 192-198, doi: 2022, pp. 815-820, doi: 10.1109/ICIEM54221.2022.9853125.
10.1109/ICICCS.2016.7542342. [33] N. Krishnachaithanya et al., "People Counting in Public Spaces using
[18] M. Chandra, P. K. Kushwaha and S. Saxena, "Modified Fractal Deep Learning-based Object Detection and Tracking Techniques,"
Carpets," 2011 International Conference on Computational 2023 International Conference on Computational Intelligence and
Intelligence and Communication Networks, Gwalior, India, 2011, pp. Sustainable Engineering Solutions (CISES), Greater Noida, India,
537-540, doi: 10.1109/CICN.2011.115. 2023, pp. 784-788, doi: 10.1109/CISES58720.2023.10183503.
[19] P. K. Kushwaha, R. Kohli and D. Singh, "Secret key watermarking in [34] K. Kaushik, I. Punhani, S. Sharma and M. Martolia, "An Advanced
WAV audio file in perceptual domain," 2015 International Approach for performing Cyber Fraud using Banner Grabbing," 2022
Conference on Futuristic Trends on Computational Analysis and 5th International Conference on Contemporary Computing and
Knowledge Management (ABLAZE), Greater Noida, India, 2015, pp. Informatics (IC3I), Uttar Pradesh, India, 2022, pp. 298-302, doi:
629-634, doi: 10.1109/ABLAZE.2015.7154940. 10.1109/IC3I56241.2022.10072445.
[20] Ranjan, Ankur A. et al. “An Approach for Netflix Recommendation [35] S. Manna, V. Jalodia, K. Kumar, V. Tripathi, S. Sharma and D.
System using Singular Value Decomposition.” Journal of Computer Arora, "Predicting preeminent Machine Learning Approach on Stars,"
and Mathematical Sciences (2019). 2022 2nd International Conference on Technological Advancements
[21] Makkar, Bhavya et al. “Map Reduce concept-based Sentiment in Computational Sciences (ICTACS), Tashkent, Uzbekistan, 2022,
Analysis Approach.” International Journal of Computer Sciences and pp. 587-591, doi: 10.1109/ICTACS56270.2022.9988044.
Engineering (2019) [36] A. Chaturvedi, S. A. Yadav, H. M. Salman, H. R. Goyal, H.
[22] Bhatia, Ayush & Bibhu, Vimal & Lohani, Bhanu & Kushwaha, Gebregziabher and A. K. Rao, "Classification of Sound using
Pradeep. (2020). An Application Framework for Quantum Computing Convolutional Neural Networks," 2022 5th International Conference
using Artificial intelligence Techniques. 264-269. on Contemporary Computing and Informatics (IC3I), Uttar Pradesh,
10.1109/INBUSH46973.2020.9392164. India, 2022, pp. 1015-1019, doi: 10.1109/IC3I56241.2022.10072823.
[23] A. Kumar, B. P. Lohani and P. K. Kushwaha, "Black Hole Attack in [37] V. Agarwal, S. Taware, S. A. Yadav, D. Gangodkar, A. Rao and V.
Mobile Ad Hoc Network and its Avoidance," 2021 International K. Srivastav, "Customer - Churn Prediction Using Machine
Conference on Innovative Practices in Technology and Management Learning," 2022 2nd International Conference on Technological
(ICIPTM), Noida, India, 2021, pp. 103-107, doi: Advancements in Computational Sciences (ICTACS), Tashkent,
10.1109/ICIPTM52218.2021.9388366. Uzbekistan, 2022, pp. 893-899, doi:
10.1109/ICTACS56270.2022.9988187.
[24] Srivastav, A.V., Lohani, B.P., Kushwaha, P.K., Tyagi, S. (2021).
Dual-Layer Security and Access System to Prevent the Spread of [38] A. Shahi, S. Kaur, A. Mittal and S. V. Singh, "Building Technology
COVID-19. In: Prateek, M., Singh, T.P., Choudhury, T., Pandey, adoption model for the success of Women Healthcare Workers," 2022
H.M., Gia Nhu, N. (eds) Proceedings of International Conference on 5th International Conference on Contemporary Computing and
Machine Intelligence and Data Science Applications. Algorithms for Informatics (IC3I), Uttar Pradesh, India, 2022, pp. 175-180, doi:
Intelligent Systems. Springer, Singapore. 10.1109/IC3I56241.2022.10073124.
https://doi.org/10.1007/978-981-33-4087-9_28 [39] V. Malik, R. Mittal and S. V. SIngh, "EPR-ML: E-Commerce Product
[25] A. Khuran, B. P. Lohani, V. Bibhu and P. K. Kushwaha, "An AI Recommendation Using NLP and Machine Learning Algorithm,"
Integrated Face Detection System for Biometric Attendance 2022 5th International Conference on Contemporary Computing and
Management," 2021 2nd International Conference on Intelligent Informatics (IC3I), Uttar Pradesh, India, 2022, pp. 1778-1783, doi:
Engineering and Management (ICIEM), London, United Kingdom, 10.1109/IC3I56241.2022.10073224.
2021, pp. 29-33, doi: 10.1109/ICIEM51511.2021.9445295. [40] R. Mittal, V. Malik and S. V. Singh, "DFR-HL: Diabetic Food
[26] S. Salagrama, B. P. Lohani and P. K. Kushwaha, "An Analytical Recommendation Using Hybrid Learning Methods," 2022 5th
Survey of User Privacy on Social Media Platform," 2021 International Conference on Contemporary Computing and
International Conference on Technological Advancements and Informatics (IC3I), Uttar Pradesh, India, 2022, pp. 1784-1788, doi:
Innovations (ICTAI), Tashkent, Uzbekistan, 2021, pp. 173-176, doi: 10.1109/IC3I56241.2022.10072763.
10.1109/ICTAI53825.2021.9673402. [41] R. Mittal, J. Singh, V. Malik, A. Mittal, V. Rattan and S. V. Singh,
[27] S. Singh, D. Chaudhary, A. D. Gupta, B. Prakash Lohani, P. K. "Forecasting E-Mentoring Effectiveness using Data Mining
Kushwaha and V. Bibhu, "Artificial Intelligence, Cognitive Robotics Approach," 2022 5th International Conference on Contemporary
and Nature of Consciousness," 2022 3rd International Conference on Computing and Informatics (IC3I), Uttar Pradesh, India, 2022, pp.
Intelligent Engineering and Management (ICIEM), London, United 931-934, doi: 10.1109/IC3I56241.2022.10072806.
Kingdom, 2022, pp. 447-454, doi: [42] D. Jain, M. Arya, V. Malik and S. V. Singh, "A Novel Parameter
10.1109/ICIEM54221.2022.9853081. Optimization Metaheuristic: Human Habitation Behavior Based
[28] S. Suman, P. Kaushik, S. S. N. Challapalli, B. P. Lohani, P. Optimization," 2022 5th International Conference on Contemporary
Kushwaha and A. D. Gupta, "Commodity Price Prediction for making Computing and Informatics (IC3I), Uttar Pradesh, India, 2022, pp.
informed Decisions while trading using Long Short-Term Memory 921-924, doi: 10.1109/IC3I56241.2022.10072699.
(LSTM) Algorithm," 2022 5th International Conference on [43] G. Singh, G. Bhardwaj, S. V. Singh and N. Chaudhary, "Artificial
Contemporary Computing and Informatics (IC3I), Uttar Pradesh, Intelligence led Industry 4.0 Application for Sustainable
India, 2022, pp. 406-411, doi: 10.1109/IC3I56241.2022.10072626. Development," 2022 2nd International Conference on Innovative
[29] Gupta, A., Gupta, M., & Chaturvedi, P. (2020). Investing Data with Practices in Technology and Management (ICIPTM), Gautam Buddha
Machine Learning Using Python. Strategic System Assurance and Nagar, India, 2022, pp. 339-343, doi:
Business Analytics, 1-9. 10.1109/ICIPTM54933.2022.9753944.
[30] P. Chaturvedi, S. Dahiya and S. Agrawal, "Technological innovation: [44] T. Vinoth Kumar, A. R. Yeruva, S. Kumar, D. Gangodkar, A. L N
A necessity for sustainable MSME sector in India," 2015 Rao and P. Chaturvedi, "A New Vehicle Tracking System with R-
International Conference on Futuristic Trends on Computational CNN and Random Forest Classifier for Disaster Management
Platform to Improve Performance," 2022 2nd International
145
Authorized licensed use limited to: Universita degli Studi di Napoli Federico II. Downloaded on March 30,2025 at 22:36:11 UTC from IEEE Xplore. Restrictions apply.
2023 10th IEEE Uttar Pradesh Section International Conference on Electrical, Electronics and Computer Engineering (UPCON)
Conference on Technological Advancements in Computational in Computational Sciences (ICTACS), Tashkent, Uzbekistan, 2022,
Sciences (ICTACS), Tashkent, Uzbekistan, 2022, pp. 797-804, doi: pp. 658-662, doi: 10.1109/ICTACS56270.2022.9988033.
10.1109/ICTACS56270.2022.9988024. [49] S. H. Abbas, S. Vashisht, G. Bhardwaj, R. Rawat, A. Shrivastava and
[45] A. R. Yeruva, C. S. L Vijaya Durga, G. B, K. Pant, P. Chaturvedi and K. Rani, "An Advanced Cloud-Based Plant Health Detection System
A. P. Srivastava, "A Smart Healthcare Monitoring System Based on Based on Deep Learning," 2022 5th International Conference on
Fog Computing Architecture," 2022 2nd International Conference on Contemporary Computing and Informatics (IC3I), Uttar Pradesh,
Technological Advancements in Computational Sciences (ICTACS), India, 2022, pp. 1357-1362, doi: 10.1109/IC3I56241.2022.10072786.
Tashkent, Uzbekistan, 2022, pp. 904-909, doi: [50] R. Singh, M. Bansal, S. Gupta, A. Singh, G. Bhardwaj and A. D.
10.1109/ICTACS56270.2022.9987881. Dhariwal, "Detection of Social Network Spam Based on Improved
[46] D. Singh, P. Chaturvedi, G. Dhawan, A. Singh and R. Aggarwal, Machine Learning," 2022 5th International Conference on
"WBMS: Waste Bin Management System for densely populated Contemporary Computing and Informatics (IC3I), Uttar Pradesh,
urban areas," 2022 2nd International Conference on Innovative India, 2022, pp. 2257-2261, doi: 10.1109/IC3I56241.2022.10073448.
Practices in Technology and Management (ICIPTM), Gautam Buddha [51] S. Gupta, G. Bhardwaj, A. Shrivastava, R. Kukreti, A. K. Rao and B.
Nagar, India, 2022, pp. 770-774, doi: Chauhan, "Liver Disease Prediction Using Various Algorithms," 2022
10.1109/ICIPTM54933.2022.9754190. 5th International Conference on Contemporary Computing and
[47] S. Agarwal, G. Bhardwaj, E. Saraswat, N. Singh, R. Aggarwal and A. Informatics (IC3I), Uttar Pradesh, India, 2022, pp. 827-831, doi:
Bansal, "Insurtech Fostering Automated Insurance Process using 10.1109/IC3I56241.2022.10072433.
Deep Learning Approach," 2022 2nd International Conference on [52] U. N. Dulhare, S. Rasool, M. N. Khan, B. Pant, A. Kakoli Rao and G.
Innovative Practices in Technology and Management (ICIPTM), Bhardwaj, "Analysis of the Regulatory Development
Gautam Buddha Nagar, India, 2022, pp. 386-392, doi: Cryptocurrencies for Trading in Business with Deep Learning
10.1109/ICIPTM54933.2022.9753891. Techniques," 2022 2nd International Conference on Technological
[48] M. Patidar, G. Bhardwaj, A. Jain, B. Pant, D. Kumar Ray and S. Advancements in Computational Sciences (ICTACS), Tashkent,
Sharma, "An Empirical Study and Simulation Analysis of the MAC Uzbekistan, 2022, pp. 651-657, doi:
Layer Model Using the AWGN Channel on WiMAX Technology," 10.1109/ICTACS56270.2022.9987953.
2022 2nd International Conference on Technological Advancements
146
Authorized licensed use limited to: Universita degli Studi di Napoli Federico II. Downloaded on March 30,2025 at 22:36:11 UTC from IEEE Xplore. Restrictions apply.