Register    Login    Forum    Search    FAQ

Board index » Software » Linux




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post Posted: Thu Apr 20, 2017 7:09 pm 
Offline

Joined: Thu Apr 20, 2017 6:50 pm
Posts: 1
Hi all,

I've written my own image capture application using the Linux SDK to control an ASI120MC. In general everything is working fine, but I have noticed an issue which seems to occur if I take a long exposure (1s or longer) without first commanding the camera to take a short exposure (I'm using 100us). I've tried with Linux SDK versions v0.4.0929 and v0.6.0328 and the problem occurs with both. Here is a summary of what my code does to generate the problem:

ASIOpenCamera(CamNum);
ASIInitCamera(CamNum);
ASISetROIFormat(CamNum, width, height, bin, (ASI_IMG_TYPE)Image_type);
ASISetControlValue(CamNum, ASI_GAMMA, gammavar, ASI_FALSE);
ASISetControlValue(CamNum, ASI_GAIN, gain, ASI_FALSE);
ASISetControlValue(CamNum, ASI_BANDWIDTHOVERLOAD, 40, ASI_FALSE);
ASISetControlValue(CamNum, ASI_WB_R, wbr, ASI_FALSE);
ASISetControlValue(CamNum, ASI_WB_B, wbb, ASI_FALSE);
ASISetControlValue(CamNum, ASI_EXPOSURE, 2000000, ASI_FALSE);
ASIStartExposure(CamNum, ASI_FALSE);
usleep(10000);
while((status == ASI_EXP_WORKING)
{
ASIGetExpStatus(CamNum, &status);
}
if(status == ASI_EXP_SUCCESS)
{
ASIGetDataAfterExp(CamNum, (unsigned char*)pRgb->imageData, pRgb->imageSize);
}

This will work fine for a while, but usually after a few minutes it will fails with the status set to ASI_EXP_FAILURE. Now if I do the following instead it will actually work fine:

ASIOpenCamera(CamNum);
ASIInitCamera(CamNum);
ASISetROIFormat(CamNum, width, height, bin, (ASI_IMG_TYPE)Image_type);
ASISetControlValue(CamNum, ASI_GAMMA, gammavar, ASI_FALSE);
ASISetControlValue(CamNum, ASI_GAIN, gain, ASI_FALSE);
ASISetControlValue(CamNum, ASI_BANDWIDTHOVERLOAD, 40, ASI_FALSE);
ASISetControlValue(CamNum, ASI_WB_R, wbr, ASI_FALSE);
ASISetControlValue(CamNum, ASI_WB_B, wbb, ASI_FALSE);
ASISetControlValue(CamNum, ASI_EXPOSURE, 100, ASI_FALSE);
ASIStartExposure(CamNum, ASI_FALSE);
usleep(10000);
while((status == ASI_EXP_WORKING)
{
ASIGetExpStatus(CamNum, &status);
}

ASISetControlValue(CamNum, ASI_EXPOSURE, 2000000, ASI_FALSE);
ASIStartExposure(CamNum, ASI_FALSE);
usleep(10000);
while((status == ASI_EXP_WORKING)
{
ASIGetExpStatus(CamNum, &status);
}
if(status == ASI_EXP_SUCCESS)
{
ASIGetDataAfterExp(CamNum, (unsigned char*)pRgb->imageData, pRgb->imageSize);
}

The code above is summarised to show the general order of what I'm doing. Has anybody else seen this behaviour? Any ideas would be appreciated.

Regards
Simon


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 1 post ] 

Board index » Software » Linux


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: