fix signedness error

OpenCV's automatic builds don't care if you store an unsigned int into
an int, but they don't want you to compare signed with unsigned. Does
that make sense?