PythonとOpenCV(cv2)を使用した際に発生するエラー「Invalid number of channels in input image」の原因と対処法について解説します。