This project is a modular, multi-assignment exploration of computer vision techniques using Java and OpenCV. Across six Maven-based modules, it demonstrates image filtering, transformation, segmentation, and object detection with full support for logging, testing, and visual debugging. Designed for learning and experimentation, each assignment builds on the last to explore advanced processing pipelines — from flipping and rotating images to detecting shapes using Canny edges and contour analysis.
- Java-based Maven module
- Contains
src/main/javaandsrc/test/java - Uses OpenCV for image processing tasks
- Logging via Log4j2
- Java-based Maven module
- Handles channel nullification and image configuration
- Includes environment-based configuration and logging
- Implements image concatenation, filtering, transformation
- Tests on real-world countryside and urban images
- Applies filters and edge detection (Sobel, Laplacian)
- Demonstrates morphological filtering (erosion/dilation)
- Evaluates kernels of various shapes and sizes
- Visualizes filter effects using original image variants
- Image segmentation and object detection
- Flood fill, rectangle detection, pyramid-based scaling
- Edge analysis with debug visual outputs
- Demonstrates object detection
- Applies Canny algorithm to detect object edges
- Saves each detection stage in a debug directory
- Java 17+
- OpenCV (native bindings)
- JavaFX (optional for GUI/visuals)
- Apache Maven (build and dependency management)
- Log4j2 (logging)
- JUnit 5 (unit testing)
- Image Filtering (Gaussian, Median, Bilateral, Normalized Box)
- Image Transformations (flip, rotate, translate, resize, perspective)
- Image Segmentation (flood fill, thresholding, image pyramids)
- Object Detection (Canny, contour detection, rectangle validation)
- Utilities (ImageIO, configuration loading, logging infrastructure)
- Tests are located in
src/test/javafor each module - Each service has a corresponding test class
- Test resources configured separately under
src/test/resources - Output and intermediate files saved under
processed/orrectangle-detection/folders
resources/images/original— Raw input imagesresources/images/processed— Filtered/transformed outputs- Intermediate files:
1. grayscale.jpg,2. denoised.jpg,3. hist_equalized.jpg...- Help debug each processing stage visually
# Navigate to desired assignment
cd assignment3
# Build
mvn clean install
# Run (example for a main class)
java -cp target/classes app.AppCreated by a student with ❤️ for exploring computer vision concepts using Java and OpenCV.