我開發了一個使用imagesnake的opencv程序,但它適用於少數圖像,但對於其他程序則不適用。我得到以下錯誤:OpenCV Image加載問題
OpenCV Error: Bad number of channels (input image has more than one channel) in cvSnakeImage, file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/opencv/work/OpenCV-2.3.1/modules/legacy/src/snakes.cpp, line 416 terminate called after throwing an instance of 'cv::Exception' what():
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_opencv/opencv/work/OpenCV-2.3.1/modules/legacy/src/snakes.cpp:416: error: (-15) input image has more than one channel in function cvSnakeImage
中止陷阱
有沒有人見過這個問題或知道如何解決它?