opencv linux和windows,Linux中的OpenCV错误,但在Windows中有效

当我在Linux中运行这个文件时,我得到了以下错误。但是同样的代码可以在Windows中使用opencv2.4.11OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /home/travis/miniconda/conda-bld/work/opencv-2.4.11/modules/imgproc/src/color.cpp, line 3739

Traceback (most recent call last):

File "testImplementation.py", line 206, in

GestureDemo().run()

File "testImplementation.py", line 200, in run

super(GestureDemo, self).run()

File "/home/kathirdrone/Desktop/ARDRONE /GestureDetection/GestureDetection/current_src/eventBasedAnimationClass.py", line 47, in run

self.onTimerFiredWrapper()

File "/home/kathirdrone/Desktop/ARDRONE /GestureDetection/GestureDetection/current_src/eventBasedAnimationClass.py", line 30, in onTimerFiredWrapper

self.onTimerFired()

File "testImplementation.py", line 125, in onTimerFired

self.gp.process()

File "/home/kathirdrone/Desktop/ARDRONE /GestureDetection/GestureDetection/current_src/GesturesApi.py", line 297, in process

self.threshold()

File "/home/kathirdrone/Desktop/ARDRONE /GestureDetection/GestureDetection/current_src/GesturesApi.py", line 111, in threshold

grey = cv2.cvtColor(self.original, cv2.COLOR_BGR2GRAY)

cv2.error: /home/travis/miniconda/conda-bld/work/opencv-2.4.11/modules/imgproc/src/color.cpp:3739: error: (-215) scn == 3 || scn == 4 in function cvtColor

有没有解决这个问题的线索?在

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值