Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't open interface in Visual Stuido

Everytime I use imgInterfaceOpen() function to access my camera,this function will return a negative value,which means I can't access to the camera interface.

Is there anything wrong with my code?

 

BTW:I can access to the camera with example code of IMAQ.

 

 

void AcquireThread::Acquire(void)
{
sprintf_s(intfName, "img0");//img0 Basler///img3 Atmel
imgInterfaceOpen(intfName, &Iid);
imgSessionOpen(Iid, &Sid);
AcqWinWidth = globalOptions->IMAGEWIDTH;
AcqWinHeight = globalOptions->IMAGEHEIGHT;

imgSetAttribute2(Sid, IMG_ATTR_ROI_WIDTH, AcqWinWidth);
imgSetAttribute2(Sid, IMG_ATTR_ROI_HEIGHT, AcqWinHeight);
imgSetCameraAttributeNumeric(Sid, "Exposure Time", 12);

 

....

}

 

 

0 Kudos
Message 1 of 1
(4,506 Views)