LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Usb camera for real time

Hi guys, can I use a usb  webcam to capture realtime images of an item coming down a conveyor, it won't be moving very fast, or do I need a more expensive camera for realtime

 

0 Kudos
Message 1 of 5
(1,004 Views)

Do you intend to take a video or a "Snap" (single image)?  If you have the Web Cam, try connecting it up to a PC and see if the video it makes is acceptable to you (I'd suggest placing the camera about where you want it and take pictures of items on the conveyer).

 

Something to think about is what you plan to do with the images.  RT processors typically have less memory and file storage than PCs, and videos (particularly color, high resolution, and modest frame rates) can chew up disk space quite rapidly.

 

Bob Schor

0 Kudos
Message 2 of 5
(941 Views)

Be careful of your terminology here.

 

When talking on these forums real-time more often than not refers to a class of operating system designed to be reliable and deterministic.

 

I am guessing here so correct me if I am wrong, but I suspect you don't mean real-time in this sense, instead do you mean to capture/process live images. If you are talking about a real-time OS, as Bob says you need to think carefully about what you want to do with it and whether it could actually be done on a PC.

 

A few points to consider regarding hardware selection:

- What framerate/frame exposure you need. slower framerates are often linked to (but not always) longer exposures which will cause moving objects to be blurred

- Spatial resolution (pixel resolution), e.g. what is the smallest feature that you need to resolve and what is the total field of view that you need. From this you can work out if you have enough pixels in your frame to resolve the features you need to look at.

- As Bob says, think about what you actually want to do with the images. Image analysis is highly dependant upon lighting conditions and preconditioning of the images. If you have varying/poor lighting conditions this can make you image analysis much more difficult.

 

You might be able to get away with a webcam or IP camera. A USB webcam you are likely to be able to use the image acquisition toolkit to capture live images. IP cameras often have a network stream you can access (MJPEG or something similar) which will require more work.

 

Failing that you may need to go towards an industrial camera which are going to get more expensive 

0 Kudos
Message 3 of 5
(922 Views)

Hi riatross,

Thanks for your detailed reply before, I have a question, I have a while loop with PID controller and vision in it....

When I run the code the vision is slowing up the motor speed(ramping up/down)

So I have made 2 parallel loops, motor control and vision to see will this work...

How can I connect these together simplest way I'm a bit stuck😅

Local variable maybe

 

 

0 Kudos
Message 4 of 5
(883 Views)

Local variables may technically work but are not recommended for a number of reasons.

 

What really matters here is what sort of messages you're sending.  You might want to use a queue, a notifier, channel wires, or something else based on the use case but without know what you need to send from where to where and what it's used for it's hard to make a good recommendation.

 

Also since your new request has little to do with your original one a month ago you might be better served starting a new thread instead of attaching to this one.

0 Kudos
Message 5 of 5
(875 Views)