// This code demonstrates how to get the histogram for a
// previously taken 512x600 pixel CCD image that currently
// resides in the kernel image buffer (CController::mapFd).
#include <iostream>
#include "CController.h"
#include "CImage.h"
using namespace std;
using namespace arc;
int main()
{
CController cController;
try {
// .... previously exposed quad readout
// .... image resides in kernel buffer
// .... at CController.mapFd
CImage cImg;
long lHistSize = 0;
long *lHist = cImg.Histogram( &lHistSize,
cController.mapFd,
512,
600 );
for ( int i=0; i<lHistSize; i++ )
cout << "hist[ " << i << " ]: " << lHist[ i ] << endl;
}
catch ( std::exception &e )
{
cerr << "Exception Occurred: " << e.what() << endl;
}
}
© Astronomical Research Cameras, Inc.