Real time ships tracking

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Locked
hoangdado
Posts: 4
Joined: 2014-03-07T21:06:55-07:00
Authentication code: 6789

Real time ships tracking

Post by hoangdado »

Hello all,

I'm looking for a method for tracking ships on a video.
For examples:
Link 1: http://www.youtube.com/watch?v=9wP8sJFNr4g
Link 2: http://www.youtube.com/watch?v=mom9zKHkpMo
Link 3: http://www.youtube.com/watch?v=zGSCB_1DH9I

My expectation is tracking 12 frames/seconds and the accuracy is greater than 70%. I have heard about using learning-based detecting algorithm. However, the video in link 1 and link 3 are very poor quality, so I think the learning-based algorithm will not have good performance in this case.

Can anyone give me some advices for this task? Thank you so much!

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Real time ships tracking

Post by snibgo »

I know nothing about current systems for machine learning.

I would approach the problem as image segmentation. What elements do individual frames contain? Sky, sea, horizon, boats, posts, gun fire (?), etc.

Identifying and eliminating sea and sky is fairly easy, from the colour and lack of detail.

Perceptual hash, a very recent addition to IM, may help. See viewtopic.php?f=2&t=25061
snibgo's IM pages: im.snibgo.com

hoangdado
Posts: 4
Joined: 2014-03-07T21:06:55-07:00
Authentication code: 6789

Re: Real time ships tracking

Post by hoangdado »

Thanks snibgo,
I have never heard about perceptual hash before. Actually, I'm a newbie in computer vision. What I mean about this algorithm is that it is used to compare two images. So we can use it for tracking (not for detection). Does what I have said match your thought?

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Real time ships tracking

Post by fmw42 »

For tracking. you can cut out one ship to its bounding rectangle and then use compare with -subimage-search to try to locate where the smaller reference cut out is located in the each of the frames. Note however, this is not rotational or scale invariant.

See
http://www.imagemagick.org/script/compare.php
viewtopic.php?f=1&t=14613&p=51076&hilit ... ric#p51076 (but new syntax requuires -subimage-search to be added)
http://www.imagemagick.org/Usage/compare/

hoangdado
Posts: 4
Joined: 2014-03-07T21:06:55-07:00
Authentication code: 6789

Re: Real time ships tracking

Post by hoangdado »

I see what you meant fmw42. Your ideas will help me tracking a ship after it was detected. However, my proplem is detection , especially in real time. Actually, I have thought that we can use a detector that is time-consuming to detect ships then use a low complexity matching or compare algorithm to tracking those ships. However, in my videos, ship are moving continuously and the camera is also moving. Therefore, after the detecting time, the ships may have moved to unpredictable position far away or may disappear. Furthermore, new ships may appear at any time, so we still need to re-detect for a new ship. These problems are making me feel this task is difficult. Therefore, I'm looking for an algorithm to detect ships on one frames completes before the next frame arrives.
Thank you a lot!

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Real time ships tracking

Post by fmw42 »

hoangdado wrote:I see what you meant fmw42. Your ideas will help me tracking a ship after it was detected. However, my proplem is detection , especially in real time. Actually, I have thought that we can use a detector that is time-consuming to detect ships then use a low complexity matching or compare algorithm to tracking those ships. However, in my videos, ship are moving continuously and the camera is also moving. Therefore, after the detecting time, the ships may have moved to unpredictable position far away or may disappear. Furthermore, new ships may appear at any time, so we still need to re-detect for a new ship. These problems are making me feel this task is difficult. Therefore, I'm looking for an algorithm to detect ships on one frames completes before the next frame arrives.
Thank you a lot!
IM (and especially compare) will not likely provide real-time processing that you need.

hoangdado
Posts: 4
Joined: 2014-03-07T21:06:55-07:00
Authentication code: 6789

Re: Real time ships tracking

Post by hoangdado »

I have not try it. So may be your ideal is true, fmw42. But what do you think is the best approach for detection in this case. I think the the idea of snibgo is good.

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Real time ships tracking

Post by snibgo »

If you want real-time as it happens, then you will need firmware in the camera.

If you want real time but post-processing, ie the video has already been captured and can be analysed later by computer, then building a filter within ffmpeg or one of the professional video editing tools (Avid etc) may do what you want.
snibgo's IM pages: im.snibgo.com

Locked