Ask Your Question
0

how to detect the color of a region is black?

asked 2016-09-30 12:10:00 -0600

greenworld gravatar image

Dear everyone, Could you please help to detect a region whether it is black or not from a RGB/HSV image? Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-09-30 16:39:27 -0600

Tetragramm gravatar image

If you look at what the HSV colorspace is, it should be pretty obvious. Take the V channel (or covert RGB to gray, basically same thing) and look for very low values.

Exactly 0 is perfect black, and some threshold above is what appears black to you. You have to manually pick that threshold, there's no exact value.

edit flag offensive delete link more

Comments

Dear Tetragram, if the image in an environment with brightness, can you suggest any method to recognize the region (like without brightness circumstances), eliminate all glare. Thank you so much!

greenworld gravatar imagegreenworld ( 2016-10-01 05:33:43 -0600 )edit
1

What you have said could mean many things. Could you post an example picture of before/after for what you mean?

Tetragramm gravatar imageTetragramm ( 2016-10-01 06:35:07 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-09-30 12:10:00 -0600

Seen: 162 times

Last updated: Sep 30 '16