void* pMem1 |
A void pointer to the first image buffer. |
void* pMem2 |
A void pointer to the second image buffer. |
long lRow1 |
The start row, in pixels, of the sub-image area to use
in calculating the statistics. |
long lRow2 |
The end row, in pixels, of the sub-image area to use
in calculating the statistics. |
long lCol1 |
The start column, in pixels, of the sub-image area to use
in calculating the statistics. |
long lCol2 |
The end column, in pixels, of the sub-image area to use
in calculating the statistics. |
long lRows |
The row size of the full image ( in pixels ). |
long lCols |
The column size of the full image ( in pixels ). |
int bpp |
[optional] The bits-per-pixel used in the image.
Default: CImage::BPP16 |
// This code demonstrates how to print out the difference
// stats for two flat field images over the entire image.
#include <iostream>
#include "CImage.h"
using namespace std;
using namespace arc;
int main()
{
unsigned short *pBuf1 = NULL;
unsigned short *pBuf2 = NULL;
//
// Assign pBuf1/2 pointers to image data that
// can be directly from a camera or from an
// existing FITS file, etc.
//
// .....
try {
CImage cImg;
//
// pBuf1 & 2 represent image buffers that contain
// 1024x1200 pixel images.
//
CImage::CImgDifStats cDifStats = cImg.GetDiffStats( pBuf1,
pBuf2,
1024,
1200 );
cout << "pBuf1 min: " << cDifStats.cImg1Stats.gMin
<< "pBuf1 max: " << cDifStats.cImg1Stats.gMax << endl;
cout << "pBuf2 min: " << cDifStats.cImg2Stats.gMin
<< "pBuf2 max: " << cDifStats.cImg2Stats.gMax << endl;
cout << "Diff min: " << cDifStats.cImgDiffStats.gMin
<< "Diff max: " << cDifStats.cImgDiffStats.gMax << endl;
}
catch ( std::exception &e )
{
cerr << "Exception Occurred: " << e.what() << endl;
}
}
© Astronomical Research Cameras, Inc.