How to print the pixels in the matrix format?

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…

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.

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.