Custom tracking algorithm

Discussions on extending SharpCap using the built in Python scripting functionality
Post Reply
Matty
Posts: 3
Joined: Sun May 10, 2020 10:26 am

Custom tracking algorithm

Post by Matty »

Hello,

I want to use sharpcap to capture and track on custom features, for example fit a circle and track that (for solar limb tracking).
Is there anywhere an example for both parts, fetching a frame while recording, and send tracking commands back to the mount?

I have the algorithm already ready (tested in post-processing after capturing).

Kind regards,
Matthias
User avatar
admin
Site Admin
Posts: 5233
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Custom tracking algorithm

Post by admin »

Hi,

you can get notified of each frame like this

Code: Select all

def Handler(*args)
	bitmap = args[1].Frame.GetFrameBitmap()
	// do stuff with the bitmap
	bitmap.Dispose()

// register for the event
SharpCap.SelectedCamera.BeforeFrameDisplay += Handler


// unregister later
SharpCap.SelectedCamera.BeforeFrameDisplay -= Handler
You can also move the mount - like this

Code: Select all

// the parameters match the ASCOM MoveAxis call - https://ascom-standards.org/Help/Developer/html/M_ASCOM_DriverAccess_Telescope_MoveAxis.htm
SharpCap.Mounts.SelectedMount.MoveAxis(axis, rate)
Hope this helps, Robin
Matty
Posts: 3
Joined: Sun May 10, 2020 10:26 am

Re: Custom tracking algorithm

Post by Matty »

Hello Robin,
yes, that will help, thank you!
I'm basically trying to implement limb/circle tracking, for example for solar photography with high gain/exposure time (i.e. solar disk is white, and (currently) you only have very few features on the limb), because in this case feature tracking likes to track on noise.

Other question, is there some kind of official Sharpcap-Repository?

Kind regards,
Matty
User avatar
admin
Site Admin
Posts: 5233
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Custom tracking algorithm

Post by admin »

Hi,

No, sadly no official place to put script snippets and samples except for in the forums here.


Cheers, Robin
Post Reply