Microfilms, Can i use Computer Vision to identify the frame exists completely within monitor?

My task is to find an innovative way to convert microfilm to a PDF file. I have a software which allows user to rewind and forward a microfilm roll connected to a scanner, from a laptop. The user feeds the microfilm roll on a machine connected to laptop and press the start button from the laptop to display the film frames on the laptop monitor, there is a provision to rewind and forward the film frames and save it to pdf.

Problem statement:
Each roll has 400+ frames at a gap of 370 millisecond, there is a play, forward, rewind and a stop button available for robot to move to next film. This navigation takes approx 370 milliseconds ( varies for different microfilms)

steps for Navigation: Press forward> delay 370 millisecond > press stop button > press save to PDF.
Once i set the workflow it is able to process all the 400+ records to pdf.

However if the microfilm roll is changed the gap between each frame may change to 400 or 350 millisecond.

Is there any activity which can help identify the frame is contained completely within the screen, (not cut through or half way on the monitor screen).

Can computer vision activity identify if the frame exists completely within the screen. if yes, i can handle this by pressing forward or rewind button to include the film completely inside the monitor screen before i print to PDF.

Anybody with computer vision and Monitor events activities experience can share any suggestion or a solution please.