Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. Motion tracking algorythm from Pan and tilt video feed

Motion tracking algorythm from Pan and tilt video feed

Scheduled Pinned Locked Moved Algorithms
helpalgorithms
12 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GDMFSOB
    wrote on last edited by
    #1

    Hi Everyone, I am building a robotic turret with an airsoft gun monted on a set of tank tracks, i have found some code for tracking movement on a video feed from a static camera, the problem is everytime the turret moves to aquire the target the camera moves with the gun screwing up the tracking, what i am looking for is some kind of algorithm that allows for the video feed to track and center the target while sending the commands to the turret to pan and tilt (aiming), the camera is mounted on the barrel for aiming and the gun is mounted on a 2 axis servo system, i dont know what i would call an algorithm like this to look for one. Any help would be greatly appricated. Thanks Andrew

    A R K J 4 Replies Last reply
    0
    • G GDMFSOB

      Hi Everyone, I am building a robotic turret with an airsoft gun monted on a set of tank tracks, i have found some code for tracking movement on a video feed from a static camera, the problem is everytime the turret moves to aquire the target the camera moves with the gun screwing up the tracking, what i am looking for is some kind of algorithm that allows for the video feed to track and center the target while sending the commands to the turret to pan and tilt (aiming), the camera is mounted on the barrel for aiming and the gun is mounted on a 2 axis servo system, i dont know what i would call an algorithm like this to look for one. Any help would be greatly appricated. Thanks Andrew

      A Offline
      A Offline
      Alan Balkany
      wrote on last edited by
      #2

      So you want our help writing an application to shoot people? You're sick.

      G 1 Reply Last reply
      0
      • G GDMFSOB

        Hi Everyone, I am building a robotic turret with an airsoft gun monted on a set of tank tracks, i have found some code for tracking movement on a video feed from a static camera, the problem is everytime the turret moves to aquire the target the camera moves with the gun screwing up the tracking, what i am looking for is some kind of algorithm that allows for the video feed to track and center the target while sending the commands to the turret to pan and tilt (aiming), the camera is mounted on the barrel for aiming and the gun is mounted on a 2 axis servo system, i dont know what i would call an algorithm like this to look for one. Any help would be greatly appricated. Thanks Andrew

        R Offline
        R Offline
        Roger Wright
        wrote on last edited by
        #3

        Calculate the centroid of the target outline relative to the center of the screen, then command the aiming system to move in the directions required to center that point. Remember that the airsoft pellets are ballistic, and will drop with distance; once you have the azimuth on target, you'll need to move the barrel upward to overcome that. This will have the effect of causing your image centroid to appear below the center of the display, if the camera is mounted above the barrel, and above the center if mounted below. If you have room for a laser rangefinder on that rig, use it to paint the target and provide ranging information to adjust for gravitational error. Tack on an anemometer if there's room, too, so you can estimate windage corrections. If you want it to be truly useful, make that video camera an infrared type so you can hunt cats at night. :-D

        Will Rogers never met me.

        G 1 Reply Last reply
        0
        • G GDMFSOB

          Hi Everyone, I am building a robotic turret with an airsoft gun monted on a set of tank tracks, i have found some code for tracking movement on a video feed from a static camera, the problem is everytime the turret moves to aquire the target the camera moves with the gun screwing up the tracking, what i am looking for is some kind of algorithm that allows for the video feed to track and center the target while sending the commands to the turret to pan and tilt (aiming), the camera is mounted on the barrel for aiming and the gun is mounted on a 2 axis servo system, i dont know what i would call an algorithm like this to look for one. Any help would be greatly appricated. Thanks Andrew

          K Offline
          K Offline
          Keith Barrow
          wrote on last edited by
          #4

          :sigh: Other people's jobs are much more interesting than mine....... :^)

          Sort of a cross between Lawrence of Arabia and Dilbert.[^]
          -Or-
          A Dead ringer for Kate Winslett[^]

          G U 2 Replies Last reply
          0
          • R Roger Wright

            Calculate the centroid of the target outline relative to the center of the screen, then command the aiming system to move in the directions required to center that point. Remember that the airsoft pellets are ballistic, and will drop with distance; once you have the azimuth on target, you'll need to move the barrel upward to overcome that. This will have the effect of causing your image centroid to appear below the center of the display, if the camera is mounted above the barrel, and above the center if mounted below. If you have room for a laser rangefinder on that rig, use it to paint the target and provide ranging information to adjust for gravitational error. Tack on an anemometer if there's room, too, so you can estimate windage corrections. If you want it to be truly useful, make that video camera an infrared type so you can hunt cats at night. :-D

            Will Rogers never met me.

            G Offline
            G Offline
            GDMFSOB
            wrote on last edited by
            #5

            the issue is I am able to locate the target as it moves (detection), it draws a square around the target, but as soon as the pan and tilt operations happen to move the target center the camera moves and picks up movement accross the whole screen which makes the entire video feed the target (square changes to the whole screen) this is what i am trying to fix now.... as for range finding i was thinking of using a stereo camera rig and calculating distance to target from the angle offset in each feed relative to the space between the two cameras, first prize for now would be to sort the motion tracking and target aquisition system. but i will look into laser range finding. I didnt think of using a anemometer for windage this would be great as this will be used for outdoor combat. it going to be about the size of a lawn mower when it finished. as for Hunting Cats i happen to have two and dont think they would enjoy being shot at, this will however be used at airsoft games.

            1 Reply Last reply
            0
            • A Alan Balkany

              So you want our help writing an application to shoot people? You're sick.

              G Offline
              G Offline
              GDMFSOB
              wrote on last edited by
              #6

              I would say sick if I was going to strap an ACTUAL gun to the rig, airsoft is a game.

              1 Reply Last reply
              0
              • K Keith Barrow

                :sigh: Other people's jobs are much more interesting than mine....... :^)

                Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                -Or-
                A Dead ringer for Kate Winslett[^]

                G Offline
                G Offline
                GDMFSOB
                wrote on last edited by
                #7

                i wish this was my nine to five, its actually a side home project, in my normal life i build ERP business software for a logistics company.... dead boring...

                1 Reply Last reply
                0
                • G GDMFSOB

                  Hi Everyone, I am building a robotic turret with an airsoft gun monted on a set of tank tracks, i have found some code for tracking movement on a video feed from a static camera, the problem is everytime the turret moves to aquire the target the camera moves with the gun screwing up the tracking, what i am looking for is some kind of algorithm that allows for the video feed to track and center the target while sending the commands to the turret to pan and tilt (aiming), the camera is mounted on the barrel for aiming and the gun is mounted on a 2 axis servo system, i dont know what i would call an algorithm like this to look for one. Any help would be greatly appricated. Thanks Andrew

                  J Offline
                  J Offline
                  jk chan
                  wrote on last edited by
                  #8

                  I have worked on several tracking algorithm. In many algorithm we need to give the boundary of the object to track. So if its not possible in your case, first you need to do some motion segmentation, then you need to track. Tracking is definitely complicated, so if you have time i would suggest you to look into active contours and SIFT feature tracking , otherwise try to implement mean shift algorithm, the problem with mean shift is it is not scale invariant. You also need to predict the camera object movement ( using kallman filter ) Hopes this will give you a very high level introduction. :)

                  If u can Dream... U can do it

                  G 1 Reply Last reply
                  0
                  • J jk chan

                    I have worked on several tracking algorithm. In many algorithm we need to give the boundary of the object to track. So if its not possible in your case, first you need to do some motion segmentation, then you need to track. Tracking is definitely complicated, so if you have time i would suggest you to look into active contours and SIFT feature tracking , otherwise try to implement mean shift algorithm, the problem with mean shift is it is not scale invariant. You also need to predict the camera object movement ( using kallman filter ) Hopes this will give you a very high level introduction. :)

                    If u can Dream... U can do it

                    G Offline
                    G Offline
                    GDMFSOB
                    wrote on last edited by
                    #9

                    Thanks JK, the Kallman Filter approach seems to be the best option, you have definatly given me some good direction, thanks again.

                    J 1 Reply Last reply
                    0
                    • G GDMFSOB

                      Thanks JK, the Kallman Filter approach seems to be the best option, you have definatly given me some good direction, thanks again.

                      J Offline
                      J Offline
                      jk chan
                      wrote on last edited by
                      #10

                      Tell me If you got it working.am just curious. :)

                      If u can Dream... U can do it

                      G 1 Reply Last reply
                      0
                      • J jk chan

                        Tell me If you got it working.am just curious. :)

                        If u can Dream... U can do it

                        G Offline
                        G Offline
                        GDMFSOB
                        wrote on last edited by
                        #11

                        will do.

                        1 Reply Last reply
                        0
                        • K Keith Barrow

                          :sigh: Other people's jobs are much more interesting than mine....... :^)

                          Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                          -Or-
                          A Dead ringer for Kate Winslett[^]

                          U Offline
                          U Offline
                          User 12551176
                          wrote on last edited by
                          #12

                          :)

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups