Andrew Jackson
Andrew Jackson

Reputation: 29

OpenCV Image Load Issue

I have developed an opencv program using imagesnake, but it works for a few images but for others it does not. I get the following error:

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

Abort trap

Has anyone seen this issue or knows how to resolve it?

Upvotes: 0

Views: 208

Answers (1)

Dan
Dan

Reputation: 1486

Looks like you are trying to load an color image and cvSnakeImage only accept one-channel images, i.e: black and white images.

Are the black and white images the only ones that work?

Upvotes: 1

Related Questions