03-06-2018 04:55 AM - edited 03-06-2018 04:56 AM
Hello
im new on labwindows traying to excute this code but i have problem debuging i dont now why , help pleas thks
code :
#include "niimaq.h"
#include "nivision.h"
main ()
{
//declare variables
INTERFACE_ID iid;
SESSION_ID sid;
Int8* ImaqBuffer=NULL; //NI-IMAQ image
Image* myImage = NULL; //IMAQ Vision image
//Initialize interface and session
imgInterfaceOpen ("img0", &iid);
imgSessionOpen (iid, &sid);
imgSnap (sid, (void **)&ImaqBuffer); //NI-IMAQ function
myImage = imaqSnap (sid, myImage, IMAQ_NO_RECT); //IMAQ Vision function
}
03-08-2018 07:19 AM
Hello,
Img0 should correspond to the camera name defined in NI MAX such as show in the image from this link
http://digital.ni.com/public.nsf/allkb/CCC5BB5990AA416786256C23006E687C
Make sure that is the correct name, and try using some CVI examples first to be sure the error is not comming from your code
Paolo_P
Certified TestStand Architect
Certified LabVIEW Architect
National Instruments France
03-08-2018 07:23 AM
Hello
thanks for help i know why i have this problem becaus i dont use an NI camera im using just a webcam devices its why i have this error
thaks
03-08-2018 09:06 AM
It can work as well with a Webcam, it just need to be DirectShow compliant and use IMAQdx as main driver for your webcam
more details:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6COSA0
Paolo_P
Certified TestStand Architect
Certified LabVIEW Architect
National Instruments France