void* pMem |
A void pointer to the 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 min/max
// pixel value for an image.
#include <iostream>
#include "CController.h"
#include "CImage.h"
using namespace std;
using namespace arc;
int main()
{
try {
CController cController;
CImage cImg;
// ....
//
// Take an image, which will reside in the kernel
// image buffer ( cController.mapFd )
//
// ....
//
// Assumes a 512x600 pixel image was taken and resides
// in the kernel image buffer ( cController.mapFd )
//
CImage::CImgStats cImgStats = cImg.GetStats( cController.mapFd,
512,
600 );
cout << "Image min: " << cImgStats.gMin
<< "Image max: " << cImgStats.gMax << endl;
}
catch ( std::exception &e )
{
cerr << "Exception Occurred: " << e.what() << endl;
}
}
© Astronomical Research Cameras, Inc.