Final project for (Computer) Vision and Cognitive System
- numpy
- opencv-python
For each video frame:
Predict a ROI for each painting:
- CLAHE (Contrast Limited Adaptive Histogram Equalization)
- Edge Detection with Sobel
- Bilateral Filtering
- Thresholding
- Morphology Transformations
- Significant Contours (cv2.findContours)
- Contours refining:
- Find Bounding Boxes (cv2.boundingRect)
- Merge overlapping
- Convex hull
- Discard false positives:
- Check dimensions and aspect ration
- Histogram distance & update
Starting from contours found in previous point and considering one contour at a time:
- Polygonal approximation (cv2.approxPolyDP)
- Find lines with Hough transform
- Compute lines intersections
- Average vertices with K-Means
- Order vertices
- Compute aspect-ratio
- Warp perspective
Match each detected painting to the paintings DB:
- Find descriptors with ORB
- Find best matches (BFMatcher with Hamming normalization)
- Find room in which paintings are collocated
Predict a ROI around each person:
-
YOLO v3 (from OpenCV)
For each detection:
- Predict a score for each class
- Take only the score belonging to the person class
- Thresholding
- Non-maximum suppression
-
Discard people in paintings