Distortion correction for WPF ImageSource
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Distortion correction for WPF ImageSource
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?
As anyone used the Distortion part of the SDK with WPF ImageSource or .NET?
- AngelJ
- Cross Eyed!
- Posts: 102
- Joined: Wed Jul 06, 2011 9:47 pm
Re: Distortion correction for WPF ImageSource
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.
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.
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Distortion correction for WPF ImageSource
There is a MatrixTransform in native WPF, could I use that?
- AngelJ
- Cross Eyed!
- Posts: 102
- Joined: Wed Jul 06, 2011 9:47 pm
Re: Distortion correction for WPF ImageSource
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.
http://www.codeproject.com/Articles/716 ... cts-in-WPF
You can find the pixel shader in the OVR SDK docs.
-
- One Eyed Hopeful
- Posts: 39
- Joined: Mon Sep 03, 2012 10:38 am
- Location: Montreal
Re: Distortion correction for WPF ImageSource
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
http://vrplayer.codeplex.com
The barrel distortion is the one you are looking for.
-Stephane
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Distortion correction for WPF ImageSource
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
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
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
- AngelJ
- Cross Eyed!
- Posts: 102
- Joined: Wed Jul 06, 2011 9:47 pm
Re: Distortion correction for WPF ImageSource
Awesome! What's it like flying with the Rift compared to your previous setup?
- AngelJ
- Cross Eyed!
- Posts: 102
- Joined: Wed Jul 06, 2011 9:47 pm
Re: Distortion correction for WPF ImageSource
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.
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Distortion correction for WPF ImageSource
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 I whish it was stereoscopic though
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.
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 I whish it was stereoscopic though
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.
- AngelJ
- Cross Eyed!
- Posts: 102
- Joined: Wed Jul 06, 2011 9:47 pm
Re: Distortion correction for WPF ImageSource
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?
-
- Petrif-Eyed
- Posts: 2166
- Joined: Mon Jun 22, 2009 8:36 am
- Location: Stockholm, Sweden
Re: Distortion correction for WPF ImageSource
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