Virtual Spy (Automating the Role of Third Umpire in the Game of Gully Cricket)

: The conclusion of the game might induce any incorrect decision owing to a person's misunderstanding. In book reviews that employed many cameras to display, computer vision and image processing techniques were mentioned. This study focuses on a system that employs a high-quality smartphone camera to assist the umpire in making judgments such as no ball, running, and out. The Decision Review System (DRS) intends to offer run-out and stump-out rulings. Tkinter is used to create DRS's graphical user interface. The Histogram of Gradients (HOG) and Support Vector Machine are used to classify and recognise objects (SVM). Using the OpenCV library, we optimised and applied frame subtraction, contour detection, and minimal enclosing circle methods to detect the cricket ball from the video. To monitor and forecast the motion of the ball from a video source, linear regression and quadratic regression are utilised. The visual depiction is done with VPython..


I. INTRODUCTION
[1] Throughout the game of cricket, umpires are responsible for determining the approval of a ball bowled by a bowler .There are many cases where the delivery may not be approved by the umpire.Decisions like no ball, end and exit require some minutes in certain situations using the television playback.So the umpires make their own decisions based on their own ideas, but human opinion cannot always be accurate.Besides, it is not always possible to conclude accurate judgments due to the limitations of available technology and this creates confusion and debate between viewers and cricket fans.The umpire on the field at the end of the bowler shows a square screen TV mime to tell the third umpire to review the decision.The third umpire begins by checking for official delivery before proceeding to watch the replays for run out or other decisions.

Aim and Objective
It is necessary to eradicate the debate to increase the acceptability of the decisions.If this can be achieved with the help of technology, then the game will be fine and enjoyable.Previously proposed research in this field has tried to solve the problem, but it is not possible, it is expensive and often makes mistakes due to the use of sensors in the field and spells.On the other hand, we have proposed a computer-based approach to this paper that does not require additional infrastructure as it will receive video feeds from streaming cameras.Our proposed method is expected to create better and lower operating costs due to the lack of infield sensor and other devices.
The rest of the paper is edited as Section II includes a brief overview of the Related Work and Proposed Plan.Section III covers the operating system and implementation.Section IV covers Results that summarize the conclusions reached using various computer vision algorithms.Finally, SectionV covers the conclusion and scope of the future that undermines the outcomes of the proposed work.Additional judgments, such as No Ball, can be made by extracting frames from the original video.The extracted frames are used to detect the ball and the height of the batter.Ball tracking is done using the observed ball coordinates.Regression algorithms are used to transfer 3D coordinates into 3D coordinates and smooth them out.Vpython is used to implement visualisation, which displays the outcomes of all of these decisions.

Required Tools:
 Python  Tkinter for GUI  Pillow, opencv and imutils packages for python.

A. Tkinter
Tkinter is a de-facto standard GUI package for Pythons (Graphical User Interface).It is on top of Tcl/Tk, a thin objectoriented layer.TKinter is not the only Python toolkit for GuiProgramming.However, it is the most commonly used one.Cameron Laird calls the annual decision to keep Tkinter "one of the minor traditions of the Python world."If you run python-m tkinter from the command prompt, it is important to open a window showing a simple Tk interface, letting you know that tkinter is correctly installed on your device, and also showing which version of Tcl/Tk is running''.

B. Open CV
The Open-Source Computer Vision Library is a collection of programming functions geared for real-time computer vision.It was developed by Intel and then funded by Willow Garage and Itseez (later acquired by Intel).Under the open-source Apache 2 License, the framework is cross-platform and free to use.Since 2011, OpenCV has included GPU acceleration for real-time tasks.
What was the purpose of these tools?Detection of Balls The frames are extracted using a frame differencing approach before being converted to grayscale.These frames are then used to extract HOG features, which are then put into an OpenCV SVM model, which is then used to detect the ball using the frame subtraction approach.Positive and negative data samples are gathered, and HOG characteristics are extracted.

The Ball Tracking
The Ball Tracking SVM model is utilised to detect the exact presence of the ball in each frame.The ball's coordinates, which are obtained as 'x' and 'y' coordinates, are saved in a separate file.

Batsman Detection and Tracking
Detection and Tracking of Batsmen The batsman is detected from the given footage using OpenCV's built-in People Detector SVM models.Limiting the search window to the neighbourhood of the initial detection presented on the frame allows the batsman's progress to be followed.
Converting two-dimensional coordinates to three-dimensional world coordinates The tracked ball's 2D coordinates, which are generated after a sequence of transformations using the Minimum Enclosing Circle technique, are then transferred into 3D world coordinates based on the dimensions of the cricket pitch.The depth is determined by comparing the radius acquired at the start of the pitch to the radius obtained at the conclusion of the pitch.The ratio is then scaled to the pitch's length.
Tracked Ball and Cricket Pitch 3D Visualization Using the VPython visualisation package, the acquired x,y, and z coordinates are utilised to view the objects in 3D.By limiting the search window to the neighbourhood of the initial detection presented on the frame, linear and quadratic regression is conducted across multiple dimension monitored for better visualisation.
IV. WORKING PLAN We created a method to assist the third umpire in making decisions on various field calls.

DRS GUI
It has the ability to make decisions such as No-ball, Stump-out, LBW, and Run out.The Decision Review System's GUI is built with Tkinter, and several computer vision algorithms are utilised to generate conclusions depending on criteria.

Stump Out
The Stump-out decision is determined by playing the video in slow motion also in fast motion based on further conditions.He/she is declared out if he/she leaves no part of his bat or body behind the crease in an effort to smash the ball and the wicket-keeper dislodges the bails.The batter will not be given out if the keeper removes the bails before the ball reaches him.
2.1 Related Work Literature Review Several systems have been developed in the past, some of which are more particular to the usage of "Application of Computer Vision in Cricket: Foot Overstep No-Ball Detection" suggested by AZM Ehtesham Chowdhury III.PROPOSED SYSTEM Python and Tkinter are used to develop our project "DRS helping umpire utilising computer vision."Our project's GUI, DRS, provides the user with options such as Stump out, Run out, and No ball.Stump out and Run out may be determined by watching the original footage in slow or fast motion.

Figure
Figure 4.2: Stump out decision