Anomaly with RestartPreview command
Posted: Sun Dec 23, 2018 6:00 am
Hi,
I am experiencing an anomaly when using the "SharpCap.SelectedCamera.RestartPreview()" command.
I have a script that moves the mount every once in a while for dithering purposes, but of course the previews continue to run. Whilst I wait until the mount has stopped moving before grabbing the frame with "SharpCap.SelectedCamera.CaptureSingleFrame()", the frame is blured because the capture has continued whilst the mount was moving.
My solution to this is to use "SharpCap.SelectedCamera.RestartPreview()" when the mount has stopped moving so the blurred frame is effectively discarded, but the RestartPreview command has some weird side effects. Most notably, in the frame caputured after the restart, the colour balance is upset and there are other changes in the image.
It maybe that the restart command is re-initialising the camera or similar, rather than just ditching the current capture. Does that make sense?
My actual script has too many dependancies to make posting it here viable, but the effect can also be seen by invoking the "SharpCap.SelectedCamera.RestartPreview()" manually in the IronPython Console window whilst a preview is in progress. (I've set up my camera pointing at a daytime scene with a very dark filter to make 5 to 10 second exposures practical.) If the restart command is executed whilst captures are running, every few frames the displayed image is corrupted.
I'm using an OSC ASI178MC capturing to PNG files with SharpCap 3.2.
Thanks
Steve
I am experiencing an anomaly when using the "SharpCap.SelectedCamera.RestartPreview()" command.
I have a script that moves the mount every once in a while for dithering purposes, but of course the previews continue to run. Whilst I wait until the mount has stopped moving before grabbing the frame with "SharpCap.SelectedCamera.CaptureSingleFrame()", the frame is blured because the capture has continued whilst the mount was moving.
My solution to this is to use "SharpCap.SelectedCamera.RestartPreview()" when the mount has stopped moving so the blurred frame is effectively discarded, but the RestartPreview command has some weird side effects. Most notably, in the frame caputured after the restart, the colour balance is upset and there are other changes in the image.
It maybe that the restart command is re-initialising the camera or similar, rather than just ditching the current capture. Does that make sense?
My actual script has too many dependancies to make posting it here viable, but the effect can also be seen by invoking the "SharpCap.SelectedCamera.RestartPreview()" manually in the IronPython Console window whilst a preview is in progress. (I've set up my camera pointing at a daytime scene with a very dark filter to make 5 to 10 second exposures practical.) If the restart command is executed whilst captures are running, every few frames the displayed image is corrupted.
I'm using an OSC ASI178MC capturing to PNG files with SharpCap 3.2.
Thanks
Steve