PySceneDetect
PySceneDetect copied to clipboard
Dissolves/Fade to white?
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.
Any advice on how to better detect dissolves?
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.
I think ThresholdDetector should add a switch.
For blackframe, use if frame_avg < self.threshold:.
For whiteframe, use if frame_avg > self.threshold:.
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.