cvInRangeS method for HSV colorspace is used like:
cvInRangeS(imgHSV, cvScalar( hMin,sMin,vMin),cvScalar(hMax,sMax, vMax),imgThresh);
For hue value we generally use a range between two numbers, a pair of small and big one like $(10-50)$, which means $10,11,12...48,49,50$ .
Sometimes I need to use a reverse range for red colors. By "reverse range", I mean a range between a big and a small number like $(170-10)$ which loops at the value of $180$: $170,171,172 ... 179,180,0,1,2,3 ... 8,9,10$).
How do I adjust this reverse range to
cvInRangeS method? Can anyone explain how to make this work?