findContours incorrect?
chriship opened this issue · comments
This may be me being stupid but in the findContours method you have the following:
if(trackingColorMode == TRACK_COLOR_RGB) {
//do stuff
} else {
if (TRACK_COLOR_H) {
offset[1] = 255;
offset[2] = 255;
}
if (TRACK_COLOR_HS) {
offset[2] = 255;
}
//more stuff
}
But shouldn't it be:
if(trackingColorMode == TRACK_COLOR_RGB) {
//do stuff
} else {
if (trackingColorMode == TRACK_COLOR_H) {
offset[1] = 255;
offset[2] = 255;
}
if (trackingColorMode == TRACK_COLOR_HS) {
offset[2] = 255;
}
//more stuff
}
So that the offset is only changed if the trackingColorMode is H or HS?
omg. excellent find. this explains why TRACK_COLOR_HS
never seemed any different than TRACK_COLOR_H
! this was leftover from an old switch
statement i think.