error: (-215) scn == 3 || scn == 4 in function cv::cvtColor
时间: 2023-10-20 11:31:04 浏览: 264
VC颜色区分故障
5星 · 资源好评率100%
这个错误的含义是在cv::cvtColor函数中,出现了(-215) scn == 3 || scn == 4的错误。根据引用,这个错误通常是由于代码中的重复导致的。引用中提到了一种可能的代码重复情况,即在读取图片和转换为灰度的过程中重复使用了cv2.cvtColor函数。另外,引用也提供了一个出错的代码示例,其中cv2.imread函数的mode参数不正确。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [[解决]open cv error: (-215) scn == 3 || scn == 4 in function cvtColor](https://blog.csdn.net/weixin_41598714/article/details/106168329)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Python openCV:error:(-215)scn == 3 || scn ==4 in function cv::cvtColor](https://blog.csdn.net/ibaymin/article/details/74778767)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文