using ImageMagick within C++ codes

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
nevzus

using ImageMagick within C++ codes

Post by nevzus »

Hello All,
I have two images and I convert them into 2D matrices with intensity values of each pixel. The two images are different representations of the same thing with different intensities and rotated with respect to each other. My purpose is to find the best rotation angle, scaling value and translation amount that maps the second image onto the first image. So, I manipulate the second image to rotate, scale, translate and and compare it to the first image and in each comparison I calculate a chi2 difference between the two images. Then I minimize the chi2 to find the best rotation (R), scaling (S) and translation (T) values. Note that R,S and T are parameters to be optimized by minimization of chi2. For chi2 minimization, I have written my code in C++. I am having trouble to rotate the image matrices. ImageMagick has some good tools. I am wondering if/how I can use these tools directly in C++ code (no API). I could not even find the code that makes the rotation of the image. Maybe I can use system commands to manipulate the image but then I need some code that gives me the difference between two images or a code that converts between image and 2D array..
I appreciate your helps, - Nevzat
Post Reply