9
\$\begingroup\$

I want to record some lectures I am giving next semester. I have a video camera, and can change its direction using a servo of some sort. However I have no idea how to detect where I am. Me carrying some broadcasting device would be fine. Mostly the sensitivity should be able to determine if I am in the left or right side of the room, but I do not need much more than that.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ The easiest way would be to use a computer and a webcam. The computer runs motion tracking along where your head and shoulders are then controls the servo. The tracking algorithm is as simple as looking for the mean of the location of the pixels with the most change....Or do you not have a computer available? \$\endgroup\$
    – Chris H
    Nov 29 '10 at 6:57
  • \$\begingroup\$ @Chris H, if you have info on such an easily available functional program I think it would make a perfect answer. \$\endgroup\$
    – Kortuk
    Nov 29 '10 at 16:01
  • \$\begingroup\$ Well, I don't know of any specifically, but consider OpenCV. You can apply a crop then a motion tracking function. Cropping is just to make sure that you don't pick up other things moving. It should come out to about 100 lines of code total. Probably easier to code it yourself than to configure and learn another program, especially since you need to interface with a motor afterwards. \$\endgroup\$
    – Chris H
    Nov 29 '10 at 17:05
  • \$\begingroup\$ Could someone tell me what the right way to act is if there are two answers given that are equally valid; do I just choose one at random to be the answer? \$\endgroup\$
    – kasterma
    Dec 3 '10 at 4:53
  • \$\begingroup\$ @kasterma: Yes, though if you actually implemented one instead of another, I'd pick that. You can always vote them both up. \$\endgroup\$
    – Nick T
    Dec 3 '10 at 5:54
9
\$\begingroup\$

You could wear some simple IR LEDs, you could then also place a number of IR receivers, just simple IR photo-diodes would work, with a narrow viewing angle.

If you place these around the base of the camera and then have a microcontroller read which one has the greatest signal you can point the camera towards the IR source.

Sounds complicated, but it is very simple, and does not require a computer. The hardware is easy to do, although you will probably find in noisy environments (bright light) you will want to modulate your IR to get away from broadband noise you receive.

\$\endgroup\$
6
  • \$\begingroup\$ I've tried this actually, works unless there are large windows. \$\endgroup\$
    – Chris H
    Nov 29 '10 at 17:07
  • \$\begingroup\$ @Chris H, a large window is just a challenge for me to get a brighter IR emitter. Often modulation can significantly help with the background IR problem of Sunlight or florescent lights. \$\endgroup\$
    – Kortuk
    Nov 29 '10 at 17:09
  • \$\begingroup\$ This sounds like a very nice solution, I do not know what you mean when you suggest I modulate my IR though. Do you mean I should pulse the IR LED at a known frequency, and then try do detect just that frequency with the receiver? \$\endgroup\$
    – kasterma
    Nov 29 '10 at 18:23
  • \$\begingroup\$ @kasterma, Yes, that is what I mean. You pulse the IR LED at 40KHz for example, and then make a filter at 40KHz on the receivers so that you ignore the broadband IR the Sun and lights emit. You may need to adjust the frequency to avoid the frequency that your florescent lights give off. you can try it without this modulation first to see if it meets specs as it is easier to do. \$\endgroup\$
    – Kortuk
    Nov 29 '10 at 20:17
  • \$\begingroup\$ I've seen this done with a Nintendo Wii. Very cool. +1 \$\endgroup\$
    – tyblu
    Dec 3 '10 at 5:33
7
\$\begingroup\$

What you are looking for may be related to "blob tracking". It's a commonly used technique in robotics and vision processing.

Depending on your programming chops, you can use OpenCV (open source computer vision libraries) available in both C++ and Python. Other languages may have libraries that support blob tracking. I believe that LabVIEW and Matlab also have libraries to support this.

Generally, the setup will be a computer processing the video and finding a blob (you) of a particular color. You can then use the information of the position of the blob in the camera frame to determine where to point the camera. If you are, for example, driving the servo on the camera with an Arduino (or any other microcontroller), you can send commands via the serial port to update the desired position of the camera. When the blob leaves some desired "box" in the center of the frame.

If you want, you can do some more clever tracking by implementing some combination of Proportional, Integral, and Derivative control (PID, if you are searching around the internet), to try and keep yourself centered in the frame, but this may be more than you need for your application.

Edit: A bit of searching yielded this result: Creative Applications. This is more or less the solution that I explained.

\$\endgroup\$
6
  • 4
    \$\begingroup\$ Time to buy some "uniquely colored" shirts. \$\endgroup\$
    – Nick T
    Nov 29 '10 at 16:27
  • 2
    \$\begingroup\$ Upon further consideration, I believe that Kortuk and user1498's solution of IR LEDs and sensor would be a more robust approach. This is true because of the point that Nick T raises, the color space is already pretty crowded, so picking yourself out would be difficult. \$\endgroup\$
    – mjcarroll
    Nov 29 '10 at 17:08
  • \$\begingroup\$ that sounds like an engineer backing down from a problem. \$\endgroup\$
    – Kortuk
    Nov 29 '10 at 17:10
  • \$\begingroup\$ @Kortuk, Not necessarily backing down. I still think that my solution may be the "best," as far as an entirely self-contained system (no external sensors, no more hardware than explicitly stated in the problem statement). As far as ease-of-implementation and robustness (vision algorithms being somewhat finicky), I think that your solution would be much better. \$\endgroup\$
    – mjcarroll
    Nov 29 '10 at 17:16
  • \$\begingroup\$ I knew what you meant, I think the hardware solution is more self contained but there is a large tradeoff to both. \$\endgroup\$
    – Kortuk
    Nov 29 '10 at 17:36
3
\$\begingroup\$

Wearing one or more IR led's might let a camera like a wi controller track you

\$\endgroup\$
2
\$\begingroup\$

Sounds like an ideal job for a Kinect and some processing software - it can separate subjects with the 3d info, has pan-tilt motors and a video output.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I agree this may be the most straight forward but not the cheapest \$\endgroup\$ Nov 30 '10 at 15:05
2
\$\begingroup\$

This is why grad students were invented. I'm sure you could do this electronically eventually, but there would have to be a lot of lectures before it is worth doing that compared to having someone with a brain handle the camera.

\$\endgroup\$
1
  • \$\begingroup\$ Plus beer is cheaper than electricity. \$\endgroup\$ Sep 26 '11 at 7:10
0
\$\begingroup\$

I am the person who asked this question, and I really like both the OpenCV answer and the IR led answer and will be playing with them both. At this point both have some issues for me though: my IR led order is getting delayed, and my webcam is unwilling.

That being the case my eye fell on an LV-Maxsonar EZ that I bought to play with a little while ago. I never really got to it, but now it seems like it might give rise to a decent solution here. I am the only person moving in front of the room, so no interference, and no computer needed either.

This device gives distance measurements in a specific direction. If this distance changes someone moved in front of it, and the camera should move in the direction that that sensor is pointing.

\$\endgroup\$
0
\$\begingroup\$

Check out the PrimeSense devkit (the makers of the Kinect)

The manufacturer released the Kinect's (and DevKit) Windows and Unix drivers here: http://www.openni.org/

\$\endgroup\$
0
\$\begingroup\$

Tracking IR splash (and filtering it from the camera, the room's insolation agreeing) give you and the students a good chance at ADR work that helps put you and your chosen context in zone zero. That said I would have probably have drawn from a bundled webcam application well-reviewed on Cnet.com (or another critical venue, Amazon, Acer Support or otherwise) or Camtasia and used that as directed.

\$\endgroup\$
0
\$\begingroup\$

Have a look at motion, specifically, the motion tracking feature.

\$\endgroup\$
1
  • \$\begingroup\$ I would be interested to know more about motion, but just giving us a link to a website does not provide an answer, it provides the reference for an answer. What is motion, what does it do? \$\endgroup\$
    – Kortuk
    Sep 24 '11 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.