Just I verified picnic application with converting from RGB to Gray scale, it works fine, so coding logic should be correct.
Are you getting any error in the result of this function?
For rgb24, it would look like this:
if( 3 != 3 || 3 != 4 )
This will always return -1 !
Naveen checked in Picnic, but I cannot find any grayscale functions in Picnic.
I also searched for ToGray() references in the source code of Picnic, but I didn't find any references except the implementation.
Naveen, can you clarify?
That's true. We will fix it. Probably, there were assertions before with "assert(NChannels==3 || NChannels==4)". When substituting with "if", the expression must be turned inside out completely "NChannels!=3 && NChannels!=4"