LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquisition of intensity of light per pixel.

Hi everyone, I'm actually in an internship where I have to create a new Labview system.

My mission is to make the acquisition of a Thorlabs camera on Labview. The problem that I face right now is that the camera give the value of light intensity that it get per pixel and I have to send it on an excel sheet where I'll have  the intensity corresponding for each pixels depending on the time of acquisition. So my question is "how can I get the intensity /pixels ?" and not an unique value wich I don't know where it is coming from.

 

I join you my actual VI wich is not finish. The part in the red fram is the one that I really don't know what to put in.

0 Kudos
Message 1 of 12
(3,212 Views)

Hi Antoine,

 

The problem that I face right now is that the camera give the value of light intensity that it get per pixel … So my question is "how can I get the intensity /pixels ?"

So the camera is giving you intensity per pixel and you ask how to get intensity per pixel?

What exactly is the problem?

 

Why do you wire a "timeout (ms)" value to an input named "byte count"?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 12
(3,195 Views)

I'm going to guess the answer to GerdW's question is that you have a USB camera that is sending frames back to your computer but you don't know how to get that information into LabVIEW. Every camera manufacturer is going to publish at least one API to interface with their cameras. They are not expecting you to parse raw USB values so don't try to reinvent the wheel.

 

I would search online for some API that works with your camera (something like https://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=ThorCam) and if you can't find it online, I would suggest calling up Thorlabs and asking them what APIs they have to read their cameras and if they have any examples showing how to correctly use the API.

 

If I missed the mark on this one let me know.

Matt J | National Instruments | CLA
0 Kudos
Message 3 of 12
(3,187 Views)

Yes, the manufacturer (ThorLabs) has the details of their software to interface your Camera with Windows.  Note that you did not specify the model of the Camera -- ThorLabs makes many camera models, and for some of them, they provide a DLL that can be called from LabVIEW.

 

NI also makes a product, NI Vision, and an API, IMAQ and IMAQdx, that can directly interface with some USB and Ethernet cameras (but I can't see that ThorLabs is included).  This would probably be the simplest way to process Images, but only if the camera is compatible ...

 

Bob Schor

0 Kudos
Message 4 of 12
(3,176 Views)

@Bob_Schor wrote:

 

NI also makes a product, NI Vision, and an API, IMAQ and IMAQdx, that can directly interface with some USB and Ethernet cameras (but I can't see that ThorLabs is included).  This would probably be the simplest way to process Images, but only if the camera is compatible ...


This KB goes over whether it would be supported as well as it possibly can.

 

http://digital.ni.com/public.nsf/allkb/4331B4AA3AE95233862574C200539A2F

 

Things get pretty grey with USB2.0 because there isn't a hard spec for everyone to follow. The camera needs to be DirectShow compatible and it will usually work fine but there are definitely corner cases where you will be SOL.

Matt J | National Instruments | CLA
0 Kudos
Message 5 of 12
(3,169 Views)

Thanks for your reply, first, the "timeout (ms)" is here because I wanted to put an unsigned word but because I'm lazy I just copied pasted one from an old VI. 

 

For your other question, as you can see on the picture linked, on thorlabs software you can record the intensity of light per each pixels, but apparently you can only ask for 1000 scans without controlling the time between each scans (so it take approximately 1min to do all scans), that's why my tutor can't have scans on a long time period, and asked me to use labview to choose the time between scans on purpose to control the period to have scans for about 4min. But I can't find how you can get Intensity/pixels on Labview.

 

Best regards,

A.LETELLIER

0 Kudos
Message 6 of 12
(3,157 Views)

So what I'm trying to do is impossible? Just an API could allow me to recover data like Intensity/pixel for each scan?

 

Thank you for helping me.

 

Best regards,

A.LETELLIER

0 Kudos
Message 7 of 12
(3,156 Views)

I forgot the picture sorry.

0 Kudos
Message 8 of 12
(3,150 Views)

Without looking too much into this specific camera (but having seen people try this before) it's not impossible, just unnecessary. The pixel data is probably in that raw USB stream but you would need to know exactly what the camera is sending back to be able to properly decode that. A lot of manufacturers aren't going to give you enough information to do that yourself but it's usually unnecessary because even if you did have that information you would just end up recreating the API that they provide.

Matt J | National Instruments | CLA
0 Kudos
Message 9 of 12
(3,149 Views)

Thank you for the answer, this link shows the camera that I'm actually working with.

 

https://www.thorlabs.de/newgrouppage9.cfm?objectgroup_id=5290

 

I know that an API could help me on this one but it seems that they don't have one in the Lab.

 

I use Labview for this because my tutor used to use the thorlabs software, but it seems that you can only ask for 1000 scans without controlling the time between each scans (so it take approximately 1min to do all scans), that's why my tutor can't have scans on a long time period, and asked me to use labview to choose the time between scans on purpose to control the period to have scans for about 4min.

 

Best regards,

A.LETELLIER

 

0 Kudos
Message 10 of 12
(3,148 Views)