RoI Extraction Fails When Lecture Slide Fills Entire Frame
Issue Description
This bug originates from the implementation of extract_roi_from_image_for_slide(), which was introduced in #1 (closed). While the function successfully isolates lecture slides in mixed-content frames, it does not handle cases where the slide fills the entire image (without additional elements like a professor, chat window, or overlays), leading to detection failures.
Because the slide covers the entire frame, there are no distinguishable edges, causing the contour extraction to not detect the slide as a rectangle.
Steps to Reproduce
Use an image where the lecture slide completely fills the frame.
Apply the extract_roi_from_image_for_slide() function.
Exmaple:
Expected Behavior
The algorithm should still detect the boundaries of the slide and correctly extract the Region of Interest (RoI), even if no additional elements are present in the frame.
Actual Behavior
The Canny edge detection fails to highlight meaningful edges.
The contour extraction step does not return usable results.
The algorithm cannot determine a valid bounding rectangle for the slide.
Potential Solutions
Use template matching to identify the slide content boundaries.
Add padding to the image to ensure the slide has visible edges.