PDA

View Full Version : How to print the pixels in the matrix format?



roselin
11-02-2003, 11:38 PM
hai,

i have created a cube in the wireframe model and stored it as a jpg image.after that i rotated that cube and saved it as another image.After loading these images i want to have their pixel values in a matrix format to prove that the rotated image is from the first image.

Matrix of the rotated image = matrix of the original image * Rotation matrix

Am i correct?Then how would i proceed with the matrices?
please help me....

Obli
11-03-2003, 03:24 AM
Just think at what would happen if you rotate your cube 90 degrees along say, the +y axis...

Even assuming an algo will allow you to figure out what you want, that algo would return identity by processing the two images.
Also note that dumping to a jpeg (or to any other format by the way) implicates some sort of quantization and this means some rotations are simply not detectable (think at very little rotations or at the cube spinning on +y).

I guess you should have asked this in a math related forum since this is all but related to the GL itself - I can see a very weak connection.

Christian Schüler
11-03-2003, 09:02 AM
So you have 2 images and want an algorithm to correlate them and spit out a transformation matrix?

I feel like you need to build some covariance-tensor, but I really can't help with any specifics.

Look out for a libaray called "ITK toolkit", it can do these things.