Polar-to-Rect in Flash?
- Started
- Last post
- 6 Responses
- ifeltdave
I realize I'll get few of the answers I need here, but I am desperate!
I need to convert a polar image (from a 360˚ camera) to a cartesian (rectangular) image using Actionscript.
I've found samples using things like processing or C++, but haven't found any that do it in Flash in a reliable and efficient way.
Here is a processing sample of what I'm trying to achieve:
http://www.gaffta.org/tag/dewarp…
Does anyone here know a resource that can pull this off, or have a sample project anywhere? The math seems fairly straightforward, but getting it all to work in Flash is boggling me, and I've wasted a whole day on bogus code I've found on the nets.
Any help is greatly appreciated!
- SteveJobs0
worst case scenario, you could port it from processing. have you ever done any image processing programming? shouldn't be too hard, but potentially time consuming. i'd be surprised if something like this doesn't already exist in flash, but it might not be an open solution that you can just copy/paste.
- SteveJobs0
on second thought, porting from c++ might actually be easier than using a full-on graphics library.. assuming, of course the c++ version only uses classes/routines that were built specifically for this. otherwise you'll have a little overhead.
- mikotondria30
ooh, this sounds familiar - there are some examples of it around. I was looking to do something similar a couple of years ago...
Shit, I thought I had it here somewhere, must have been before my old drive crashed, sorry.
http://www.google.com/search?sou…
is the best I can do : /
- NONEIS0
http://www.adobe.com/cfusion/exc…
Pixel Blender to the rescue?
- fugged0
unfortunately this is the reverse of what you want. but the source my provide some hints on how to get what you need.
- ifeltdave0
awesome hints guys, thanks.
NONEIS: I'm currently fucking with pixel bender to try and do this. I think it's going to be the most optimized way of getting the effect. Looping through every pixel in flash is really f'ing SLOW.
Also, the image will eventually be a streaming video feed that needs to be de-warped on the fly :/