Ask Your Question

Detect rust using color segmentation

asked 2019-03-08 04:56:21 -0500

Shrijan gravatar image

updated 2019-03-08 04:56:58 -0500


I wanted to detect rust inside a pipe by creating suitable boundary condition. image description

How to determine the proper HSV value for the rusted portion or is there any other better way to detect it?

edit retag flag offensive close merge delete


Unless your rust is very consistent, and your lighting is also tightly controlled, it's probably going to be a good bit harder than just filtering based on color. Rust might look consistently "rust colored" in varying conditions to you (a human) but the image color values can vary drastically. You are on the right track with using a color space other than RGB. Try loading some representative images in a photo editing program and checking the HSV or YUV values...If the hue or UV coordinates are pretty consistent (and dissimilar to the "background" colors) you might have a path forward.

If you have control over the lighting, I'd consider trying various light sources and seeing if rust shows up better with particular light. Say near infrared? UV? etc.

A non-trivial problem, it seems.

swebb_denver gravatar imageswebb_denver ( 2019-03-08 22:29:16 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2019-03-08 22:38:09 -0500

swebb_denver gravatar image

updated 2019-03-08 22:38:44 -0500

Color Constancy

Here is a paper (I haven't read it) that classifies road scenes. Maybe this method could be applied to your situation with some effort. Technical paper (PDF)

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-03-08 04:56:21 -0500

Seen: 343 times

Last updated: Mar 08 '19