Hello,
I need to find a way to automate a repetitive process in the GUI of our experimental setup. Some research suggested me to use 'Pyautogui' library, but wasn't fully sure if that will be enough.
So, we need to ask our ThorLab optical camera to capture the image from a DMD (a digital micromirror device (MEMS)) device at a certain repetition rate (let's say half a second or so), while changing different parameters in the GUI like- threshold, slit sizes and pinhole sizes (all by automatic control). Can anyone please help with the coding and related ideas?
Thanks!
(Aug-17-2023, 02:00 PM)deanhystad Wrote: [ -> ]Looking at the Thorlabs website it looks like they have SDK's for their products. For example, these are for their compact USB cameras.
https://www.thorlabs.com/software_pages/...de=ThorCam
And ong github they have examples of how to use the SDK
https://github.com/Thorlabs
It might be easier to use the SDK and control the camera directly instead of trying to write a Python program to fiddle with the camera software GUI. It appears some people have already done som.
https://stackoverflow.com/questions/6463...hon-opencv
Hi,
many thanks for your response.
Actually we can operate the camera manually with that SDK in our lab. But, at the desired experimental facility, we want to control it remotely, better to be said- to be operated automatically. That is why we were trying for that automatic option if possible to implement.
Thanks.
In the software downloads, there is "Software" and "Programming Interfaces". The "Software" is what you would use to control the camera "manually". It has graphic controls for setting the camera parameters and capturing images. The "Programming Interfaces" is software that lets you write a program that does the same thing "automatically".
If you don't like operating the camera using the "Software", you can write your own program that uses the "Programming Interface" to control the camera instead. Your program can be anything you want. Maybe you hardcode the operations, or maybe you read the operations from a script. The first is easy, but you have to write a new program if you want to change parameters or sequence. The latter is more complicated, but you'll be able to write a new set of camera instructions using a text editor.
(Aug-17-2023, 02:53 PM)deanhystad Wrote: [ -> ]In the software downloads, there is "Software" and "Programming Interfaces". The "Software" is what you would use to control the camera "manually". It has graphic controls for setting the camera parameters and capturing images. The "Programming Interfaces" is software that lets you write a program that does the same thing "automatically".
If you don't like operating the camera using the "Software", you can write your own program that uses the "Programming Interface" to control the camera instead. Your program can be anything you want. Maybe you hardcode the operations, or maybe you read the operations from a script. The first is easy, but you have to write a new program if you want to change parameters or sequence. The latter is more complicated, but you'll be able to write a new set of camera instructions using a text editor.
Hi, just to let you know that I found another solution using tkinter, to create a GUI with a button that executes a loop with different parameters. That might serve the automation process.
Thanks again