Distortion correction for WPF ImageSource

Post Reply
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Distortion correction for WPF ImageSource

Post by CyberVillain »

I have written a WPF app for the Parrot AR Drone, I would like to fly the drone with the Rift. I tried it with Oculus overylay (A tool that corrects output fro any app to fit the Rift) but it makes the feed lag so much that i cant use it to fly.

As anyone used the Distortion part of the SDK with WPF ImageSource or .NET?
User avatar
AngelJ
Cross Eyed!
Posts: 102
Joined: Wed Jul 06, 2011 9:47 pm

Re: Distortion correction for WPF ImageSource

Post by AngelJ »

I've never done anything like that, but from googling it, it seems you should be able to apply a pixel shader in WPF since it uses DirectX.

Otherwise, the next version of Deskope should have a good enough frame rate for this type of thing. I'll post here when the next version is ready, or PM me if you want to try a rough version of it now.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Distortion correction for WPF ImageSource

Post by CyberVillain »

There is a MatrixTransform in native WPF, could I use that?
User avatar
AngelJ
Cross Eyed!
Posts: 102
Joined: Wed Jul 06, 2011 9:47 pm

Re: Distortion correction for WPF ImageSource

Post by AngelJ »

I don't think it'd be quite that simple. Sounds like you'd have to use a shader effect:
http://www.codeproject.com/Articles/716 ... cts-in-WPF

You can find the pixel shader in the OVR SDK docs.
StephaneLX
One Eyed Hopeful
Posts: 39
Joined: Mon Sep 03, 2012 10:38 am
Location: Montreal

Re: Distortion correction for WPF ImageSource

Post by StephaneLX »

You can take a look at vr player source code in the distortions folder for pixel shaders examples.

http://vrplayer.codeplex.com

The barrel distortion is the one you are looking for.

-Stephane
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Distortion correction for WPF ImageSource

Post by CyberVillain »

Thanks will look into it!
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Distortion correction for WPF ImageSource

Post by CyberVillain »

A little youtube clip I did today with my Software and barrel distortion through AngelJ cool little program
It was very windy today at our summer place so I did some crashes because the little Toy Drone cant handle wind very well

http://www.youtube.com/watch?v=mZX2Bv5V0gU
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Distortion correction for WPF ImageSource

Post by CyberVillain »

Bonus pic :D

Image
User avatar
AngelJ
Cross Eyed!
Posts: 102
Joined: Wed Jul 06, 2011 9:47 pm

Re: Distortion correction for WPF ImageSource

Post by AngelJ »

Awesome! What's it like flying with the Rift compared to your previous setup?
User avatar
AngelJ
Cross Eyed!
Posts: 102
Joined: Wed Jul 06, 2011 9:47 pm

Re: Distortion correction for WPF ImageSource

Post by AngelJ »

Also, how do you like the ability to look around the window through Deskope? On the one hand it seems like it could disorient you a bit, but on the other hand it seems handy to be able to focus on different things. For instance, in the video I think you glanced over at the bottom view camera as well as the gauges.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Distortion correction for WPF ImageSource

Post by CyberVillain »

Well the low res did cause the second crash in the video because I didnt see the tree branch in time because of the low res.
I guess my Sony HMZ with 45 degrees FOV and true 720p is better once in flight, but the effect of using the Rift is very cool :D I whish it was stereoscopic though :D

I liked that feature alot, because of the low res I cant keep all of the screen in view at the same time, and like you said I did use the feature to look at the bottom camera and the altitude meter. It was strange at first because when I moved the head it also felt like I effected the drones flight, but when my brain got used to it it was just a nice feature.
User avatar
AngelJ
Cross Eyed!
Posts: 102
Joined: Wed Jul 06, 2011 9:47 pm

Re: Distortion correction for WPF ImageSource

Post by AngelJ »

It seems like you were zoomed out a bit. You could gain some resolution back by zooming in. But then maybe the loss of FOV would make it hard to fly, huh?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Distortion correction for WPF ImageSource

Post by CyberVillain »

Yes i Had to zoom out quite a bit to be able too see enough of the screen. I would love to have a drone with 110 degrees FOV and stereo :)
Post Reply

Return to “Oculus VR”