Ask Your Question
0

Core inRange

asked 2013-01-16 04:02:14 -0600

muthu gravatar image

I want to threshold a particular coloured object in the image...

The image is in HSV format... In the code using Core.inRange function, i don know the order of the arguments in the scalar..

            Core.inRange(src, new Scalar(H, S, I), new Scalar(H, S, I), dst);

Can any one tell me the exact order...i figured out that the second parameter is Hue... I m using android...

edit retag flag offensive close merge delete

Comments

1

In my knowledge the order is HSI as you said.

Haris gravatar imageHaris ( 2013-01-16 05:03:58 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-01-16 05:01:47 -0600

If you use OpenCV functions for getting HSV image, then the order of components is the same as in color space name: H, S, V. You can see color conversion functions source code in modules/imgproc/src/color.cpp:798.

edit flag offensive delete link more

Comments

My mistake was i didn't convert the image from default BGR to RGB..so the values had been going in the reverse order.

muthu gravatar imagemuthu ( 2013-03-20 23:03:47 -0600 )edit

Question Tools

Stats

Asked: 2013-01-16 04:02:14 -0600

Seen: 4,606 times

Last updated: Jan 16 '13