MatlabBeamFitting

Matlab App for fitting gaussian beams using a Thorlabs DCx camera / webcam or just upload a file

https://github.com/syed82ab/MatlabBeamFitting

You are now following this Submission

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.

Cite As

Syed Abdullah Aljunid (2026). MatlabBeamFitting (https://github.com/syed82ab/MatlabBeamFitting/releases/tag/v1.5), GitHub. Retrieved .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.5

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.