09-23-2015 03:42 AM
This is my first post on this forum so I would like to say hallo to every user. I am not very experienced LabView user and to my thesis i need to develop software in LabView 2012 for camera working on cameralink interface. I found example vi and modify it a little to start image acquisition. Now that I have working camera I need to add some image processing. The camera that I use is Basler raL6144-16gm line scan camera. It records one line of 6144 pixels per scan but every image that is displayed contains 1000 scans so we see image in resolution 1000x6144 pixels. The idea is to extract every line from that acquired image and display it as intensity graph. I wrote matlab script that does that operation but although it works swiftly on smaller images, using it on images with high resolution is very time consuming. For about three days I tried to find solution how can I do the same operation in LabView but I failed. I suppose I have to use Vision Development Module functions but still I have no idea how should I start. Maybe better way would be converting image to array and execute processing operations then convert it again to image? Have anyone of you done something similar or know how should I proceed? I would be very thankful for any help. In attachments I add labview VI's that I am currently using, test images for matlab script that i wrote, matlab script, and example of intensity graph acquired from test image. Thank you in advance for any help you can provide. Chris.
09-24-2015 03:20 PM
You're so close to it ...
"IMAQ ImageToArray" is a good starter. Then you can index a row or column (use "Index Array") and wire the result (a 1D array pf pixel values) in a graph. (I do not see an application for an intensity graph here ...) And don't bother the speed: The IMAQ VIs are fast, so you can stop using any matlab code that tries to extract a line pf pixel values from an image 🙂
For arbitrary greyvalue profiles, you might consider using "IMAQ LineProfile VI".
09-24-2015 03:24 PM
Well, I forgot to mention the example code that NI ships with the Vision Development Modue: Have a look at the examples "Image To Array.vi" and optionally "Line Profile.vi".
09-26-2015 05:58 AM
Thank you very much for your response. When my university gave me access to Vision Development Module I found example with Line Profile function and I combined it with VI responsible for acquiring images. I think that is something that my supervisor expects but I still have some problems. For starter now this function works “on event”. When the line is drew or moved, function line profile is triggered and intensity graph is created. I would like it to work like this, that when the line is drew on camera image, intensity graph is created every time when new image is acquired and I am not sure how should I change this VI to achieve this. Second problem is camera triggering. I connected NI PCIe-1433 frame grabber through sma port with external signal generator and no matter what option I choose camera still runs in free run mode. What should I do to make it acquire images on trigger? Again thank you in advance for any help you can provide. Chris.
09-28-2015 01:29 PM
@Krzys_PG wrote:
... I would like it to work like this, that when the line is drew on camera image, intensity graph is created every time when new image is acquired and I am not sure how should I change this VI to achieve this....
Just remove the case structure in your while loop and the graph will update with each incoming image and consider your current coordinates.
09-28-2015 01:36 PM
... Second problem is camera triggering. I connected NI PCIe-1433 frame grabber through sma port with external signal generator and no matter what option I choose camera still runs in free run mode.
I am not the big trigger here in NI-IMAQ - especially doing the correct wiring to the camera and/or 1433 is out of my experience.
Did you check the examples that NI IMAQ comes with? There is a "LL Trigger Stop (Hardware-Synchronized).vi" that looks promising.