PySceneDetect icon indicating copy to clipboard operation
PySceneDetect copied to clipboard

Dissolves/Fade to white?

Open tago-SE opened this issue 5 years ago • 1 comments

Does PySceneDetect have a problem when a image dissolves or fades into white?

I was using the code provided in the python example usage: https://pyscenedetect.readthedocs.io/en/latest/examples/usage-python/

The intro started with a fade-in to white and ended with a fade-out from white. This was never detected and the whole scene was missed. image Any advice on how to better detect dissolves?

tago-SE avatar Dec 12 '19 14:12 tago-SE

Slow dissolves in general are not well suited to being detected using the detect-content method. That method works by looking for abrupt changes in the HSV colorspace above a certain threshold. There have been discussions in the past about how to best detect dissolves and fades before, #62 for example.

You might try using detect-threshold if you know you are always going to looking for fades to/from a pure white and see what your results look like there.

wjs018 avatar Jan 24 '20 19:01 wjs018

I think ThresholdDetector should add a switch. For blackframe, use if frame_avg < self.threshold:. For whiteframe, use if frame_avg > self.threshold:.

jihh avatar Nov 17 '22 05:11 jihh

For v0.6.2 you can specify if you want to use either methods with ThresholdDetector, and can also have both by combining two instances of ThresholdDetector each using the other method.

Breakthrough avatar Feb 12 '23 02:02 Breakthrough