我需要将透明像素设为白色,将非透明像素设为黑色。
我尝试使用此命令,但它只将透明像素转换为白色:
! ffmpeg -i /content/Frames/0471.png -filter_complex "color=white,format=rgb24[c];[c][0]scale2ref[c][i];[c][i]overlay=format=auto:shortest=1,setsar=1" /content/output.png
有什么方法可以将背景设置为黑色并覆盖白色(透明像素),以便我可以将图像用作遮罩?