LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

webcam

hi
I amusing a web cam on usb and to acquire picture i am using third party software i.e  peter James lib for labview. i am having following problem if any body can help me.
i want to change the dimension of the acquire picture. it ask me width and height by default it takes 320 and 200 for width and height repsectievely .however on values lower than any of these two values the vi crashes saying labview has memory error in the grab.vi (this vi is provided by peter james lib).any help
my second question is i am using labview 7.1 when i use peter james lib to acquire image it runs fine but when i close this vi the labview crashes any  remedy for it.
Dost
0 Kudos
Message 1 of 12
(4,333 Views)

First, could you be talking about the webcam library from Peter Parente?

Second, it's hard to be specific without the code, but it sort of sounds like there is either an error in the code, or perhaps the library is doing some math that doesn't work when the size parameters are smaller than 300x200.

Third, the other problem is very typical of the kind of thing that can happen when a library function call isn't done just right.

Could you post the code--including the library?

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 12
(4,327 Views)
here is the code  .please check where i did wrong.
0 Kudos
Message 3 of 12
(4,319 Views)

I have used this library in LV6.1 for exactly the same job. I had also this problem. It is more related to your webcam than the library. disconnect your webcam from the USB port and try smaller sizes! you won't get any fatal error and the program works fine. needless to say, you'll have a black box instead of the picture when your cam is disconnected. after each running session try resizing the picture box to feel it.

I think there isn't any problem with the library and the webcam itself can not transfer pictures with any desired size.

about your second problem, my code was fine in LV6.1 and just now I tested it with LV7.1. there was not any crashing!

Can you tell, why you are saving JPEG and PNG files in every iteration of the while loop? Is it necessary? Do you use these files somewhere else in your application simultaneously?

 

0 Kudos
Message 4 of 12
(4,307 Views)
thanks 4 reply tell  me how can i reduced size on my web cam . i am saving pic becaz i will make them access via mobile 4 remote monitoring
0 Kudos
Message 5 of 12
(4,296 Views)
Are  you wanting to scale the image to a smaller size, or crop some portion out of the image? Also what size are you wanting? 320x200 is already pretty small.
 
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 12
(4,288 Views)

As far as I know there are only some limited picture sizes for webcams and the smallest size of mine is 320*200! I think you should think of a way to shrink the captured picture programmatically.

Also I suggest that you consider using a delay node in your while loop.

 

0 Kudos
Message 7 of 12
(4,282 Views)
You are right i want to use it for mobile so ineed small size image. secondly i do nt know about delay node what is it and whedre i can found it i mean in which palette.
0 Kudos
Message 8 of 12
(4,271 Views)
does labview has any utilty to reduce the size of the picture or image?
0 Kudos
Message 9 of 12
(4,270 Views)
You will find waiting functions in "Time & Dialog" palette in the function palette! It is very common to use a "wait" node in a "while loop".
 
What is your desired size for the picture? As Mike said, 320*200 is pretty small. Can't you change the resolution of the monitoring device's screen? I think you have selected to solve this problem by doing the most difficult job! there should be an easier way.
 
Think of the picture as a 2D array. resizing it, while preserving the quality?? I don't dare to try to write the code myself!
 
If I were you and resizing the picture was the only possible way, I would start another thread: "How to Resize a picture" this topic will interest more expert people!
 
Hope this helps.
Goodluck!
0 Kudos
Message 10 of 12
(4,262 Views)