Question
Offside decision system in football The offside law states that A player is in an offside position if he is nearer to his opponents goal
Offside decision system in football
The offside law states that A player is in an offside position if he is nearer to his opponents goal line than both the ball and the second last opponent. In this project, you are requested to create a software that helps to detect offside situations in football games.
The software inputs a picture (taken with an arbitrarily positioned camera) at the moment the ball is kicked, and a user has to click on the two players involved (player A and player B in the figure). From the positions on the screen, the distance between the two players along the x-axis of the field is computed (see Figure).
Requirements:
Depending on the implementation you are free to get additional information from the user (i.e. dimensions of the field). Minimal input from the user is two points clicked.
Your program should draw two vectors at the clicked points, perpendicular the field (ground plane).
Your program should draw two lines to the image, parallel to the goal line. The program should also compute the distance between these lines in metric units.
Sample Code to get mouse input from user in Matlab
%The code draws line between points selected.
f=figure;
imshow('moon.tif');
[x, y] = getpts(f);
%click two point and hit Enter
line(x,y,'Color','red','LineWidth',2 );
What to submit:
Source codes
Input/output images
Report explaining details and theoretical background of your algorithm (equations, algorithms, numerical methods/solution of Linearon-Linear Equation that you have used).
please can you help me code this... in matlab
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started