From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView 2012 CameraLink RealTime image processing problem.

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.

for any help you can provide
for any help you can provide

 

Download All
0 Kudos
Message 1 of 6
(3,197 Views)

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".

Message 2 of 6
(3,156 Views)

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".

0 Kudos
Message 3 of 6
(3,150 Views)

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.

0 Kudos
Message 4 of 6
(3,108 Views)

@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.

Message 5 of 6
(3,059 Views)

... 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.

 

0 Kudos
Message 6 of 6
(3,053 Views)