Page 1 of 2

Dobson / ROI stabilization

Posted: Sat Feb 19, 2022 10:10 am
by aquariusCZ
Hi,
ROI shift goes nicely in the script.
But the script does not want to run Cupture.
I have to start the upload before running the script manually.
By manual control, I am able to run the script after 100 saved images at the earliest.
I have to go to the script window.

A "run script" button would be useful.
Regards
Tomas



pan=0
dec=1
SharpCap.SelectedCamera.Controls.Pan.Value = pan
SharpCap.SelectedCamera.RunCapture
while pan< 1024:
SharpCap.SelectedCamera.Controls.Pan.Value = pan
pan=pan+dec
# print (pan)
SharpCap.SelectedCamera.StopCapture
SharpCap.SelectedCamera.Controls.Pan.Value = 0

Re: Dobson / ROI stabilization

Posted: Sat Feb 19, 2022 1:08 pm
by admin
Hi,

you have to call 'PrepareToCapture' before calling RunCapture.

You can already add custom buttons to the toolbar to run scripts - for instance see the script in this thread : viewtopic.php?t=3431

cheers,

Robin

Re: Dobson / ROI stabilization

Posted: Sat Feb 19, 2022 2:29 pm
by aquariusCZ
HI,
Thanks.
I'm close to a solution. :)
What to write to ()?
I want the script to work with preset values.

SharpCap.SelectedCamera.PrepareToCapture ()
SharpCap.SelectedCamera.RunCapture ()
SharpCap.SelectedCamera.StopCapture ()

Regards
Tomas
ROI posun (2).txt
(340 Bytes) Downloaded 141 times
start=0
end=1112
dec=1
pan=start
SharpCap.SelectedCamera.PrepareToCapture
SharpCap.SelectedCamera.RunCapture
SharpCap.SelectedCamera.Controls.Pan.Value = start
while pan< end:
--SharpCap.SelectedCamera.Controls.Pan.Value = pan
--pan=pan+dec
SharpCap.SelectedCamera.StopCapture
SharpCap.SelectedCamera.Controls.Pan.Value = start

- = space

Re: Dobson / ROI stabilization

Posted: Sun Feb 20, 2022 8:39 am
by aquariusCZ
It works. :o :o :o :o :o :o
Thanks for inspiring the thread "Can Scripting to this?" by GregMcKay.

import time
import clr
clr.AddReference ("SharpCap")
from SharpCap.UI import CaptureLimitType
SharpCap.SelectedCamera.CaptureConfig.CaptureLimitType = CaptureLimitType.FrameLimited
start = 0
end = 1120
dec = 0.45 #speed
pan = start
SharpCap.SelectedCamera.PrepareToCapture ()
SharpCap.SelectedCamera.RunCapture ()
SharpCap.SelectedCamera.Controls.Pan.Value = start
while pan <end:
--SharpCap.SelectedCamera.Controls.Pan.Value = pan
--pan = pan + dec
SharpCap.SelectedCamera.StopCapture ()
SharpCap.SelectedCamera.Controls.Pan.Value = start

PS.
- = space

Re: Dobson / ROI stabilization

Posted: Mon Feb 21, 2022 7:36 pm
by aquariusCZ
Hello friends,
this script is for Dobson planetary sensing (non-powered holders).
Allows you to take more than 1000 pictures at a focal length of 7m.
Of course, you need an HD camera that can handle 100 fps.

Using a script:
1 / First set the full resolution and rotate the camera so that the image moves from left to right parallel to the longer side of the chip.
2 / You call the script console and load the script.
3 / Select the ROI and move it to the right manually.
Pan = end value in the script. In the script, override: end = Pan
4 / Move the ROI manually to the left edge. Move Dobson to the object to be scanned into the ROI and run the script (green triangle).
5 / The image starts scrolling and saving starts. Monitor the ROI speed and make sure the image is stable (does not shift).
6 / The speed of movement is affected by the speed value. The smaller the value, this makes the movement slower.

ATTENTION. Because there is interference between the scan cycles and the ROI shift cycle
offset, the speed value is not bound linearly to the ROI shift and precise speed setting requires some experience.
In some speed intervals, even a direct ratio does not apply.
Failed sequences can be deleted during speed testing "Delete last capture" command.

I will look for a better way to set the speed. :)


import time
import clr
start = 0
end = 1072
speed = 0.0005
pan = start
SharpCap.SelectedCamera.PrepareToCapture ()
SharpCap.SelectedCamera.RunCapture ()
SharpCap.SelectedCamera.Controls.Pan.Value = start
while pan <end:
--SharpCap.SelectedCamera.Controls.Pan.Value = pan
--pan = pan + speed
SharpCap.SelectedCamera.StopCapture ()
SharpCap.SelectedCamera.Controls.Pan.Value = start

After copying to the console, replace the characters -- with a space

Re: Dobson / ROI stabilization

Posted: Fri Feb 25, 2022 8:30 am
by aquariusCZ
Hi,
the script works well with ASI482MC and QHY5III178.
QHY HD cameras (462, 290) damage the image when the ROI is shifted.
Tomas

Re: Dobson / ROI stabilization

Posted: Fri Feb 25, 2022 2:31 pm
by admin
Hi,

one thing that the ZWO cameras are very good at is changing the ROI without any glitching of the images. As you've noticed other brands tend to do less well at this (which doesn't often matter, but does in this case).

cheers,

Robin

Re: Dobson / ROI stabilization

Posted: Tue Mar 01, 2022 9:26 pm
by aquariusCZ
Hi,
I wrote to QHY, we'll see ... ;)
Tomas

Re: Dobson / ROI stabilization

Posted: Thu Mar 03, 2022 7:42 am
by aquariusCZ
I'm optimistic, QHY is trying to simulate the error with my script. :)

Re: Dobson / ROI stabilization

Posted: Sun Mar 06, 2022 12:29 pm
by aquariusCZ
Hi,
I want to improve the script algorithm: shift by x by y frames.
I need help, please.

I can't write the command to find out the number of saved images correctly: :?

picture = SharpCap.SelectedCamera.Controls. GetStatus (?,?)

Tomáš