GaryTan Posted July 12, 2008 Report Share Posted July 12, 2008 Hi, Now I'm doing some research using webcams. I'm trying to use .dll to call the webcams in LabVIEW 7.1. The VI I used is come from Pete's homepage. That VI appears ok with 1 webcam, but it cannot take any picture when try to use another webcam (different brand and model). The result just a black image and seems like VI cannot detect the appearence of the 2nd webcams. Do u guys know what happend? How can i slove this proble? Or should i use two same model of webcams? Instead using .dll, should I just use ActiveX to control? THX... Quote Link to comment
TobyD Posted July 12, 2008 Report Share Posted July 12, 2008 QUOTE (GaryTan @ Jul 11 2008, 02:41 AM) How can i slove this proble? Can you post your code so we can see what you have done so far. Also, what model of webcams are you using? Quote Link to comment
GaryTan Posted July 15, 2008 Author Report Share Posted July 15, 2008 QUOTE (TobyD @ Jul 11 2008, 10:57 PM) Can you post your code so we can see what you have done so far. Also, what model of webcams are you using? This is the site i downloaded the VI http://mindtrove.info/software/labview-webcam-library/ And I'm using this one to capture image. But it just not working with 2 webcams. The webcams i use are acer built in camera (crystal eye) and logitech webcam. Quote Link to comment
TobyD Posted July 15, 2008 Report Share Posted July 15, 2008 QUOTE (GaryTan @ Jul 11 2008, 02:41 AM) The result just a black image and seems like VI cannot detect the appearence of the 2nd webcams. From the http://mindtrove.info/software/labview-webcam-library/' rel='nofollow' target="_blank">website's FAQ... QUOTE My webcam won't work with your library. All I get is a black image when I run your examples. Will it not work with my camera? Make sure you have passed the correct driver number to the Webcam Initialize VI. You can determine what the correct driver number should be by running the Get Digitizers VI included with the library. It will return a list of webcam digitizer names and their associated driver numbers. Pass the driver number shown in this VI to the intialize VI. Are you able to get each camera to work individually. If not, then get a second camera that is the same as the one that works. If you can get each to work individually, then you are probably running into an issue where the driver for one camera is not compatible with the second camera. You might be able to resolve the issue by creating a second copy of all the VIs in the webcam package and giving them each a unique name (I.E. Initialize2.vi, Capture2.vi, etc.). That way each can get initialized with its own driver and all communication with each camera will remain separate (I haven't looked at the code yet and depending on the architecture this may or may not work). Quote Link to comment
GaryTan Posted July 16, 2008 Author Report Share Posted July 16, 2008 STR#_11400.bin.txt QUOTE (TobyD @ Jul 14 2008, 10:15 PM) From the http://mindtrove.info/software/labview-webcam-library/' rel='nofollow' target="_blank">website's FAQ... Are you able to get each camera to work individually. If not, then get a second camera that is the same as the one that works. If you can get each to work individually, then you are probably running into an issue where the driver for one camera is not compatible with the second camera. You might be able to resolve the issue by creating a second copy of all the VIs in the webcam package and giving them each a unique name (I.E. Initialize2.vi, Capture2.vi, etc.). That way each can get initialized with its own driver and all communication with each camera will remain separate (I haven't looked at the code yet and depending on the architecture this may or may not work). I did use the GetDigitizer VI to obtain the 2nd webcam's driver. It just showed the same driver with the 1st webcam. They now just can't work separately in the VI environment. If the situation is just like what u mentioned, i think using 2webcams with same model might be solve this problem. But i wonder what will happen when they both are called since they are using same driver. This what happened when i try to test the 2nd webcams in Win.Vista The webcam's indicator did switch on but eventually cant get anything and this situation happened. Quote Link to comment
GaryTan Posted July 29, 2008 Author Report Share Posted July 29, 2008 HI, I'm back again with question. I'm facing the problem showed below. Can somebody help me on this? THX Quote Link to comment
Tim_S Posted July 29, 2008 Report Share Posted July 29, 2008 QUOTE (GaryTan @ Jul 28 2008, 05:06 AM) HI, I'm back again with question. I'm facing the problem showed below. Can somebody help me on this? THX I typically see that message when the CIN doesn't match the DLL's function call. Tim Quote Link to comment
GaryTan Posted July 30, 2008 Author Report Share Posted July 30, 2008 QUOTE (Tim_S @ Jul 29 2008, 01:22 AM) I typically see that message when the CIN doesn't match the DLL's function call.Tim May I know what is CIN? And how should I solve this matter? Thx. Quote Link to comment
Tim_S Posted July 30, 2008 Report Share Posted July 30, 2008 QUOTE (GaryTan @ Jul 28 2008, 10:23 PM) May I know what is CIN?And how should I solve this matter? Thx. A CIN is a Code Interface Node. This is how LabVIEW performs DLL calls. The CIN must be configured identically to the DLL's expectation or LabVIEW can crash. Tim Quote Link to comment
crelf Posted July 30, 2008 Report Share Posted July 30, 2008 QUOTE (Tim_S @ Jul 29 2008, 12:43 PM) A CIN is a Code Interface Node. This is how LabVIEW performs DLL calls. The CIN must be configured identically to the DLL's expectation or LabVIEW can crash. I *think* you're using Pete Parente's USB camera drivers, right? If so, the CIN is down in his VIs, and it's not in yours. What I think everyone is trying to say is that there is some error down at that level. That's not really going to help you though, as Pete stopped supporting those drivers at last 5 years ago. Quote Link to comment
GaryTan Posted July 31, 2008 Author Report Share Posted July 31, 2008 QUOTE (Tim_S @ Jul 30 2008, 12:43 AM) A CIN is a Code Interface Node. This is how LabVIEW performs DLL calls. The CIN must be configured identically to the DLL's expectation or LabVIEW can crash.Tim No wonder my program can only functions properly sometimes. QUOTE (crelf @ Jul 30 2008, 02:19 AM) I *think* you're using Pete Parente's USB camera drivers, right? If so, the CIN is down in his VIs, and it's not in yours. What I think everyone is trying to say is that there is some error down at that level. That's not really going to help you though, as Pete stopped supporting those drivers at last 5 years ago. Yup...You are correct. I'm using his drivers for my works now. As mentioned above, my VI only works properly sometimes. I did notice the error on this when executing my VI, but can't get any way to solve it. Do you have any idea on this? Or perhaps i should try different method to call the webcam instead using dll. Quote Link to comment
crelf Posted July 31, 2008 Report Share Posted July 31, 2008 QUOTE (GaryTan @ Jul 29 2008, 10:07 PM) As mentioned above, my VI only works properly sometimes. If it's an intermittant problem, then it's not the CIN DLL prototype. Those drivers were only a little experiment that Pete did while at university. Personally, I wouldn't use them. Quote Link to comment
GaryTan Posted July 31, 2008 Author Report Share Posted July 31, 2008 QUOTE (crelf @ Jul 30 2008, 11:31 AM) If it's an intermittant problem, then it's not the CIN DLL prototype. Those drivers were only a little experiment that Pete did while at university. Personally, I wouldn't use them. Now I'm going to use ActiveX control. Hopefully this method will works well in my works. Yet, I'm still thinking is there a way to solve the situation (just for my curiosity). Quote Link to comment
curiouspuya Posted December 2, 2010 Report Share Posted December 2, 2010 Hi I know its been a long time since this thread was active but wanted to know if you managed to get both cameras working using activex in the end? Cheers p QUOTE (crelf @ Jul 30 2008, 11:31 AM) Now I'm going to use ActiveX control. Hopefully this method will works well in my works. Yet, I'm still thinking is there a way to solve the situation (just for my curiosity). Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.