how to get ffmpeg edge detection filters like sobel and prewitt to work correctly, courtesy of @robp: