How to make a script for (almost) real-time processing of a video stream

Discussions on extending SharpCap using the built in Python scripting functionality
Post Reply
Kimmo
Posts: 1
Joined: Tue Mar 23, 2021 11:31 am

How to make a script for (almost) real-time processing of a video stream

#1

Post by Kimmo »

Hi

I have a Lunt LS50 hydrogen alpha solar telescope.
Instead of looking at the eyepiece, I like to view on a computer screen a live stream of a camera attached to a telescope.
However, the image is 'jumping' around due to atmospheric turbulence. So I would like to remove the effects of turbulence, at almost real-time.
I think a simple running mean of a video stream would make the video much smoother.

I got the following advice from Robin Glover, the author of SharpCap:

" One can use SharpCap's python scripting to intercept frame data either just after the frame is captured from the camera or just before it is displayed on screen.
See this thread for intercepting the frame after capture : viewtopic.php?p=5686#p5686
and BeforeFrameDisplay here - viewtopic.php?t=3389
You can, if you wish use native (C/C++ code) from the python code for performance reasons. You can even write your own code in C# DLLs and use the python scripting to glue it together with SharpCap's code."

I am not very good in coding. Is there anybody who could help me with writing a code which could process a video stream from a camera, and display the processed video on a screen ?

Cheers, Kimmo
Post Reply