Detect rust using color segmentation
Hi,
I wanted to detect rust inside a pipe by creating suitable boundary condition.
How to determine the proper HSV value for the rusted portion or is there any other better way to detect it?
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.