Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers



Measure Laser Beam profile with webcam/industrial cam & open source software

_Wim_

New member
Joined
Apr 10, 2021
Messages
10
Points
3
Hi All,

Just a tip which might be interesting to some user here: I have been using "Open Beam Profiler for ImageJ" for quite a while, and it is quite good (sorry, I am still not allowed to post links, but google search should find the software easily.

For those who do not know ImageJ, it is an open source software package that has an enormous amount of plugins that allow you to perform almost any measurement your want to perform and images.

So you need to install ImageJ and the plugin "Open Beam Profiler". This allows to analyze your laser beam profile, as I have done below for a few examples. To do this, you need a webcam or industrial camera with the CCD exposed, as their should be no optical lens in between. To lower the sensitivity of the CCD, I placed some neutral density filters in front. I use a uEye Camera UI-5240CP-M-GL camera, but ImageJ has plenty of options to work with webcams also (just remove the lens from the webcam so the CCD is exposed). When you know the type of CCD that is used, you can even calibrate the beam size by entering the pixel dimensions of the CCD.

This can be used in "live view" while for example adjusting a collimator. I have found this a very useful tool, and it was free (because I already had the camera)

beam profile HP 81551 with collimator.pngbeam profile Anritsu MG034e with collimator.PNG
 



CurtisOliver

Well-known member
LPF Site Supporter
Joined
Jun 12, 2015
Messages
7,492
Points
113
Thanks for sharing Wim, that is a cool software and neat way of making your own profiler.
Just don't have webcam. :p
 

Georgi96

New member
Joined
Jan 3, 2022
Messages
6
Points
1
Thanks for sharing, Wim!
I want to make a beam profiler, and this is a really helpful post as the software part is in that way resolved. I wanted to ask if there is a typical circuit for evaluating the CCD sensor? Unfortunately, I could not find a thread in the forum regarding DIY beam profiler. I want to buy myself a CCD sensor and make the circuit myself to read the data on Raspberry Pi. The other opportunity is to buy the sensor and a sensor driver circuit separate. I have in general, some experience with analog circuits and ADC, but I am still not sure what type of circuit I need for the CCD. I would appreciate any information about self-made beam profiler. I just do not want to buy a new beam profiler.
Thanks in advance!
 

bostjan

Active member
Joined
Dec 29, 2011
Messages
288
Points
43
Thanks for sharing, Wim!
I want to make a beam profiler, and this is a really helpful post as the software part is in that way resolved. I wanted to ask if there is a typical circuit for evaluating the CCD sensor? Unfortunately, I could not find a thread in the forum regarding DIY beam profiler. I want to buy myself a CCD sensor and make the circuit myself to read the data on Raspberry Pi. The other opportunity is to buy the sensor and a sensor driver circuit separate. I have in general, some experience with analog circuits and ADC, but I am still not sure what type of circuit I need for the CCD. I would appreciate any information about self-made beam profiler. I just do not want to buy a new beam profiler.
Thanks in advance!
If you are using RPi, why not use the PiCam and just remove the lens? All of the drivers are open source, so you could potentially save yourself a lot of backend work.
 

Georgi96

New member
Joined
Jan 3, 2022
Messages
6
Points
1
If you are using RPi, why not use the PiCam and just remove the lens? All of the drivers are open source, so you could potentially save yourself a lot of backend work.
Thank you for the response bosjan. As usual, I went first the long way(as a newly graduated engineer):cautious:, wanted to do everything by myself, and did not think about taking a camera. But removing the lens and using the PiCam should work. Thank you a lot for the response!
 

bostjan

Active member
Joined
Dec 29, 2011
Messages
288
Points
43
Shoot, I just noticed that the availability of RPi's is now backorders going back to May or June. I hope you already have one!

If you get the PiCamera, you can also get the NoIR version. Without the IR filter, it might be able to work on a wider variety of diode lasers in the shorter wavelength NIR range. I'm still not entirely sure what the practical cutoff is, but mine works okay with 980 nm. I think the limit might not be much higher than that, though.
 

Georgi96

New member
Joined
Jan 3, 2022
Messages
6
Points
1
If you are using RPi, why not use the PiCam and just remove the lens? All of the drivers are open source, so you could potentially save yourself a lot of backend work.
Hi bostjan, I am coming back to your suggestion to use the Pi camera. I have bought the Pi 4B+ and the Pi camera and have installed the Laser Beam Profiler on the Pi with Raspbian 32. The Open Beam Profiler works fine on the raspberry, but unfortunately, the plugin Webcam Capture does not work. The Webcam capture allows one to use the camera as a live input in ImageJ. Without this plugin, one can only use the Laser Beam Profiler on existing pictures and videos, but not on live sources from the camera. I have struggled for several days to find an online solution so that the plugin runs, but I have failed. The main problem is the driver of the camera. The Plugin Webcam Capture is based on the webcam capture library written by sarxos. On the GitHub of the library, there is an issue Nr. 375 explains a possible solution to the problem because a lot of people are struggling to run this library on the PI. Unfortunately, I do not have experience with Java, and I can not implement the suggested possible solution.

So, in conclusion, If someone manages to make the webcam capture work on the Py, the Pi + Pi Camera + Open beam profiler can be used. Besides that, I am running Open Beam Profiler on Linux and Windows, and it is running very well. So I just wanted to try it on the Pi as it gives
 

bostjan

Active member
Joined
Dec 29, 2011
Messages
288
Points
43
I wish I could help.

I have a no IR PiCam and a grating. I thought I found the software on instructables dot com, but when I checked, I cannot find the package I am using. This one looks pretty similar, though: https://www.instructables.com/Spectrometer-phablabs/

Maybe whoever curates these packages isn't keeping them up or something. I'm sure you can find a complete package online, though. Sorry if I was inaccurate about how easy this would be - maybe I just got lucky with mine.
 




Top