PS3 Eye - PTAM/Visual Odometry

This is for discussion and development of non-commercial open source VR/AR projects (e.g. Kickstarter applicable, etc). Contact MTBS admins at customerservice@mtbs3d.com if you are unsure if your efforts qualify.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

FingerFlinger wrote:In case it wasn't already common knowledge, Peau Productions has a selection of wide FOV lenses for the PS3 Eye.
Nice find. Would any of those fit?

So now we're basically talking about a perfectly synchronized stereo camera with a 55 degree FOV, 320x480 resolution, 60 FPS, with about a 5 1/2 inch baseline. Sounds really promising to me. :) I wonder if there are focusing problems with it? Would the stereo images inhibit auto-focusing?
lessthanoptimal
One Eyed Hopeful
Posts: 22
Joined: Mon Dec 03, 2012 1:49 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by lessthanoptimal »

brantlew wrote:
FingerFlinger wrote:In case it wasn't already common knowledge, Peau Productions has a selection of wide FOV lenses for the PS3 Eye.
Nice find. Would any of those fit?

So now we're basically talking about a perfectly synchronized stereo camera with a 55 degree FOV, 320x480 resolution, 60 FPS, with about a 5 1/2 inch baseline. Sounds really promising to me. :) I wonder if there are focusing problems with it? Would the stereo images inhibit auto-focusing?
For VO auto-focus might be bad. In theory, if you know the focal length you should be able to compensate for the changes. I have always worked with fixed focal length lens. My recommendation would be to turn off auto-focus until the very end when everything else is working.

BTW how accurate do you need head tracking to be?
User avatar
FingerFlinger
Sharp Eyed Eagle!
Posts: 429
Joined: Tue Feb 21, 2012 11:57 pm
Location: Irvine, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by FingerFlinger »

I think that our ideal specs for headtracking would be something like mm precision updating at 120Hz, although 60Hz is probably workable.

Does that splitter device try to do auto-focusing? The PS3 Eye has a fixed focal length.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

Yeah, ideally in the sub-millimeter, sub-degree, 60+ Hz range. A pretty tall order - but that's if you rely completely on the camera. There has been some speculation that a sensor fusion with an IMU device could lower the camera requirements.

Since IMU's provide very good angular data, is there a way to "remove" the angular calculations from the VO algorithm and just track position? Would this lessen the computational requirements in any way - or would pretty much the same amount of work need to be done just to compute position with any sort of accuracy? Oh, and another thing. For this specific VR problem, scene reconstruction or accurate depth mapping are unnecessary. Would removing those requirements allow the VO algorithm to be reduced?
MSat
Golden Eyed Wiseman! (or woman!)
Posts: 1329
Joined: Fri Jun 08, 2012 8:18 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by MSat »

The optical sensors in mice, while being extremely fast, have VERY low resolutions (30x30 is considered "high-res") and mediocre monochromatic color depth. I don't think they'll do much good mounted to your head unfortunately.

Outwards looking optical tracking seems extremely tricky, and agree with whoever suggested small areas would probably be better served using an inwards looking system. There's a lot less calibrations and computations involved.

It does appear that IMUs are reasonable at tracking orientation (except on the axis perpendicular to gravity if you don't use a magnetometer), as has been proven by the people who got the chance to try the Rift. Unless you have to avoid using one, it could only be beneficial.


I know that too much jitter in orientation would be disconcerting, but I wonder if other movements are as troublesome? If not, then what are the limits? Are we attempting to achieve unnecessary precision? I also wonder if using a fast cam like the PSEye to detect quick, major motions, and then also using a slower high-res cam for more precise corrections is a suitable option.
User avatar
mahler
Sharp Eyed Eagle!
Posts: 401
Joined: Tue Aug 21, 2012 6:51 am

Re: PS3 Eye - PTAM/Visual Odometry

Post by mahler »

MSat wrote:Outwards looking optical tracking seems extremely tricky, and agree with whoever suggested small areas would probably be better served using an inwards looking system. There's a lot less calibrations and computations involved.
For now I am sticking with outward looking tracking or a combination with an IMU. This is also closest to our own senses and any other types of tracking with external peripherals would only distract us from the optimal solution of walking around freely.

The real-time Stereoscopic Visual Odometry example in the BoofCV library and the Loreo 3D Lens in a Cap to use cheap hardware for synchronization gives me confidence that we're getting close to solving the issue of ideal positional/orientation tracking for VR.

But as brantlew said:
... ideally in the sub-millimeter, sub-degree, 60+ Hz range. A pretty tall order
User avatar
PatimPatam
Binocular Vision CONFIRMED!
Posts: 214
Joined: Thu Jun 28, 2012 1:31 pm
Location: Barcelona

Re: PS3 Eye - PTAM/Visual Odometry

Post by PatimPatam »

mahler wrote:
MSat wrote:Outwards looking optical tracking seems extremely tricky, and agree with whoever suggested small areas would probably be better served using an inwards looking system. There's a lot less calibrations and computations involved.
For now I am sticking with outward looking tracking or a combination with an IMU. This is also closest to our own senses and any other types of tracking with external peripherals would only distract us from the optimal solution of walking around freely.

The real-time Stereoscopic Visual Odometry example in the BoofCV library and the Loreo 3D Lens in a Cap to use cheap hardware for synchronization gives me confidence that we're getting close to solving the issue of ideal positional/orientation tracking for VR.

But as brantlew said:
... ideally in the sub-millimeter, sub-degree, 60+ Hz range. A pretty tall order
Don't forget to add 2 more parameters into that equation, latency and wireless.

For a backtop portable system outwards tracking is indeed ideal, but in a more usual desktop setup a delay would be added in order to send the images from the cameras to the PC, especially if going wireless (which i believe should be part of the "optimal" solution).

Unfortunately i don't think we are going to find an ideal solution for all cases in the near future, but i think we can find a good enough solution for each type of use. Eg HMD-mounted cameras for laser-tag or free to roam type of scenarios and inwards tracking systems to use at home, either seated or inside a restricted area.
lessthanoptimal
One Eyed Hopeful
Posts: 22
Joined: Mon Dec 03, 2012 1:49 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by lessthanoptimal »

brantlew wrote:Yeah, ideally in the sub-millimeter, sub-degree, 60+ Hz range. A pretty tall order - but that's if you rely completely on the camera. There has been some speculation that a sensor fusion with an IMU device could lower the camera requirements.

Since IMU's provide very good angular data, is there a way to "remove" the angular calculations from the VO algorithm and just track position? Would this lessen the computational requirements in any way - or would pretty much the same amount of work need to be done just to compute position with any sort of accuracy? Oh, and another thing. For this specific VR problem, scene reconstruction or accurate depth mapping are unnecessary. Would removing those requirements allow the VO algorithm to be reduced?
You can feed the orientation estimate from the IMU into the feature tracker and use that to simply/improve feature tracking. It works really well too. If you want to get really fancy you could use the vision algorithm to remove gyro drift when stationary. I'm not aware of any open source projects that support this functionality (boofcv doesn't yet). Maybe LIBVISO does?

I recently saw an IMU with gyro and acceleration that was about 1"x1"x1". What's really notable about it is that the acceleration was accurate enough that you could integrate it and estimate your 6-DOF pose for a little bit. The price I believe was several hundred. Probably more than you guys want to pay, but really good compared to what something like that would cost a few years ago.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

lessthanoptimal wrote:You can feed the orientation estimate from the IMU into the feature tracker and use that to simply/improve feature tracking. It works really well too. If you want to get really fancy you could use the vision algorithm to remove gyro drift when stationary. I'm not aware of any open source projects that support this functionality (boofcv doesn't yet). Maybe LIBVISO does?

I recently saw an IMU with gyro and acceleration that was about 1"x1"x1". What's really notable about it is that the acceleration was accurate enough that you could integrate it and estimate your 6-DOF pose for a little bit. The price I believe was several hundred. Probably more than you guys want to pay, but really good compared to what something like that would cost a few years ago.
Great! That coincides with what a computer vision engineer friend of mine was telling me - IMU's and CV complement each other well because they have opposite strengths and weaknesses. If you know of some good research and/or papers on the subject I would love the links.

As far as IMU's go. That's one thing we do know about on this forum. There are a number of good and cheap devices available for this purpose. Sparkfun Razor, YEI 3-Space, Mongoose, Hillcrest, and hopefully this little beauty pretty soon...
http://www.mtbs3d.com/phpbb/viewtopic.php?f=138&t=15184
User avatar
FingerFlinger
Sharp Eyed Eagle!
Posts: 429
Joined: Tue Feb 21, 2012 11:57 pm
Location: Irvine, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by FingerFlinger »

Relevant paper

I have been curious if accelerometer data becomes relevant for translation when integrating with VO; good to know that this is a possibility. My hope is that the accelerometer can increase the responsiveness of the VO translation results by at least indicating the instantaneous direction of motion.
User avatar
Nick3DvB
Binocular Vision CONFIRMED!
Posts: 311
Joined: Wed Oct 06, 2010 10:51 am
Location: UK

Re: PS3 Eye - PTAM/Visual Odometry

Post by Nick3DvB »

The CV / IMU fusion route sounds like it could give us the best of both worlds, if we don’t really need the orientation or mapping components of the more comprehensive CV implementations then I assume the focus would be on deriving very fast / accurate camera translations to fuse with the other IMU data. In light of that, the talk of mouse sensors and more basic optical flow systems has given me an idea…

It might be worth looking into existing algos used in many common video processing applications? I’ve recently been playing with framerate interpolation plugins that boast of quarter pixel accuracy, assuming our camera is looking at a relatively static scene maybe we could use similar motion vector analysis techniques to derive fast sub-mm camera translations? This might give use the kind of precision / speed that existing CV libraries might struggle with, even if stripped down to the bear essentials and GPU accelerated.

http://avisynth.org.ru/mvtools/mvtools2.html
http://www.svp-team.com/wiki/Plugins:_MVTools2
http://www.svp-team.com/wiki/Plugins:_SVPflow

The above probably isn’t suitable but there are many other video stabilisation / motion artifact removal plugins that could potentially be of some use to us? I’m not suggesting there is an “off the shelf” solution out there already, but there’s no point in reinventing the wheel either so it may be worth pursuing, I don’t have the requisite knowledge to know either way, just thought I’d throw the idea out there.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

Here's something that is starting to make me a little nervous about CV solutions in general...

I've currently got a really, really shitty prototype version of a CV position tracker. Basically I smashed a Minoru camera and LibViso together with some completely amateur configuration and calibration attempts just to make it do something. It's slow and noisy and only good for basic movement detection - and only that about half the time. Its way too immature for me to form any opinions about precision or performance. However....

One thing that is striking to me is how incredibly sensitive it is to the environment. Lighting and scene content seem to have a massive effect on the speed and performance of the algorithm. For example, I had everything working pretty good in my office with fluorescent lighting when viewing a gray keyboard. But when I came home and tried it with incandescent lighting and my black keyboard - it didn't work at all. Repetitive patterns destroy it also. If I point it at my carpet which is a bunch of evenly spaced dots, it drops the frame rate to about 2 fps. And when the frame (processing) rate drops it kills the performance of the algorithm because the scene movement is too high.

So everything has to be perfectly balanced - just enough objects, plenty of clear edges, the right amount of illumination, no repetitive patterns, light backgrounds, etc - and then I get decent frame rates and things starts to work. Otherwise, it just doesn't work at all. There's a reason that all those youtube demo videos are filmed in a messy office.

I realize that a whole lot of this is due to my crappy equipment and poor knowledge, but not all of it. The allure of these computer vision solutions is that they would be robust, generalized, and flexible. Now I'm nowhere near ready to dismiss them as an option, but if they end up being too environmentally sensitive then they really are not any of those things.

@lessthanoptimal: You got any anecdotal thoughts about this?
User avatar
Chriky
Binocular Vision CONFIRMED!
Posts: 228
Joined: Fri Jan 27, 2012 11:24 am

Re: PS3 Eye - PTAM/Visual Odometry

Post by Chriky »

I agree that I don't think arbitrary algorithms are there yet, or, we don't have the hardware (cameras and processors) to make the current algorithms work well enough. I like the idea someone had of projecting bright dots around the room with a laser projector. It would let you control the environment to a certain extent without being inconvenient.

I don't think its unreasonable, at this stage, to require people to dedicate a bit of time and space to VR, it just needs to be cheap and easy.
lessthanoptimal
One Eyed Hopeful
Posts: 22
Joined: Mon Dec 03, 2012 1:49 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by lessthanoptimal »

brantlew wrote: I've currently got a really, really shitty prototype version of a CV position tracker.
One warning about VO or structure from motion (SFM) in general, you can't do a half ass job at it. There are many things that you have to get right for it to work, but if you mess up one of them it will kinda work but fail easily. I'll post a reading list for you guys.
brantlew wrote: One thing that is striking to me is how incredibly sensitive it is to the environment. Lighting and scene content seem to have a massive effect on the speed and performance of the algorithm.
You are 100% correct there. A major criticism of VO is that its performance is highly dependent on lighting conditions and the amount of texture in the scene. Classic failure conditions are when the sun is low in the sky or textureless hallways indoors. Any systems which uses VO will need to be able to handle interruptions in motion data. In the future hallways might not be as much of an issue, but it will require better image features than are being used now.

The main reason people use it is because there are no alternatives and when it works, it actually works fairly well. Solutions that I'm familiar with for high precision head tracking require significant infrastructure. If you want to be able to put on a headset and walk around some random location, VO/IMU might be your only option. RF and magnetometers have worse issues IMO.
brantlew wrote: There's a reason that all those youtube demo videos are filmed in a messy office.
Haha yep. It's also amazing how there is never sun glare blinding the camera. I was debating if I should use more challenging datasets in my propaganda videos. Ended up deciding to leave that for a future video. There was also the problem of finding a really bland office to film in. I was unable to get permission since I wanted to post the video on the web.

The sensitivity to lighting conditions you described sound extreme. One thing to consider is that when you are indoors it's not the "low light" that's the problem, but that when the light is low the camera slows down its shutter speed, which causes more motion blur. That could just mean that a $20 webcam is not an option.

A bit of motion blur + unsynchronized cameras + poor calibration would easily skew up the best code. Hell any of those individually would. Performing VO when there is motion blur is an area people are working on. They might also be using a crappy feature tracker that needs really clean data.
lessthanoptimal
One Eyed Hopeful
Posts: 22
Joined: Mon Dec 03, 2012 1:49 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by lessthanoptimal »

Chriky wrote:I agree that I don't think arbitrary algorithms are there yet, or, we don't have the hardware (cameras and processors) to make the current algorithms work well enough. I like the idea someone had of projecting bright dots around the room with a laser projector. It would let you control the environment to a certain extent without being inconvenient.

I don't think its unreasonable, at this stage, to require people to dedicate a bit of time and space to VR, it just needs to be cheap and easy.

Adding infrastructure would make the problem easier and prevent location drift (VO has odometry in its name for a reason). This toy uses a system similar to what you described for localization.

http://www.wowwee.com/en/products/tech/ ... ovio/rovio
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

Chriky wrote:I agree that I don't think arbitrary algorithms are there yet, or, we don't have the hardware (cameras and processors) to make the current algorithms work well enough. I like the idea someone had of projecting bright dots around the room with a laser projector. It would let you control the environment to a certain extent without being inconvenient.

I don't think its unreasonable, at this stage, to require people to dedicate a bit of time and space to VR, it just needs to be cheap and easy.

Almost like a compromise solution between totally generalized feature detection and your rigidly designed fiduciary marker system. You get the clarity of the point source (LED) signal, and the generality of the frame-to-frame motion analysis. Sounds interesting.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

lessthanoptimal wrote:One warning about VO or structure from motion (SFM) in general, you can't do a half ass job at it. There are many things that you have to get right for it to work, but if you mess up one of them it will kinda work but fail easily.
Good advice - and my implementation isn't even half-ass. More like 1/10 of an ass. ;)
lessthanoptimal
One Eyed Hopeful
Posts: 22
Joined: Mon Dec 03, 2012 1:49 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by lessthanoptimal »

1) Structure from Motion Books

a) R. Hartley, and A. Zisserman, "Multiple View Geometry in Computer Vision"
b) Yi Ma, et. al., "An Invitation to 3-D Vision"
c) E. Trucco, and A. Verri, "Introductory Techniques for 3-D Computer Vision"

a) Is by far the most popular book on this subject and has good algorithms inside. Your geometry and math skills better not be rusty.
b) A good book but not as popular as (a) is. I found it easer to read initially and is more focused on algebra than geometry.
c) As a basic introduction I like this book and it is much less math intensive. Not everyone likes it.

2) Visual Odometry

David Nister, et. al., "Visual Odometry" is the classic paper on this subject. If terms "fundamental matrix" or "P3P" mean nothing to you, you still might be able to get a high level idea of the problem.

There are a lot of papers on this subject, but for the most part they follow the pattern set by the one above.

3) Camera Calibration

http://www.vision.caltech.edu/bouguetj/calib_doc/

If you have matlab that code is fairly easy to get going and there website does a good job describing the process plus they provide links to several papers.

Might as well whore BoofCV's applets too that demonstrate stereo calibration:
http://boofcv.org/index.php?title=Apple ... nar_Stereo
EdZ
Sharp Eyed Eagle!
Posts: 425
Joined: Sat Dec 22, 2007 3:38 am

Re: PS3 Eye - PTAM/Visual Odometry

Post by EdZ »

MSat wrote:The optical sensors in mice, while being extremely fast, have VERY low resolutions (30x30 is considered "high-res") and mediocre monochromatic color depth. I don't think they'll do much good mounted to your head unfortunately.
I did a big research binge on OF sensors recently, the idea being to glue 6 dirt-cheap sensors onto the HMD looking in opposing directions on all axes in order to get the overall optical flow for the entire head using a fairly weak microcontroller to do the basic algorithms required.
The big issue is environment distance: without knowing the distance of each sensor to what it is viewing, it is impossible to scale correctly, and if you're viewing things at multiple distance (i.e. are in any case other than being at the exact centre of a spherical room) it doesn't work. All the research I could find on multi-sensor setups had them all facing the same flat plane from the same distance, with no non-perpendicular rotation. It'd also almost certainly not work outside in nice wide open spaces, with half your view being an essentially featureless sky (no nice high-contrast edges), and the other half probably being a likely featureless ground at head-height. There seems to be a niche market of using them with Quadrotors to ground-track for position stabilisation, but with a-priori knowledge of altitude and looking at essentially a flat plane.

The only saving grace would be if you used autofocussing telecentric lenses, but then you have some fiddly optical calibration to do before you even started looking at sensor data, and your hardware cost has increased to the point where you may as well have bought some VICONs and a spare room.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

@EdZ: I had that intuition as well. Mice are designed for a very constrained problem. You can't even lift them up 2 millimeters and maintain tracking.
EdZ
Sharp Eyed Eagle!
Posts: 425
Joined: Sat Dec 22, 2007 3:38 am

Re: PS3 Eye - PTAM/Visual Odometry

Post by EdZ »

brantlew wrote:@EdZ: I had that intuition as well. Mice are designed for a very constrained problem. You can't even lift them up 2 millimeters and maintain tracking.
I should have mentioned that I was talking about sensors with an appropriate new lens (fixed focus or EDOF). There are a few papers on these sort of 'hacked' sensors, e.g this one on fixed-range 1d odometry, or this one showing just how small a range of distances are viable with a fixed lens. Unfortunately, I couldn't find any papers on use of COTS OF sensors with telecentric lenses, probably because telecentric lenses seem to be custom made in most cases, or at the very expensive enough that pairing them with cheap sensors is a false economy. 'Small cheap plastic telecentric lenses' don't seem to be an actual thing.
User avatar
Nick3DvB
Binocular Vision CONFIRMED!
Posts: 311
Joined: Wed Oct 06, 2010 10:51 am
Location: UK

Re: PS3 Eye - PTAM/Visual Odometry

Post by Nick3DvB »

Interesting papers Edz, that’s the sort of thing I was thinking about, but we shouldn't get too hung-up on not being able to use the same types of sensors, we can still take inspiration from the fundamental approach, applying a relatively basic form of digital image correlation / optical flow analysis to a high frame-rate camera output might be sufficient in conjunction with the IMU data. That’s what I was driving at before with the motion vector analysis idea, after all motion compensation is a fundamental part of all digital video compression and has been worked on for decades, surely we can draw on that knowledge, we “just” need a robust method of discriminating between rotation and translation, those useless inertial sensors might even be of some help after all? But this is probably all way too simplistic, I admit to being out of my depth at this point... :lol:
MSat
Golden Eyed Wiseman! (or woman!)
Posts: 1329
Joined: Fri Jun 08, 2012 8:18 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by MSat »

brantlew wrote:@EdZ: I had that intuition as well. Mice are designed for a very constrained problem. You can't even lift them up 2 millimeters and maintain tracking.
While the optics definitely play a role in this, the functionality to cease response is actually part of the sensor's firmware, and can even be changed in basically real time on some of them.

I was curious about ways to use optical mice sensors myself. Their low cost, extremely high frame rate, and integrated DSPs makes them seemingly have everything going for them. It's just that pitiful resolution that's useless for just about anything other than what they were originally intended for. Perhaps using a pinhole aperture with a low FOV, you could do high speed multi-point laser ranging? Even if you could, I don't think it's of any real practical use unless you really need speed a lot more than resolution/FOV.


So what are the thoughts on using slower, but higher-res cameras? With more and more computers coming with USB3, is it just a matter of time before we can have both? 720p @60fps imaging sensors in both RGB and mono already exist (http://www.aptina.com/products/image_sensors/), so it would be nice to get something like that in a consumer product.

@mahler
I hope I didn't come off as being rude with my earlier comment. I don't want to discourage anyone from working on dynamic VO. The fact that it works _at all_ is extremely impressive, and could use all the minds it can get to make it a practical reality. :)
lessthanoptimal
One Eyed Hopeful
Posts: 22
Joined: Mon Dec 03, 2012 1:49 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by lessthanoptimal »

My personal opinion is that OF techniques could work, but would require a lot of effort. New hardware is needed and in the end it might not be as good as other approaches. Actually wrote a proposal a while ago to do something similar, didn't get funded. Optical mice operate at more than 1000 Hz. Even if you can get a higher resolution system to work in those frequencies, just capturing enough light would be a problem without adding a very bright flash light to it. Separating translational motion from rotational motion is another significant issue. Operating in slower frequencies means that simple OF techniques can't be used and it starts to become VO.

One way to get around indoor environments having little to no texture and is to simply use a projector. Adding a random pattern would allow VO to work. Adding a known pattern would even allow the scene's structure to be determined, like the Kinect. It's also easier to add a projector than stick LED's or lasers in a room.

Thought you guys might be interested in this paper. It talks about adding odometry to boots. Several groups are working on that and the US army has been funding projects in that area for years.

www-personal.umich.edu/~johannb/Papers/paper142.pdf
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

It would be great if a home planetarium projector could be used. Point sources would be easy to deal with if they were bright enough to be imaged reliably. You would need a really strong projector and it would only work in the dark and your camera would accumulate a lot of noise in that environment. Maybe a solution would be to swap out the bulb with a strong IR light source and then put an IR filter on the camera.
User avatar
Nick3DvB
Binocular Vision CONFIRMED!
Posts: 311
Joined: Wed Oct 06, 2010 10:51 am
Location: UK

Re: PS3 Eye - PTAM/Visual Odometry

Post by Nick3DvB »

brantlew wrote:It would be great if a home planetarium projector could be used. Point sources would be easy to deal with if they were bright enough to be imaged reliably. You would need a really strong projector and it would only work in the dark and your camera would accumulate a lot of noise in that environment. Maybe a solution would be to swap out the bulb with a strong IR light source and then put an IR filter on the camera.
Good idea, or maybe just use a Kinect as your "dumb" IR shape projector, it wouldn't necessarily need to interface with your IR camera tracking solution,

it seems like a shame not to make more use of it, but it might be a good option if you wanted to use the Kinect for limb tracking anyway.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

I forgot about the Kinect. It's a good idea. I guess it would work best with a lot of obstacles and furniture to offset the points from just a regular homogenous grid. Ideally the point field would have inherent non-repeating patterns (ie. constellations) in it so that there would be nice contours to track even when projected on flat featureless walls. I wonder if you could mod a Kinect with patterns or how you might hack up a laser emitter to do it. Can you program laser emitters and at what time frequency do they operate at? If the laser was bright enough you could probably operate with a fairly sparse point field. It seems like it would make frame correlation run much faster if you just had just a handful of stable points within each frame. Also motion blur would be less of a problem with sparse points. I'm really starting to love this idea. :D
EdZ
Sharp Eyed Eagle!
Posts: 425
Joined: Sat Dec 22, 2007 3:38 am

Re: PS3 Eye - PTAM/Visual Odometry

Post by EdZ »

As far as I am aware, the Kinect's 'projector' is just a laser diode and a pair of diffraction gratings, not something you can easily modify.
MSat
Golden Eyed Wiseman! (or woman!)
Posts: 1329
Joined: Fri Jun 08, 2012 8:18 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by MSat »

Hmm.. So the Kinect uses a imaging sensor @ 640x480 and 30fps. Would there be any benefit in using the laser projection with a faster (and maybe higher res) camera, or is the algorithms is uses too slow to be of any benefit?
User avatar
Nick3DvB
Binocular Vision CONFIRMED!
Posts: 311
Joined: Wed Oct 06, 2010 10:51 am
Location: UK

Re: PS3 Eye - PTAM/Visual Odometry

Post by Nick3DvB »

I don't think there is any way to modify the projection in software, but the standard pattern might actually be ok?

Image

There's some good info on the ROS wiki: http://www.ros.org/wiki/kinect_calibration/technical

I was wondering if plumbing 180fps PSeye output into current Kinect tracking solutions might work, if we could get the software to keep up.

If not then just sticking an IR lamp in one of these might actually work just as well, and would be a lot cheaper to.
Aasimon
One Eyed Hopeful
Posts: 7
Joined: Thu Jul 19, 2012 6:23 am

Re: PS3 Eye - PTAM/Visual Odometry

Post by Aasimon »

MSat wrote:Hmm.. So the Kinect uses a imaging sensor @ 640x480 and 30fps. Would there be any benefit in using the laser projection with a faster (and maybe higher res) camera, or is the algorithms is uses too slow to be of any benefit?
There are rumours floating around about Kinect 2.0. I would be surprised if some of the 640x480 or 30 fps figures do not go up.
User avatar
Nick3DvB
Binocular Vision CONFIRMED!
Posts: 311
Joined: Wed Oct 06, 2010 10:51 am
Location: UK

Re: PS3 Eye - PTAM/Visual Odometry

Post by Nick3DvB »

The ASUS Xtion might be worth a look, it does 60fps @ lower resolutions:

http://www.asus.com/Multimedia/Motion_S ... ifications

http://wiki.ipisoft.com/ASUS_Xtion_vs_M ... Comparison
lessthanoptimal
One Eyed Hopeful
Posts: 22
Joined: Mon Dec 03, 2012 1:49 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by lessthanoptimal »

I just recieved the PS3 eye and started looking into what it would take to make a stereo camera system. Then I found the page below:

https://github.com/AmmarkoV/RoboVision/issues/13

It links to a few other message boards where people had gotten frame synchonization working by hacking the hardware on those bad boys. So that issue might be solved.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

@lessthanoptimal: Good find.

@Nick3DvB: Another good find. I can't tell how much of the "pattern" is due to positional offset and how much of that is just due to intensity gradients or moire. Also, it seems a bit distorted - I'm not sure why it would be bowed on the left side like that otherwise. Either way it's interesting. I would think sending it through a lens to project it hemispherically would be best although that might stretch the edge points too much, but if you could put two Kinects back-to-back you could get full room coverage that way.

I've been thinking a lot about point field density. A dense field would be good for a free movement because then you could get close to the walls and still have enough points in view. (except for the nagging case of body occlusion :( ) But dense fields increase the search space. For stationary usage I think maybe a less dense field would be better. Not only does it decrease the search space, but it would seem to allow faster head movement with slower cameras since large point movements could be more easily correlated from frame to frame. In fact, (except for latency) slower cameras with longer exposure times might even be helpful with sparse fields because you could actually capture the optical flow direction of the points in the motion blur of the image. You just need to make sure your points are super bright and the resolution of the camera is good enough to detect them dependably in every frame. I've got a buddy that does laser shows in clubs looking into programmable IR laser projectors.
User avatar
Nick3DvB
Binocular Vision CONFIRMED!
Posts: 311
Joined: Wed Oct 06, 2010 10:51 am
Location: UK

Re: PS3 Eye - PTAM/Visual Odometry

Post by Nick3DvB »

lessthanoptimal wrote:It links to a few other message boards where people had gotten frame synchonization working by hacking the hardware on those bad boys. So that issue might be solved.
Great, that's good to know, I might have a go a this when my second PSeye turns up. What's your take on using a projected pattern to assist tracking?
brantlew wrote:I can't tell how much of the "pattern" is due to positional offset and how much of that is just due to intensity gradients or moire.
I assumed that "swirl" was intentional, to disrupt the repetition of the base pattern, but I think you're right, it's probably just a sampling artifact! There's a bit more on the patterns here:

http://www.futurepicture.org/?p=129
http://www.futurepicture.org/?p=116
brantlew wrote:In fact, (except for latency) slower cameras with longer exposure times might even be helpful with sparse fields because you could actually capture the optical flow direction of the points in the motion blur of the image.
I've seen similar "long exposure" tricks used in astronomy imaging, we could probably learn a thing or two from those guys,

and I can't help seeing obvious parallels in the video compression field, but I'm going to stop harping on about that now... :lol:
User avatar
FingerFlinger
Sharp Eyed Eagle!
Posts: 429
Joined: Tue Feb 21, 2012 11:57 pm
Location: Irvine, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by FingerFlinger »

Actually, that's a really good point. You could almost just use an edge detector, and fore-go optical flow calculations (almost).
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

I've been digging around trying to figure out the best way to make a stereo PS Eye camera. Found some decent links and photos to share. First off - here's a simple solution to the mounting issue. Sort of big and ugly but easy, gets the job done, and is probably good for a first pass . However, I'm a little worried about the ability to keep the cameras perfectly parallel with this method.

Image



Here is a more elegant solution. Looks great and the sensors should be perfectly aligned. But where do you get those square mounting PCB's? Those are not part of the camera. The camera PCB is that little wing shaped board. What all parts would be necessary to assemble this?

http://www.flickr.com/photos/60552763@N00/5089295727/

Image



Another thing I found out while researching is that for any type of IR tracking, the IR filter must be removed from the lens assembly. It requires a bit of mild cutting to get the filter out, and then you are left with an unfocused picture because the filter is also a small lens. There are a number of hackish ways to fix it that are a bit scary. And then I stumbled upon this little company which sells a bunch of special mods for the PS Eye. Unfortunately no ready-to-go stereo assembly, but they do have several mods for adding wide angle and focusable lenses and specific light filters. It probably only costs 1/5 as much to DIY, but who has the time to dick around with this crap when a reasonably priced solution already exists.

http://peauproductions.com/store/index. ... ex&cPath=1

[youtube]http://www.youtube.com/watch?v=rDlzit5jm6w[/youtube]
MSat
Golden Eyed Wiseman! (or woman!)
Posts: 1329
Joined: Fri Jun 08, 2012 8:18 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by MSat »

brantlew wrote:

Here is a more elegant solution. Looks great and the sensors should be perfectly aligned. But where do you get those square mounting PCB's? Those are not part of the camera. The camera PCB is that little wing shaped board. What all parts would be necessary to assemble this?

http://www.flickr.com/photos/60552763@N00/5089295727/

Image


Hmm.. It looks like the camera boards are just mounted to some scrap PCBs with some standoffs. If you don't need ultimate precision and adjustability, you can probably just mount them to a single PCB (get one of those prototype boards from radio shack), or some aluminum L-angle. I was thinking that maybe with two high-bandwidth USB2.0 cams (like the PSEye), you might want to connect them to a USB3.0 hub to try to avoid potential bottlenecks.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: PS3 Eye - PTAM/Visual Odometry

Post by brantlew »

So I am thinking that an easy (but mid-priced) solution is to purchase two of the custom m12 camera case kits from Peau.

http://peauproductions.com/store/index. ... ucts_id=15

Image

The camera board can be mounted in the portrait position, so you should be able to place two of these side by side with a good stereo distance between the cameras. Plus you can swap out for wide angle lenses and experiment with both visible spectrum and IR filters. It looks like the cases can be sawed off to decrease the vertical height and then just a simple mounting backplate needs to be created to attach the cases side-by-side. The only thing left would be to wire up the VSYNC to synchronize the cameras and you should have a pretty nice stereo rig to play with.

Total cost = 2 x $130 (kits) + 2 x $20 (lenses) = $300

(But I already have two PS Eyes so I might just rip out the modules and save myself $120.)
MSat
Golden Eyed Wiseman! (or woman!)
Posts: 1329
Joined: Fri Jun 08, 2012 8:18 pm

Re: PS3 Eye - PTAM/Visual Odometry

Post by MSat »

I don't have a PS3 Eye, but looking at pictures of it, it looks like the two housing halves are essentially flat around the edges where they meet. Would it not be possible to sandwich a piece of plexiglass or something similar between two cameras, and just use longer screws if necessary to hold it together?

Here's an interesting excerpt from a forum post I found (http://nuigroup.com/forums/viewthread/2953/#18516) regarding the removal of the IR filter, and what happens even with an IR pass filter:

The second thing that I discovered upon firing it up post surgery is that the rear most element was indeed an IR filter. The camera picks up more IR than it did with its filter in place (although out of the box the camera had no trouble seeing to at least 900 nm before, albeit with lower sensitivity than my real IR 850-tuned camera.)
But now, even with an 800 nm and above passing filter in front of the lens to block all visible light, I’ll bet I can spot neutrinos!. It’s so bright as to be unusable. Who needs an IR source - everything seems to be emitting it. Any light from a projector hitting my touch screen (even with the projector having an IR blocker over the lens) blooms the camera (which, remember, still has the that 800 and above passing filter taped in front of the lens.)
If I hold the original IR blocking filter in front of the lens instead, it brings the levels back to what I would expect for a normal camera.
Even with the projector off, and barely enough light in the room to see; through the PS3 cam, it’s like daylight.

Going to try an 850 or 900 nm and above passing filter instead of my 800.
Also going to try to reinstate the IR filter to check focus. Now that it’s out the IR filter does look flat so it shouldn’t have anything to do with the focal distance.
Post Reply

Return to “VR/AR Research & Development”