04-20-2015 10:01 AM
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
Solved! Go to Solution.
04-21-2015 04:17 AM
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
04-21-2015 06:26 AM
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
04-21-2015 08:45 AM
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
04-21-2015 09:29 AM
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
04-21-2015 09:49 AM
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
04-21-2015 09:53 AM
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