International Journal of Engineering Applied Sciences and Technology, 2021 Vol. 5, Issue 11, ISSN No. 2455-2143, Pages 262-266 Published Online March 2021 in IJEAST (http://www.ijeast.com)

DRS ASSISTING USING COMPUTER VISION Ms. Kajal Shirke, Ms. Varsha Warise, Ms. Pooja Waykule Student, Information Technology Engineering, Bharati Vidyapeeth College of Engineering, Navi Mumbai, Maharashtra, India

Prof. S.N. Mhatre Assistant Professor, Dept. of Information Technology, Bharati Vidyapeeth College of Engineering, Navi Mumbai, Maharashtra, India

Abstract - A fair decision is crucial in any of the game to give of the decisions. If this can be achieved with the help of technology, justice to the game. Any wrong decision due to human then the game will be more fair and enjoyable. Previously proposed misperception may fate the result of the game. Computer vision researches regarding this field have tried to solve the problem, but and Image processing techniques have been mentioned in the these are infeasible, costly and prone to error because of the usage of literature review which used multiple cameras for sensors on field and bowlers. On the other hand, we have proposed demonstration. This paper focuses on a system which helps in computer vision based approach in this paper which does not need making the decisions to assist the umpire in taking the infrastructure because it will get video feed from broadcasting decisions such as no-ball, LBW i.e. Leg before , out, cameras. Our proposed method is expected to perform better and low out, etc with the help of smartphone camera of good cost in operating due to no infield sensor and other devices. quality. The Decision review system (DRS) aims to give decisions like The remaining portion of the paper is organized as Section II run-out and stump-out. Tkinter is used to develop the GUI of includes brief picture about the Related Work and Proposed system. DRS. Object classification and object recognition is Section III includes Working methodology and Implementation. implemented using Histogram of Gradients (HOG) and Section IV includes Results which discuss briefly about the the Support Vector Machine (SVM). To detect the decisions got from using the various computer vision algorithms. from the video we optimized and used frame subtraction, Finally, Section V includes conclusion and future scope that lay contour detection and minimum enclosing circle algorithms down the outcomes of proposed work. using OpenCV library. Linear regression and quadratic regression are used to track and predict the motion of the ball Section II from video source. VPython is used for the visual representation. II. LITERATURE SURVEY Section I 2.1 Related work In the past few technologies was developed, one of the prominent I. INTRODUCTION ones being “Application of Computer Vision in Cricket: Foot 1.1 Background: Overstep No-ball Detection” proposed by AZM Ehtesham Chowdhury, Md Shamsur Rahim, Md Asif Ur Rahman [2] where [1] In every cricket match, umpires are responsible for deciding image subtraction is used and this system works on only the bowler’s the approval of a ball by a bowler. There are many front foot and end popping . scenarios when a delivery is disapproved by umpires. Decisions like LBW, no ball, and stump out requires some minutes “Cricket umpire assistance and ball tracking system using a single in certain cases using television replay. So umpires make their smartphone camera” by Udit Arora, Sohit Verma, Sarthak Sahni, and decisions on their perception, but human perception cannot be Tushar Sharma [3] proposed a system that involved computer vision accurate all the time. Besides, it is not always possible to algorithms to detect, identify and track the cricket ball and machine conclude the accurate judgment because of the limitations of learning techniques to optimize and further predict various results and existing technology and this creates mass confusion and debates decisions. among the viewers and cricket lovers. The on-field umpire at the bowler’s end signals a square mime of a TV screen to prompt the In another research paper, B.L.Velammal, P. Anandha Kumar to review the decision. The third umpire initially proposed “An Efficient Ball Detection Framework for Cricket” [4]. In checks if it’s a legal delivery before proceeding to watch the that non-ball objects and ball objects are identified. Region Growing replays to make an lbw or other decisions. segmentation is chosen for segmentation. After performing segmentation, the ball and non-ball objects are differentiate based on 1.2 Aim and Objective: shape properties. The non-ball objects are eliminated and resulting It is necessary to eradicate the debate to increase the acceptability frames consists of only ball object. The ball objects are used further to 262 International Journal of Engineering Applied Sciences and Technology, 2021 Vol. 5, Issue 11, ISSN No. 2455-2143, Pages 262-266 Published Online March 2021 in IJEAST (http://www.ijeast.com) detect the ball.

“Implementation of Augmented Reality in Cricket for Ball Tracking and Automated Decision Making for No ball” by Nikhil Batra, Harsh Gupta, Nakul Yadav, Anshika Gupta, Amita Yadav [5] proposed a system that determines whether a ball is a no-ball or ball. The system applies different techniques like canny edge detector, Hough line transform algorithms, Douglas Peucker algorithm contour.

No More Third Umpires” by Alex Joseph, Alistar Fernandez, Jasir Ahamed P.A., Treesa Joseph [6] proposed a system that uses image and video processing techniques, which automates the role of the third umpire.

2.2 Problem statement

In India, everyone is enthusiastic about cricket. Many training academies, competitions, and even though gully cricket restricts Figure 3:Proposed System the use of decision review system for making a decision because of its high cost. Because of that many unfair decision was given 3.1 Ball Detection by the umpire which is not good for both the teams, as a result, many controversies have happened. Our project aims to develop a Frame differencing technique is used to extract frames which further computer system that helps the umpire for making a decision in converted into grayscale. These frames are then used extract HOG cricket at a low cost and can be used at various competitions, features which then fed to SVM model which is built using OpenCV academies and even in gully cricket. SVM library is then used to detect the ball by using frame subtraction method. Positive and negative data samples are collected III. PROPOSED SYSTEM which are also used to extract HOG features.

3.2 Ball Tracking Our project “DRS assisting umpire using computer vision” is implemented using Python and Tkinter. GUI of our project i.e. SVM model is used to detect the exact presence of the ball where DRS gives options to choose from to the user which contains the ball is detected in the particular frame. A separate file is created Stump out, Run out, No ball and LBW decisions. Stump out and to store the coordinates of the ball which are obtains as ‘x’ and ‘y’ Run out can be decided by playing the source video in slow or coordinates. fast motion. Further decisions like LBW and No Ball can be implemented by extracting frames through the source video. Ball 3.3 Batsman Detection and Tracking detection and Batsman height detection is done from the extracted OpenCV ‘s built-in People Detector SVM models are used to detect frames. The detected ball coordinates are further used for ball the batsman from the provided video. The batsman movement is tracking. 3D coordinates are mapped into 3D coordinates and tracked by limiting the search window to the neighborhood of the smoothen using regression techniques. Visualization is first detection which is displayed on the frame. implemented through Vpython which shows results for all these decisions. 3.4 Mapping 2D coordinates to 3D world coordinates The 2D coordinates of the tracked ball which are obtained after series of transformation using Minimum Enclosing Circle algorithm are then mapped into 3D world coordinates according to the dimensions. The z-coordinates i.e. depth is obtained by comparing it with the radius which is obtained at the beginning vs. Obtained at the end of the pitch. It is then scaled the ratio to the length of the pitch. 3.5 3D Visualization of Tracked ball and Cricket Pitch The obtained x,y and z coordinates are used to visualize the objects in 3D using VPython visualization library. For better visualization, linear and quadratic regression is applied various dimensions.

263 International Journal of Engineering Applied Sciences and Technology, 2021 Vol. 5, Issue 11, ISSN No. 2455-2143, Pages 262-266 Published Online March 2021 in IJEAST (http://www.ijeast.com)

batsmen fails to make his while running between the Section III , the batsman is determined as a run-out. The batsmen must have something behind the line to be safe except they are on the IV. WORKING METHODOLOGY same side, in that case, the batsman further away from the stumps determines as run-out. A fielder must touch the ball before it hits the We developed a system that helps the third umpire to make a wicket for the run-out to be genuine. If the batsman hits the ball and decision on various calls on the field. it strikes the stumps on the other end while the other side batsman or non-striker is out of the crease and the bowler has touched the ball 4.1 DRS Gui before it hits the wicket then it will be determined as run-out.

It Provides facilities to give any decision like No-ball, Stump- out, LBW and Run out. Tkinter is used to make GUI of the Decision review system and various computer vision algorithms are used to give these decisions based on criteria.

Figure4.3:Run out decision

4.4 (LBW)

LBW decision is to determine in the way that if the ball hits the batsman without hitting the batsman bat or a hand holding a bat or going to hit the wicket, then he is to be adjudged out LBW, unless: Figure 4.1:DRS Gui (1) the ball pitched only on the or (2) the ball hit the batsman outside the off-stump and the umpire 4.2 Stump Out determines that the batsman was genuinely attempting to play the ball The Stump-out decision is determined by playing the video in slow motion also in fast motion based on further conditions. If batsman out of his ground leaving no part of his bat or body behind the crease in an attempt to hit the ball and the wicket- keeper dislodges the bails, he/she is termed out. In case the keeper displaces the bails before the ball reaches him/her, the batsman will not be given out.

Figure 4.4:Ball Path

4.5 No Ball

To determine the no-ball first we have to locate the position of the ball nearest the batsman wicket crease then if the ball hasn’t Figure 4.2:Stump out decision bounced off the ground, and the ball height is greater than the batsman height, it is determined as a no-ball. 4.3 Run Out

To determine the run-out decision the system plays the selected video in slow motion as well as in fast motion. If the wicket- keeper or any of the fielder displace the bails while either of the

264 International Journal of Engineering Applied Sciences and Technology, 2021 Vol. 5, Issue 11, ISSN No. 2455-2143, Pages 262-266 Published Online March 2021 in IJEAST (http://www.ijeast.com)

This system is designed mainly for training academies, gully and cricket competitions at a small level, but can be used at an advanced level for national and international level cricket matches by including multiple cameras, microphones which may be useful for more accurate and deep analysis.

VIII. REFERENCES

[1] Chowdhury AZM, Rahim Shamsur., and Rahman Asif-Ur. (2016) "Application of computer vision in Cricket: Foot

overstep no-ball detection," Figure 4.5(1):Searching Window DOI: 10.1109/CEEICT.2016.7873086 3rd International Conference on Electrical Engineering and Information Communication Technology (ICEEICT), IEEE (pp. 1-5).

[2] Arora Udit, Verma Sohit, Sahni Sarthak and Sharma Tushar (2017) “Cricket umpire assistance and ball tracking system using a single smartphone camera” DOI:10.7287/peerj.preprints.3402 (pp. 1-14).

[3] B.L.Velammal, P. Anandha Kumar (2010) “An Efficient Ball Detection Framework for Cricket” International Journal of Computer Science Issues (IJCSI), ISSN (Online): 1694-

0784 Vol. 7 (pp. 30-35) Figure 4.5(2):Best fit Circle

[4] Batra Nikhil, Gupta Harsh, Yadav Nakul, Gupta Anshika, Section IV Yadav Amita. (2014). “Implementation of augmented reality

in cricket for ball tracking and automated decision making V. RESULTS for no ball”.DOI: 10.1109/ICACCI.2014.6968378. (pp. 316-

321). Our project DRS assisting umpire using computer vision gives the following results: [5] Joseph Alex, Fernandez Alistar, Jasir Ahamed P.A., Treesa 1. Stump out and Run-out decisions by playing video either Joseph (2018) “No More Third Umpires” International in slow or fast motion. Research Journal of Engineering and Technology (IRJET), 2. LBW decision based on e-ISSN-2395-0056 (pp. 225-227). i) The impact is outside or inside. ii) Wicket hitting the stump or not hitting the stump. 3. No ball decision by detecting [6] Dakhare Bhawana, Khatu Amish, Singh Hrushikesh, Gupta i) The position of the ball nearest the batsman wicket Aniket, (2020) “Visual E-commerce Application using crease Deep Learning” International Research Journal of ii) And the ball hasn’t bounced off the ground, and the Engineering and Technology (IRJET), Volume: 07 (pp. ball height is greater than the batsman's height. 4102-4110).

Section V [7] Patil, V., Ingle, D.R. (2021) An association between fingerprint patterns with blood group and lifestyle based VI. CONCLUSION diseases: a review. Artif Intell Rev 54, 1803–1839 (2021). https://doi.org/10.1007/s10462-020-09891-w The main objective of our project is to assist the umpire in game of cricket to make fair decision in efficient way. Our project [8] Semwal A., Mishra D., V. Raj, Sharma J., and Mittal A., discusses the use of computer vision algorithms to extract frames (2018) “Cricket shot detection from videos,” 9th and to detect, tracked the ball from the provided source video. International Conference on Computing, Communication Vpython helps to visualize the results of various decisions which and Networking Technologies (ICCCNT). IEEE, 2018, makes the UI more attractive and interactive. Also use of single DOI:10.1109/ICCCNT.2018.8494081 (pp. 1–6). smartphone camera makes the system cost efficient and easy to use. [9] Simon Siregar, Ismail bin Ibrahim, Muhammad Ikhsan VII. FUTURE SCOPE Sani, Marlindia Ike Sari (2018) “Design of Computer 265 International Journal of Engineering Applied Sciences and Technology, 2021 Vol. 5, Issue 11, ISSN No. 2455-2143, Pages 262-266 Published Online March 2021 in IJEAST (http://www.ijeast.com)

Vision Based Ball Detection System on Wheeled Robot Soccer” DOI:10.1109/ICCEREC.2018.8711988, IEEE (pp. 46-49). [10] K. Rasool Reddy, K. Hari Priya, N. Neelima (2015) “Object Detection and Tracking – A Survey” DOI:10.1109/CICN.2015.317 (pp. 418-421).

[11] Yi-You Hou, Sz-Yu Chiou, Ming-Hung Lin (2015) “Real-time Detection and Tracking for Moving Objects Based on Computer Vision Method” IEEE DOI: 10.1109/ICCRE.2017.7935072 (pp. 213-217).

[12] Shantaiya S., and Mehta K. V., (2015) “Multiple Object Tracking using Kalman Filter and Optical Flow,” European Journal of Advances in Engineering and Technology, vol. 2, 2015, (pp. 34-39).

[13] Kale K, Pawar S., and Dhulekar P., (2015) “Moving Object Tracking using Optical Flow and Motion Vector Estimation,” DOI: 10.1109/ICRITO.2015.7359323 (pp. 1-6).

[14] T. D’Orazio, N. Ancona, G. Cicirelli, and M. Nitti, (2002) “A ball detection algorithm for real soccer image sequences”, Proceedings of ICPR, DOI: 10.1109/ICPR.2002.1044654, (pp 210-213).

[15] Vito Reno, Nicola Mosca, Roberto Marani, Massimiliano Nitti, Tiziana D’Orazio,(2018) “Convolutional Neural Networks based ball detection in tennis games”, IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops DOI: 10.1109/CVPRW.2018.00228, (pp.1839-1845).

266