Previously, the first frame of a video was used to decide how much to crop the image by. If the image contained mostly dark pixels in the center, we would sometimes crop the image to size 0. With this fix, we decide the crop based on the mean of all of the frames.
Also added a test that fails with the previous method and passes with the new one.
Previously, the first frame of a video was used to decide how much to crop the image by. If the image contained mostly dark pixels in the center, we would sometimes crop the image to size 0. With this fix, we decide the crop based on the mean of all of the frames.
Also added a test that fails with the previous method and passes with the new one.