Bug in CV_IS_SUBMAT macro, fails to expand.
Seems within core/cvdef.h there is a typo within this macro, looking at the relationships between the flags and macros I believe the author's intent was to reference CV_SUBMAT_FLAG instead of CV_MAT_SUBMAT_FLAG as it is undefined. I'm looking to verify this is indeed an issue with others before I submit this defect.
What is your opencv version your system and compiler?
i'd think, you are right about it .
still, i can't find any occurrence of
CV_IS_SUBMAT
in the whole codebase, so it's likely never used(and that's why noone complained before...)
(it seems,
CV_IS_MAT_CONT
is used instead mostly)nonetheless, report it here: https://github.com/opencv/opencv/issues
@sumoix, what about the issue ?
I will submit the bug sometime this weekend.
I am running a snapshot from the main opencv 3.x trunk. My compiler is clang on OSX el capitan with c++11 enabled.
btw, mind telling us, how you dicovered this ? how did it get in your way ? would it be specific to clang/OSX ?
Discovery: I was implementing a user driven routine which allowed users to nest detection algorithms within each other. For example user only wants to identify objects that move initially, then take those rectangles of interest and detect sub objects and so on until the final object has been identified then perform some action based on those findings.
The problem I was trying to solve was nested algorithms that use the same canvas (gray images) and prevent unnecessary conversions from color to gray. I found this macro could be used to identify if it was a sub matrix instead of comparing the number of channels and rbg thresholds for a gray image.
I have then found an alternate solution that works very well. But I figured this bug should be reported.
This is not a platform specific bug