LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Live plotting of contour from camera acquisition: best strategy ?

Solved!
Go to solution

Hi every one,

 

I am trying to create a VI to acquire images from a camera (Basler scout). Among the features I need to implement, one is the live plotting of the contour of the gray scale values to enhance their visibility (I am then using it to tune a light source into a centered gaussian distribution).

My issue here is that the images are too big and the whole VI lags, with a new plot appearing every 3 to 5 seconds, which is too long. A constraint is that I must be able to record pictures with full resolution.

Enclosed are 2 easy examples, one using labview only and the other using Matlab to decimate the number of pixels, and a typical result. Both performs similarly, i.e. too slowly.

In the end, the conversion and decimation in matlab seems highly time consuming too... I am not a labview expert so I may have overlooked easier way to have it done but so far I really feel stuck...

So which direction should I follow? Matlab or Labview? What could I use in Labview to reduce the processing time?

 

Hope you can help me,

Best regards,

GL

Download All
0 Kudos
Message 1 of 7
(3,760 Views)

Hey GL,

 

its hard to tell you, why the VI is so slow. I don't own your camera so it would be helpfull if you can provide one image taken by your camera. It would be possible for me to run your code if I can use a image instead of a real camera.

 

Some questions about your hardware:

Which interface does the camera provide?

How big is the picture taken by the camer (pixel)?

Which framegrabber do you use (if used)?

 

Stephan

0 Kudos
Message 2 of 7
(3,730 Views)

Stephan,

Here is a picture from the camera.

The camera is a Basler scout 1400 17gm with gige interface (http://www.baslerweb.com/en/products/area-scan-cameras/scout/sca1400-17gm), picturing at 1392x1040 pixels.

Hope it helps !

Best,

Gael

0 Kudos
Message 3 of 7
(3,718 Views)

Hey Gael,

 

thank you for the picture of the camera.

I played around with you VI and the problem with the execution time seems not to be a problem with your LabVIEW/Matlab code.

The issue is the 3D Countour plot itself.

Please open the example which is located in

 

C:\Program Files (x86)\National Instruments\LabVIEW 2014\examples\Controls and Indicators\Graphs and Charts\Math Plots - 3D\3D Contour Graph.vi

 

Modify the constant on the for loop from 40 to 1000, which is approximately the size of your picture. After you run this modified exmaple: Lags the control if you try to modifiy the view angle?

 

Stephan

0 Kudos
Message 4 of 7
(3,710 Views)

Stephan,

Indeed its lags then...

So reducing the number of pixel to be plot should be the right direction, as in the second VI with matlab. But the decimation method I use is time consuming too, so the final benefit is limited...

Is there a way to do it efficiently with Labview? like a low quality grab function or an efficient data decimation?

Best regards,

Gael

0 Kudos
Message 5 of 7
(3,704 Views)
Solution
Accepted by topic author Gawel

Hi again,

I found that using a 2d intensity graph is partially meeting my requirements, but I am still interested to have a solution for a 3D plot !

Best,

Gael

0 Kudos
Message 6 of 7
(3,694 Views)

A low quality grab function is technical not possible and therefore not available.

 

IMAQ Resample could work for you.

Vision and Motion >> Vision Utilities >> Image Manipulation >> IMAQ Resample.vi

0 Kudos
Message 7 of 7
(3,689 Views)