I don't know if this will be useful in practice, though it was an interesting excercise to learn about SharpCap scripting
BUT... I don't know how to close SharpCap after it has captured an image e.g. from the Python script ?
My demo imageJ script to control SharpCap is on https://www.neutronoptics.com/soft/DemoBGfilter.txt with instructions
Unfortunately my script hangs while SharpCap and it's cmd window are open. The usual Windows Taskkill cmd isn't executed
status=exec("taskkill /IM SharpCap*"); //Doesn't execute until the window is closed manually
If I open a new Windows cmd task, I can of course Taskkill whatever I want.
Possibly I can set a timer from imageJ to do that before launching SharpCap, which blocks further imageJ script execution.
Or I may have misunderstood how to launch SharpCap from imageJ without imageJ waiting for SharpCap to finish. Work in progress.
BTW, the video capture example that I modelled my script on uses VirtualDub, which has a command-line switch /x to exit after capture.
I think one can even choose not to display the VirtualDub GUI (Headless mode?) which should speed up execution.
Great fun, though I'm getting too old for this micture of 3 scripting languages
