This project demonstrates various image processing techniques using the OpenCvSharp wrapper for the OpenCV library. It is developed as a required deliverable for the Intelligent Systems 1 (CS345) course.
The application is built in C#, providing an accessible interface for experimenting with and applying popular computer vision algorithms.
- Image loading and display
- Grayscale conversion
- Blurring and smoothing
- Edge detection (e.g., Canny)
- Morphological operations
- Object detection basics
- Real-time webcam image processing (if supported)
- Result visualization and saving
- .NET SDK 6.0+ or later
- OpenCvSharp
- Visual Studio 2022 or later (recommended), or any C#-compatible IDE
- Clone the repository:
git clone https://github.com/JIVERU/Image-Processing-with-OpenCvSharp.git cd Image-Processing-with-OpenCvSharp - Restore dependencies:
dotnet restore
- Build and run:
dotnet run
If using Visual Studio, simply open the .sln file and build/run the project.
- Launch the application.
- Select an image to process or use your webcam (if supported).
- Choose any of the available image processing functions from the UI or code.
- View, analyze, and save the results.
Below is an example showcasing edge detection on an input image:
using OpenCvSharp;
// Load image
Mat src = Cv2.ImRead("assets/input.jpg");
// Convert to grayscale
Mat gray = new Mat();
Cv2.CvtColor(src, gray, ColorConversionCodes.BGR2GRAY);
// Apply Canny edge detector
Mat edges = new Mat();
Cv2.Canny(gray, edges, 100, 200);
// Save result
Cv2.ImWrite("assets/output_edges.jpg", edges);Contributions, suggestions, and bug reports are welcome!
Feel free to open an issue or submit a pull request.
This project is distributed under the MIT License. See LICENSE for more information.
- OpenCvSharp
- OpenCV
- CS345 (Intelligent Systems 1) course at [Your Institution]
Developed by JIVERU
