# Unperspective Matrix

Hello all,

I'm trying to achieve a function like franz's 1024 perspective matrix function, and I haven't had enough coffee to wrap my mind around it!

http://1024d.wordpress.com/

Has anyone had to do this from scratch before, or can anyone shed light on mathematical basis of this?

I'd rather take vector positions from an image, and "unskew" the resulting data, than unskewing the image initially. I feel like understanding what's going on with the image function may help me understand how to make a function that does this with numerical data, instead of texture.

Secondarily, I'd like to understand what is going on with the actual image function better, so I can customize it to a particular need of mine.

Thanks all!

### Re: Unperspective Matrix

I meant "unperspective matrix" in my first sentence - typo.

### Homographic Calibration

This composition uses javascript to demonstrate a (common?) method for calibrating a CV tracking point to a video projection when the projector and tracking camera are in different locations.

One note of importance: when projecting large, at first we had trouble with this matrix transformation not giving accurate results (calibrating IR tracking point to be at the same location on the projection surface). The problem was difficult to solve -- as I understand it, ended up being a 32 vs 64-bit resolution issue in the transformation. At smaller scales the 32-bit numbers worked okay but blowing up the image to large projection size (combined with increasing the angle of projection vs camera location) magnified the floating point discrepancies in the 32-bit numbers. The problem was resolved using the same formula in a max patch, though with 64-bit resolution. (Would running QC in 64-bit solve the issue? Didn't try.)

(We used a separate computer near the tracking camera (ps3eye) running a max patch to do CV tracking and calibration. We then sent x/y coordinate data, etc., over ethernet to a separate computer running QC for graphics.)

(Someone I was working with on a recent project made this comp. I have permission to share. I think it's a nice demo. :) )

PreviewAttachmentSize
Homographic Calibration.qtz43.46 KB

### Re: Unperspective Matrix

Hey, that looks like it's really nice, and it makes a great deal of sense how the matrix math breaks down in the patch. It's a really good demo, I think, and I truly appreciate you sharing it. I think I'm going to give a go at making it work for an arbitrary amount of input structure, and maybe something a little different than the interaction. Again, thanks....darn it's really obvious!

### Re: Unperspective Matrix

Wonderful! Yeah, I like that demo.