1 | initial version |
scn typically means "source channels". So it's looking for a source image with 3 or 4 channels. You have the line RGB2GRAY there, which takes it from 3 or 4 to 1 channel. I'm guessing your error is in the cvtColor function. Can't help you past that though. Is your input image grayscale?