I want to use color to detect a white ship.When the ship speed is low ,i can get a good result.But when the speed is high,i can't.Because the ship wake is white,too.I try to use erode and dilate method to remove ship wake,but the result is not good.How can i remove the ship wake.
you can see the pic as follow,the wake is white,so is difficult to segment
ship and wake.Can you help me and show your idea to me.Thanks in advance!!
-
"I want to use color to detect a white ship." As you said yourself, color alone is not sufficient. If all images have nothing else than water + ship, then a proper segmentation (possibly on grayscale img) would be better. – runDOSrun Jul 14 '15 at 09:42
-
1I Think features may help. – Yang Kui Jul 14 '15 at 11:09
2 Answers
I think that you asked a similar question about detecting a ball in such a situation. The answer for this question will also be similar to the answer for that question.
Detect the pixels containing white color using your HSV method.
calculate the optical flow for those white pixels.
The white pixels which corresponds to Ship will have higher velocity than the white pixels which belong to water waves.
you will get a set of pixels with highest velocity (they all belong to the ship). Then, try to find the pixel at the extreme edge (corner pixel of ship) in the direction of motion using the coordinate of pixel. You just need to find the
min(y)
ormax(y)
if the direction is in the y-direction.draw a circle around the this pixel...that will the detection of your ship.

- 5,015
- 8
- 43
- 104
I would be more intent on using the fact that wakes are much more linear than the ship. Or even that the ship is "at the other end of the wake".
A first rough pass of HSV thresholding to get all the "white-ish area", including ship and wake, then try something for identifying and then discarding the lines.
Linear Hough transform could help, provided you can convert your thresholded image into plausible edges, which will need some morphological tweaking.
From there you could virtually draw the wake's line, and half your job is done. The specific border of wake-to-ship will be a tougher problem involving edge detection, but if you only care about that, I think your problem is mostly solved ! :p
Interestingly enough, it's a common enough problem in satellite radar images see my quick Google scholar search. Granted, these images don't have to take into account the ship itself most of the time, and have different noise and image constraint considerations, but you might just get a cool idea or two from their solutions.
For instance : Eldhuset, Knut. "An automatic ship and ship wake detection system for spaceborne SAR images in coastal regions.

- 1,865
- 1
- 13
- 22
-
Thanks for your comment!But I think the wakes look more like blob area rather than line.It's difficult to get lines.Also after i get the many lines, how can i detect the ship?You said "ship is at the other end of the wake" But maybe is not at the other end of the some lines which we got. – GKG DTH Jul 16 '15 at 02:38
-
True enough : ideally you would have the wakes converging on the actual ship, and finding the abstract wake lines (angle + offset of linear equation) would help you discard areas of the image having no ship. The waterskiing in your image won't help though :D – Jiby Jul 16 '15 at 07:51
-