simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to emulate this tracking system

Mon Jun 17, 2013 11:43 am

I'm thinking of trying it as the tracker (to minimise hardware effort) and see how it goes

Once I've got the tracking done, we'll have to see whether I use the RPI camera to do all the recording or just use the tracking mech to move a an actual bought camera/ipod

But its the tracking that gots to be done first :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: How to emulate this tracking system

Mon Jun 17, 2013 12:02 pm

I've seen the iris system - it's a line of IR emitters in the neck cord on both sides with wide angle of view so you can still see them from the back of the cord when the teacher is turned away. If you flash them at half your camera frame rate you should see them appear in every other frame which should mean a simple low res subtraction from one frame to the next should detect them in amongst the noise. You'll need to remove the IR filter from the camera though (you could even put an IR pass filter in there to get rid of visible light). You might be able to use one IR camera with a wide angle view to map the room and a couple of unmodified cameras closer to the front which use a bit of trig (you did say you were a maths teacher?) to work out where to point.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to emulate this tracking system

Tue Aug 13, 2013 10:36 pm

Do you think you'll be using the webcam to detect the IR pendant, or is the webcam for filming and you're detecting with the photodiode idea?
Webcam to detect pendant - turning an IPod type camera sitting on top of a stepper motor.


I've bodged together my stepper motor code from my ScratchGPIO project with some face recognition code that uses OpenCV and mounted a webcam on a stepper and got it so it tracks my ugly mug swaying back and forwards.

Next step to get it to track something like a bright orange sticker on a dark t-shirt at a distance to prove that bit of the concept and then its off to CPC later to grab some bright IR diodes

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

cabe
Posts: 24
Joined: Sun Jan 08, 2012 2:54 pm

Re: How to emulate this tracking system

Tue Aug 13, 2013 11:34 pm

How much resolution in the video do you need? Also the motion of the platform will not be smooth with simple servos

I am all for cool projects, but the simple way off the top of my head is to record the video as a wider shot and then just window in on the teacher at the edit stage. Or you could just let them wander around the screen.

PiGraham
Posts: 3778
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How to emulate this tracking system

Wed Aug 14, 2013 5:56 am

For IR spot taking the Wii camera is a good choice because it is designed to track LED spots. However, it does get confused by sunlight or other strong IR sources. It will be much better than photo diodes.

OTOH You can statically reduce sensitivity to ambient sources of you modulate the LED and file the signal. Still, detecting the relative of brightness of a small led in a bright room with a 2 pixel camera is a challenge!

If you can modulate the led snchronous with sensor frame rate, so that it is on for one frame, off for the next then frame subtraction will give good signal to noise ratio. That isn't easy, maybe even impossible to do with PiCam or a cheap usb cam. There are cameras that can do that, but not within your budget.

Another possibility is face tracking. There are various projects out there that use OpenCV to find and recognise a face. Processing has a module to do that. Both frameworks run on the Pi.

Another way is to wear a maker such as a QRCode and use position data from a code reader libraryas your tracking point. Signal to noise should be very good with no false positives. An added bonus it that the code can identify the speaker for automatic tagging of the video, automatic slide selection etc.

You could use a paten of colours. At its simplest this could be a tennis ball on a lanyard. See many examples of coloured ball following robots. check size and shape of coloured blobs. Make it more robust by looking for combinations of two or more coloured shapes.

If you can make a working system with £100 of parts you deserve a big fat bonus and a medal.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to emulate this tracking system

Wed Aug 14, 2013 6:52 am

How much resolution in the video do you need? Also the motion of the platform will not be smooth with simple servos
I'm aiming to make the choice of recording equipment variable but plan a is to use an IPod - this is all going to be about trial and error :)
I'm using a stepper motor so smoothness should not be an issue :)
I am all for cool projects, but the simple way off the top of my head is to record the video as a wider shot and then just window in on the teacher at the edit stage. Or you could just let them wander around the screen.
The idea of this is to lets teacher record their own lessons and just play them back without any need to edit at all and this is how a £9K commercial system does it - I'm just the monkey on this one - with a cool summer project :)

@pigraham - ta - lots of things to think about :) At the end of the day, the thing its got to track has to be no bigger than an ID badge hung around the teacher's neck - I'm not allowed to dress them up in a bright pink tutu :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

PiGraham
Posts: 3778
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How to emulate this tracking system

Wed Aug 14, 2013 7:32 am

How wide an area / angle do you need to cover? Width of the room? Distance from the camera?
What video resolution do you need?

PiGraham
Posts: 3778
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How to emulate this tracking system

Wed Aug 14, 2013 7:37 am

You can pan & zoom digitally by selecting what part of the sensor to encode in the video stream.
2592×1944 pixels on the sensor, 640x480 pixels in the video gives you a factor 4 pan range.
It also means the system is silent.

PiGraham
Posts: 3778
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How to emulate this tracking system

Wed Aug 14, 2013 7:40 am

simplesi wrote:
@pigraham - ta - lots of things to think about :) At the end of the day, the thing its got to track has to be no bigger than an ID badge hung around the teacher's neck - I'm not allowed to dress them up in a bright pink tutu :)

Simon
I was thinking of ID badge size. The 'tennis ball' was only for illustration. ;)
QR code or colour patches on an ID card could be viable.
Obviously there may be local restrictions on what can be done.

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: How to emulate this tracking system

Wed Aug 14, 2013 7:57 am

The face tracking sounds impressive - I think this is a much more clever solution than using the little Wii IR cameras if it works out.
simplesi wrote:I'm not allowed to dress them up in a bright pink tutu :)
Simon
Seriously - if you did make teachers dress that way, I'm sure the pupils will record their lessons for them! :lol:

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: How to emulate this tracking system

Wed Aug 14, 2013 8:08 am

The problem with a badge is that when the teacher has their back turned, the camera can't see it. That is why a necklace of IR LEDs is (IIUC) used in the commercial product. It's easy enough to follow a teacher standing at the front of the class, it might be so easy that you don't need any electronics, but it is significantly harder if they are walking around the room, and in that case they will have their back or side to the camera for much of the time.

Given that the Pi camera filters IR, I would consider ultrasonics with two or three receivers placed around the room, but that would require a calibration phase every time the system was used.

Another interesting idea -- have a button, or maybe a few, on the teacher's lanyard that causes the system to turn to a pre-configured position. Then the teacher could have the video show the whiteboard when they were explaining it.

PiGraham
Posts: 3778
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How to emulate this tracking system

Wed Aug 14, 2013 11:26 am

Twinkletoes wrote:I've seen the iris system - it's a line of IR emitters in the neck cord on both sides with wide angle of view so you can still see them from the back of the cord when the teacher is turned away.
I searched out iRIS Connect and it seems to be much more than a video tracking system. If they are using IR marker tracking they don't mention it up front or show tracking shots in the demo video..

What is the objective for the OP? Is the tracking all you want to do? It seems, from a cursory look, that 95% of iRIS does not require video tracking.

Thinking about this more generally, I can see a benefit in a multi-camera recording system that does some tracking plus wide shots, projector / whiteboard capture and multiple audio input. To produce a slick video presentation the system should be close to the performance of a human cameraman for speaker tracking.

What is the feature list? How will it be used?

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to emulate this tracking system

Wed Aug 14, 2013 12:32 pm

What is the feature list? How will it be used?
The plan is for teachers to decide to use it as self-feedback tool so high quality not essential.

The commercial setup is one one of those things where its all about the software licensing as opposed to the technology. My head teacher thinks we can can come up with a simpler technological system but achieving 80% of results for about <5% of the price.

I like the idea of using fixed wide angle cam and then post-using using tracking info but then I've got the problem of how to automatically edit the video based on the data.

Simply moving the camera makes the project very easy :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: How to emulate this tracking system

Wed Aug 14, 2013 1:06 pm

What about using a belt of LEDs instead of a necklace? Belts are more symmetrically placed and are generally not obscured by hair etc. because they are also out of the way of the teacher's line of sight, and peripheral to the student's attention, you could have LEDs that are continually visibly lit, but actually pulsing in sync with the camera. By changing that waveform, or the colour, you could pass commands back to the camera.

By lighting the LEDs in turn around the circumference of the belt, you could even determine the angle at which the teacher was standing, and switch to one of several viewpoints.

A glowing red belt might not be the most popular teaching accessory, but it probably wont be beyond the pale.

PiGraham
Posts: 3778
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How to emulate this tracking system

Wed Aug 14, 2013 1:11 pm

simplesi wrote:
What is the feature list? How will it be used?
The plan is for teachers to decide to use it as self-feedback tool so high quality not essential.

The commercial setup is one one of those things where its all about the software licensing as opposed to the technology. My head teacher thinks we can can come up with a simpler technological system but achieving 80% of results for about <5% of the price.

I like the idea of using fixed wide angle cam and then post-using using tracking info but then I've got the problem of how to automatically edit the video based on the data.

Simply moving the camera makes the project very easy :)

Simon
Why do you need to track at all?

If you have recorded a lesson and you review it you can select to zoom and pan for detail if you want it, but most of the time won't the wide view be sufficient? What do you hope to see in the zoom that you don't get in the wide?

I wonder if it isn't better to go for maximum coverage with a few Pi/cameras to capture teacher and students. Then you need a nice interface that makes the video data easy to navigate. Wide-view of an exchange - cut to student - cut to teacher - back to wide in simple clicks.

Can you describe a typical scenario that requires tracked zoom?

PiGraham
Posts: 3778
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How to emulate this tracking system

Wed Aug 14, 2013 1:13 pm

rurwin wrote:What about using a belt of LEDs instead of a necklace? Belts are more symmetrically placed and are generally not obscured by hair etc.
(showing my age?) Do teachers never wear jackets? :)
Last edited by PiGraham on Wed Aug 14, 2013 1:53 pm, edited 1 time in total.

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: How to emulate this tracking system

Wed Aug 14, 2013 1:18 pm

How about a nice big cone shaped hat... with large identification letter... (only kidding)

Really, if you've already got the face tracking on the way then I think you're nearly there.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to emulate this tracking system

Wed Aug 14, 2013 2:49 pm

Can you describe a typical scenario that requires tracked zoom?
Em - just a normal lesson - cause that's what the commercial £9K system uses so just trying to copy it :)

The simplicity of just using tracking is that there will be no need for any video editing (a skill that not many primary teachers usually have)

Obviously, I'm just trying to get the tracking bit working to see if that bits possible :)
Really, if you've already got the face tracking on the way then I think you're nearly there.
I don't think that's going to work once the teacher start moving amongst the desks - that's why I need some sort of unique source

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

PiGraham
Posts: 3778
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How to emulate this tracking system

Wed Aug 14, 2013 3:32 pm

simplesi wrote:
Can you describe a typical scenario that requires tracked zoom?
Em - just a normal lesson - cause that's what the commercial £9K system uses so just trying to copy it :)

The simplicity of just using tracking is that there will be no need for any video editing (a skill that not many primary teachers usually have)

Obviously, I'm just trying to get the tracking bit working to see if that bits possible :)
Why would you need to edit? I envisage recording wide in HD from several vantage points that will be accessible during review. Normally you see what's going on in the wide camera view from the back of the room. Occasionally you might want a close-up of the teacher (why?) and you can click to zoom the recorded video to get that when it's needed, rather than recording only a tight view of just the teacher and losing the class context.

If this was to make slick presentation videos that you would otherwise use several cameras with a professional camera operators and post editing to produce your sights are very high.

It the objective is to review teaching methods why can't you do what the iRIS demo video shows and use a wide recording of the classroom? What do you gain by zooming in on just the teacher and losing coverage of what else is going on in class?

It may that the motto applies, but can you explain why less is more in this case?

You may have a very clear understanding of why you are tasked with zoom tracking, but I haven't understood what that understanding is from your posts. iRIS has a cool feature that, naively, seems to me to be a marginal feature of their system.
Why don't you do without that complication and make a system that does the core function of iRIS which seems to be video review of lessons?

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to emulate this tracking system

Wed Aug 14, 2013 4:13 pm

Well - like its been said - its a cool little project and the head wants me to give it a go and he said he'd buy the bits for it :)
Nothing so far as I already have RPi, steppers and webcam.


And I see that the knowledge I get from it might be useful for my robotic stuff :)

I'm not here for the "should you be doing it argument" :) - I'm here for the IR/Face recognition/wi-mote/milli-band radar method argument :)

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

PiGraham
Posts: 3778
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: How to emulate this tracking system

Wed Aug 14, 2013 4:22 pm

simplesi wrote:Well - like its been said - its a cool little project
...
And I see that the knowledge I get from it might be useful for my robotic stuff :)
I'm not going to argue with that. By all means do things that are cool and educational! :D

I was only trying to help get to any other key objectives that might lie behind the idea to make something. If those are your key objectives there's no need for that. I guess I was sidetracked by mention of iRIS connect.

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to emulate this tracking system

Thu Aug 15, 2013 9:48 pm

And here we have a demo of the system tracking a Raspberry Pi sticker :)

http://www.youtube.com/watch?v=mJZ5mOPaaAQ

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to emulate this tracking system

Fri Aug 16, 2013 8:58 pm

Theirs good news and bad news

Bad news first - 1 brokem webcam
https://vine.co/v/hMLwQ9UaTxD

Good news
Modified 2nd one by non-destrucively ,this time, removing the IR filter and we have ourselves an IR Webcam
https://vine.co/v/hMLdQubxJwx

That is just one 3mm IR 850nm led running off 5V thru a 2k2 resistor - a few of them parelled up and we shouyld have REALLY bright target to track :)

SImon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to emulate this tracking system

Mon Oct 07, 2013 8:32 pm

Dear (insert name of deity here)
I have sinned :(
I'm going to recommend that my head teacher buys us one of these instead :(
http://mattbritland.com/2013/10/07/swiv ... classroom/

I realise I'll be a candidate tol be cast down into the pit and at the very minimum can expect to be de-geeked :(

But £175 and it just works - it cost me £120 just for the RPi bits and a wireless mic so its a no brainer to just get this one instead as a Veroboard full of LEDS and a 3AA battery box wasn't something that was going to be as easy sell to my teaching colleagues :)

Simon
PS Sorry :(
PPS And the existing bits will be handy for after -school club and the Nativity Plays :)
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: How to emulate this tracking system

Tue Oct 08, 2013 10:03 am

Don't be sorry.

It is always going to be the case that a DIY version of anything is going to be more expensive and look worse than a mass-produced product. That's simply the effects of production scaling. You cannot afford to design and produce PCBs, let alone vacuum formed cases. The electronics in a dedicated solution are going to be tailored exactly for the task in hand -- no HDMI out, no USB or Ethernet, etc.

It is still a useful and productive experience to try to produce your own version, if for no other reason than that you now know why a commercial product costs what it does, and you can explain that to others. However you now know rather a lot more about scene recognition and tracking than you did before. You are also better able to judge when some product is markedly better than others, and when they are simply charging way over the odds.

Your experience has shown that £9K is over-priced and that you can get an acceptable alternative for £170. That's a good result.

Return to “Automation, sensing and robotics”