Ask Your Question
0

How to get minimus & maximum bounds of the color space

asked 2013-05-23 08:36:57 -0600

wuling gravatar image

As i know ,please read http://answers.opencv.org/question/13715/how-to-use-inrange-at-different-color-space-and/ I must find the min & max bounds of the color space. So how to find min & max bounds of the LAB , HLS,HSV Color space?

edit retag flag offensive close merge delete

Comments

the docs for cvtColor have a lot about that

berak gravatar imageberak ( 2013-05-23 16:00:25 -0600 )edit

mm,thanks:)

wuling gravatar imagewuling ( 2013-05-23 18:42:57 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-05-23 09:13:56 -0600

Notas gravatar image

Convert the image into the color spaces you want, split them into their channels and then simply find the min/max value by using the minMaxLoc function.

edit flag offensive delete link more

Comments

But the method is only to get this image max and min bounds,isn't!

wuling gravatar imagewuling ( 2013-05-23 09:18:48 -0600 )edit

Please explain this in a better way, because I have no idea what you mean.

Notas gravatar imageNotas ( 2013-05-23 09:31:40 -0600 )edit

If i have a lot of pictures and using this way , some parameters maybe out out range.for example,in pictures one, i find max & min RGB are all 20,200 and use this value to set parameters. But in picture two, max & min value become to 25,180, then maybe happen error.I think opencv should bulidin constants value:)

wuling gravatar imagewuling ( 2013-05-23 10:21:00 -0600 )edit

As I know, in labview vision, the min & max bounds of the Color Space RGB,HSL,SHI,HSV are all 0 to 255.But I am not sure the other color space.

wuling gravatar imagewuling ( 2013-05-23 11:36:19 -0600 )edit

Question Tools

Stats

Asked: 2013-05-23 08:36:57 -0600

Seen: 2,973 times

Last updated: May 23 '13