07-16-2012 07:36 AM
Hey Mike,
I'm having trouble getting the saved image to have the same view as the view shown on the VI (see attached). I tried looking through the sub-VIs but the deeper I go, the more complicated the code gets. I just want both windows to look the same so that the window seen first is the image captured by the webcam. Any help/advice you can give would be wonderful.
Thanks,
James
07-16-2012 08:15 AM
I've actually figured it out! Thanks!
07-16-2012 11:19 AM
So what did you do ?
It will help others if you explain how you have fixed your problem.
07-17-2012 07:41 AM
I ended up just removing that window on the front panel, since it was only showing a window of the actual webcam image (still not sure why that is...). I just used the 'write JPEG file' function to save the picture file, which when opened displayed the correct image.
09-12-2012 08:40 AM
Hey guys,
I'm working on this again... Now I want to be able to turn this into a subvi that automatically takes a picture using the webcame and saves the file. I've removed the while loop and the 'get' button, which works properly. But then, when I turn the VI into a subVI and test it in another VI, it doesn't work...
I'm thinking it has something to do with actually displaying the live stream. I don't need this feature anymore anyways, so is there an easy way to remove it? I've been toying around, removing chunks of code, but it only makes the program crash.
Thanks,
James
01-27-2013 09:46 PM - edited 01-27-2013 09:48 PM
Mike's program makes 2 windows for the video. Sometimes my video appeared in one, sometimes in the other. I think it's because both windows are declared in the same frame without specific order of execution. I removed the second window and the associated code. I also removed the cases that don't execute due to the constant on the case selector. I used Write PNG File function from the Graphics and Sound > Graphics Formats pallette to save the image. It works great! Interestingly, the "Picture" image only shows a corner of the video image, but the saved file has the full image. I have LabVIEW 8.5 FDS and Windows 7 Professional 64-bit. My camera is a video microscope. Thanks, Mike and Kangkang! Next I'll try to put this into another VI...
01-28-2013 03:42 PM
Hi Mike, James, and others who have tried to use this program...
Before putting an edited version of Mike's program into another VI, I tried "building" it as an application. The application gives 8 empty dialog windows which close when I press the <CR> key. Then it crashes. So I tried building just one of the SubVIs - FindWindowA - as an application. This one crashes with no dialog box at all. I use AB every day and haven't seen this before. LabVIEW 8.5 on Windows Pro 7 64-bit. Anyone have ideas? Thanks. Halden
01-28-2013 04:27 PM - edited 01-28-2013 04:37 PM
It turns out to have something to do with the dlls! The Application Builder made avicap32 and user32 dll files and put them in a folder called "data" for use by the executable program. I suspected that maybe these dlls were special, since they're in the OS. So, I found the ones in the Windows>System32 folder and made "shortcuts" to them. I moved the shortcuts to the "data" folder and removed "Shortcut" from the name. It works! But gee, it'd be great if LabVIEW could provide a more informative error message for situations like this. The only content in the blank dialog boxes is that the first one had a white interior, the next 7 grey, and they had slightly different sizes. -Halden
01-28-2013 06:24 PM
Don't do this at all! Just remove the DLLs in the data folder altoghether. The reason LabVIEW adds them in a built is, that when someone edited those VIs he probably browsed to the DLL in the system32 directory and confirmed the file dialog. This enters the entire path to the DLL into the Call Library Node. But a full path is an indication to the LabVIEW application builder that the DLL is a private build and should be added to the built application.
However ALL DLLs in system32 (and possibly windows) directory are either Windows DLLs or are installed by a specific software installer and should never get copied to the application directory. This is especially true for all the Windows DLLs such as kernel32, gdi32, user32, avicap32 etc.
The proper fix is therefore to go into all Call Library Nodes and make sure that the library path contains just the DLL name without any other path component. Then the application Builder will not add those DLLs to the build anymore and your application will be fine.
05-31-2013 08:37 AM
It is possible to have a version for LabView 8.0?