Soccer Offside Detection is a project that aims to detect offside positions in soccer images using computer vision techniques. The project is built using .NET 8.0 and WPF for the user interface.
┣ 📂src
┃ ┣ 📂Models
┃ ┃ ┣ Player.cs
┃ ┃ ┗ TeamType.cs
┃ ┣ 📂Services
┃ ┃ ┣ ImageProcessor.cs
┃ ┃ ┗ OffsideAnalyzer.cs
┃ ┣ 📂UI
┃ ┃ ┣ MainWindow.xaml
┃ ┃ ┗ MainWindow.xaml.cs
┃ ┗ Program.cs
┣ .gitignore
┣ LICENSE.md
┣ README.md
┣ SoccerOffsideDetection.csproj
┗ SoccerOffsideDetection.sln
- .NET 8.0 SDK
- Visual Studio or Visual Studio Code
- Clone the repository:
git clone https://github.com/yourusername/soccer-offside-detection.git
- Navigate to the project directory:
cd soccer-offside-detection
- Restore the dependencies:
dotnet restore
To build the project, run the following command:
dotnet build
To run the project, use the following command:
dotnet run --project SoccerOffsideDetection.csproj
- Launch the application.
- Click on the "Import" button to select an image file.
- Once the image is loaded, click on the "Process" button to detect players and analyze offside positions.
- src/Models/Player.cs: Defines the Player class with properties like Position, Team,
HasBall
, IsOffside, and IsAnnotated. - src/Models/TeamType.cs: Defines the TeamType enum.
- src/Services/ImageProcessor.cs: Contains the ImageProcessor class that handles image processing and player detection.
- src/UI/MainWindow.xaml.cs: Contains the MainWindow class that handles the user interface logic.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.
- Emgu CV for the computer vision library.
- Microsoft for the .NET framework and WPF.