Position and waists are returned in millimeters and angle in degrees
Resize Factor shrinks the image by the factor (4) to improve fitting time.
Pixel Conv performs a convolution of the nearest neighbours to smoothen out the image
Rotation angle rotates the image to match the beam axis. Use this if the beam axis doesn't match camera(image) axis. Check box Fixed Rotation will make this a free parameter for fitting.
xmin (ymin) is the minimum image pixel to fit the image and witdh (height) of the box to fit in pixels. This is useful if the beam is in a very small part of the image. This is represented by the green box
Pixel size is the multiplication factor for calculating the x/y position and x/y waist.
Output of the fit are X and Y positions (with respect to green box), gaussian beam waist in x and y all in mm. The resize factor is reversed to give the actual value of position and waists based on pixel size.
Needs Optimazation toolbox for fitting, Image Processing toolbox for resize and rotation of image and image acquisition toolbox with support for USB Webcam for getting images from USB webcam. Thorlabs DCx needs DotNet dlls from Thorlabs. Thorlabs Scientific cameras not supported yet
Use predefined test images to test fitting functions. Only Gaussian fits currently implemented.
Syed Abdullah Aljunid (2021). MatlabBeamFitting (https://github.com/syed82ab/MatlabBeamFitting/releases/tag/v1.5), GitHub. Retrieved .
There's a memory leak somewhere that causes the app using Thorlabs live camera to hog memory after a few hours of usage. Simply switch to fixed image and then back to the camera to clear the memory once in a while.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!