Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help tracking a person as he moves.


I would appreciate any help.
What I am trying to do is track a basketball player's movement as he moves around. The camera would be on the pole about chest level and will have the ability to rotate. I wa s thinking that it would be easy if the player wore a bright green pinny and I would track the color. Idealy I would like to somehow keep the colored pinny in the center of the image from the camera so as the player moves, the camera will rotate and track his movements. I am new to the Vision software and would appreciate guidance in accomplishing my task.

0 Kudos
Message 1 of 12
(4,825 Views)
jleeboy17

       That task is certainly attainable using NI-IMAQ and Vision.  Generally, what you'd do is like you said, have the player wear a distinctive colored jersey. Then use color thresholding to isolate the color.  That easy right?

       Realistically, you'll be the one that develops this. We can be here to offer advice and to help if you get stuck or encounter errors.  If this should happen everyone reading your post would appreciate detailed information on what has happened, what you are trying to do, and how.  Information on equipment is helpful too and probably necessary.

    You are going to get a response proportional to the amount of information you supply.  A very general posting will get a very general response.

     That said, do you have any equipment or were you looking for equipment?  Do you have any software already or are you looking for this?  How about a framegrabber? What stage of the project are you at?  What advice are you looking for?

     It sounds like you are just starting.  You'll need a camera and a framegrabber to bring the signal into a computer. Make sure the that the camera and the framegrabber are the same generic kind and will work together. You can get help with cameras and framegrabbers at www.ni.com/vision. Next you'll need software..are you looking to use LabVIEW or something else? The could be accomplished with LabVIEW and the Vision Development Module.  Also, if you are needing the camera to move you might be able to find a camera with this "following" as a mode that you could set; otherwise, you'll need to design a motion system and find your own motors.  That is a whole different conversation.  I would suggest giving our sales force a call after you do a little research.  They'll be able to help you narrow down what you need and can answer a lot of general questions.  You can get in touch with them at (888) 280-7645.  Anyway, let us know if you have any further questions.  Thanks

John H
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 12
(4,808 Views)
Yes I am completely new to vision. I apologize if my posts are not very specific.

For equipment we have a Logitech Quickcam 4000. I read on a different post that this camera will work with the correct driver, The software we are going to use is LabVIEW mostlikely. We do not currently have a framegrabber. Is it necessary for us to have one? The stage of our project that we are in is still the research phase. Vision was one of our possible solutions to being able to see where the player is.

I guess for now I need to know if accomplishing our task is possible without a framegrabber for our budget is limited.
0 Kudos
Message 3 of 12
(4,802 Views)
Hello--

      Well, it is certainly possible.  I looked up that camera and it appears to be a USB webcam.  is that correct?  We do offer a driver for these types of cameras to interface with LabVIEW. This dirver is not really a driver, it simply makes activex calls to the Windows driver.  Since it isn't really a driver it is available as a free download on our DevZone.  The catch is to accomplish some of the features that it does, you'll need to have NI-Vision software.  This is not a bad thing though, you would need this software (available as part of the Vision Development Module) for any of the processing of the image, anyway.   IMAQ simply acquires images, processing is all done with Vision.
    So the good news is that this will simplify what you need for this project should you choose to work with our products.  USB cameras do not need framegrabbers, so you are good there. All that you will really need is LabVIEW, the NI-IMAQ for USB Driver, and the Vision Development Module.
    You also mentioned that you'd like the camera to follow the player.  Does this camera have any motors with it?  it didn't look like it.  Some cameras have this functionallity (built in motors) but if not you'll have to get a couple of small, probably stepper, motors. Figure out a way to mount them to control the stage/camera, then a drive and a motion card to interface that with LabVIEW. 
    For further research you can go to www.ni.com\motion or www.ni.com\vision to learn more about all of our products in these areas.  But do some research from these ideas and reply back and we can help you narrow down what you may need to acomplish this.

Thanks

John H

John H.
0 Kudos
Message 4 of 12
(4,778 Views)
Yes the camera i have is a usb and i have found the drivers i need to be able to use usb cameras. I made one mistake on my previous post the software i intend to use if viewbuilder 2.6.
0 Kudos
Message 5 of 12
(4,754 Views)

Hi jleeboy17,

Just to verify, will you be using Vision Builder AI or ViewBuilder?  This is important, since Vision Builder AI (VBAI) is made by National Instruments, and ViewBuilder is not.  Assuming you will be using VBAI, please be aware that it is not designed to acquire images from USB cameras with the IMAQ USB driver.  In my opinion, your best option with the USB driver would be to use LabVIEW.  LabVIEW (along with the Vision Development Module) has the same capabilities as VBAI, although the programming is more involved.

Also, will you be needing to use motors to control the position of your camera?  If so, then you would probably want to use a motion controller card, which can be easily interfaced with LabVIEW.  John will be out of the office for the next two weeks, so please let me know if you have any further questions on this, and I'll be happy to help.

Chris M.
Applications Engineer
National Instruments

0 Kudos
Message 6 of 12
(4,730 Views)
CMal,

Thank you for your support. Unfourtuneately the software that my team is limited to is VBAI. This is a year long school project. I am positive that we received this product from NI. Just so you know this program is part of the Project Lead the Way school program. We have a very limited budget so getting new software is out of the question. We have a usb camera but we may be able to obtain a firewire camera to use it with VBAI. As far as moving the camera we are still researching that area however our budget would not allow us to use your hardware or software for that application.

The problems we are facing is
1. Figureing out how to acuire our images. We have a usb but from what you said and what i found in a different thread this would be difficult.

2. Figureing out how to use the VBAI software. We are completely new to Vision and there is very little information on how to use VBAI.

Thank you
0 Kudos
Message 7 of 12
(4,726 Views)
jleeboy17,
 
It sounds like the best option would be to use VBAI with a firewire camera.  The only alternative would be to use LabVIEW with a USB camera (Since you are at a university, you might actually have access to LabVIEW, but I am only guessing).  The next step will be to get familiar with the VBAI software.  Here are a couple resources to learn more about it:

 

There are also some examples that install with VBAI, which should be helpful in getting started.  Please let me know if this is helpful.
 
Chris M.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 12
(4,720 Views)
Thank you the video was very helpful on the basics of VBAI

Before i ask my next question i think i should clearify what it is i am trying to do. My task is to be able to tell from what angle someone is from a basketball hoop. So i need to be able to "track" the person from 0-180 degrees. (with being right infront of the hoop as 90) My team is planning on making the person wear a bright colored pinny and we would make the camera follow that color. I was thinking of doing this by keeping the pinny in the center of the camera's image at all times. This would require the camera to rotate however we do not have the budget to purchase any more NI equipment. I was thinking of the possibility of using more than one camera to view 180 degrees at the sametime however once again we may not be able to afford that many.


Do you have any suggestions for us anything would be greatly appreciated.
0 Kudos
Message 9 of 12
(4,717 Views)

Instead of moving the camera, I would use a very wide angle (fisheye) lens that could cover close to 180 degrees.  It would be easier to locate the color and determine the angle than moving the camera around.

The only problem is that you need a camera with a removable lens, and USB cameras don't typically let you change the lens.

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 10 of 12
(4,690 Views)