I'm acquiring some images with an ASI178MM monocrhome camera, via the ASI SDK C++ functions.
I took some of the functions in some of the SDK C++ examples, and adapted the functions to my use.
While the functions themselves work as intended, and I'm able to acquire images without issues, I was wondering whether there are some ways to speed up the time it takes to acquire an image.
I understand that the exposure time affects how long the camera sensor is exposed to the light, and my exposure time is 10 ms in this specific example. Yet, the camera on average takes just over 0.3 seconds to acquire an image.
Below is the adapted C++ function for snapping a single image from my ASI178MM camera:
bool CameraMMSnap(unsigned char* imageBuff, int imageSize)
{
ASIStartExposure(CameraGuideIdx, ASI_FALSE);
usleep(CaptureDelay * 1000000);
ASI_EXPOSURE_STATUS status = ASI_EXP_WORKING;
int iters = 0;
while (status == ASI_EXP_WORKING)
{
ASIGetExpStatus(CameraGuideIdx, &status);
iters++;
if (iters >= CameraSnapTimeout)
{
cout << "ERROR: MM camera snap timeout!\n";
return false;
}
}
if (status == ASI_EXP_SUCCESS)
{
ASIGetDataAfterExp(CameraGuideIdx, imageBuff, imageSize);
return true;
}
cout << "ERROR: MM camera snap failure!\n";
return false;
}
With CaptureDelay
above retaining a value of 1 ms.
The only camera parameters I set when initializing the camera are ASI_EXPOSURE
and ASI_BANDWIDTHOVERLOAD
, set with the following function calls:
ASISetControlValue(cameraIdx, ASI_EXPOSURE, 10000, ASI_FALSE);
ASISetControlValue(cameraIdx, ASI_BANDWIDTHOVERLOAD, 40, ASI_FALSE);
Both of these were taken straight from the SDK C++ examples.
So, for an exposure time of 10 ms, and a manual delay of 1 ms, the function above takes 300 ms to acquire an image. If I try to use the ASI software to take images from this camera, it clearly takes far less than that to acquire an image, therefore I'm obviously missing something.
Are there any other paramteres of the camera that I could set in order to improve the time it takes for this camera to acquire an image? Where is most of that delay coming from? Am I missing something in my code above?
Thanks for reading my post, any guidance is appreciated.