LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Realtime camera image processing

Hello everyone,
I would have a question regarding realtime image processing. I have to track a rising bubble in water and according to its position my experiment is supposed to change the flow settings via a DAQ System. I need to track the bubble (a black circle on white background) and calculate its x,y position. Im currently using the Vision Module and the inline processing to make a threshold and a circular detection. The camera is a Logitec Webcam C270 and I'm using LabView 2015.
I have two separate Problems now.

1. Since the object is moving fast I need at least 30 Hz repetition to accurately determine the position. I manually reduced the exposertime to remove the motion blur. For the processing a threshold filter, a mask, a small object removal and the circular detection is used to find the object. I'm using the Vision Assistant for the processing. Which works fine but it is too slow
My question now, does anyone have an idea how I could speed up the process?

2. The bubble is supposed to be created by a button press in my main VI. When I integrate the tracking system the camera image, even without the processing and tracking is reduced to 5 frames per second. I tried it adding it directly in the main VI and as a SubVI both show the same result. LabView seems to get stuck in some of the while loops. Could someone please help me integrate it correctly, so that the tracking Vi runs in the background and sends constantly the x,y position to the main and be able to use simultaneously a button that generate the bubble? So the experiment regulates the flow automatically by its self with the camerasystem and a manual bubble generation.

I attached the the main Vi and the tracking Vi. I removed the actual DAQ Modules and send the values to a numeric display. The main Vi has 3 taps. The first one is to manual the flow, the second one is planed to be the auto mode, in the tired the contains some values for the experiment to work properly. The tired Vi and the txt files are for one of the experiment components to send the correct values.

I hope some can help me I'm stuck on the problem and have no really idea anymore how to fix it.

Thank you in advance
Katharina

0 Kudos
Message 1 of 2
(3,802 Views)

We can't run your VI because the sample image is not provided: Provide sample image.

-Use SubVIs to make the code simpler.

-Use Project to bundle all the SubVIs together.

-From LabVIEW: Local and global variables are advanced LabVIEW concepts. They are inherently not part of the LabVIEW dataflow execution model. Block diagrams can become difficult to read when you use local and global variables, so you should use them carefully. Misusing local and global variables, such as using them instead of a connector pane or using them to access values in each frame of a sequence structure, can lead to unexpected behavior in VIs. Overusing local and global variables, such as using them to avoid long wires across the block diagram or using them instead of data flow, slows performance.

Ref:  http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/using_local_and_global/

 

-Vision acquisition is taking more time or processing?

-Why not use the LabVIEW VIs instead of Vision assistant?

-Why to use inversion after thresholding instead can look for Dark Objects isn't it?

-Why do you need wait(ms) inside sequence structure?(which does enforcing DATA FLOW)

-Use select instead of case structure to reduce BD space.

 

Read through LabVIEW basics:

NI Learning Center

NI Getting Started

LabVEW Basics

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction

LabVIEW Graphical Programming Course

Using the Context Help Window

LabVIEW Inbuilt Examples

Thanks
uday
0 Kudos
Message 2 of 2
(3,762 Views)