Page 1 of 1

Custom tracking algorithm

Posted: Sun May 10, 2020 10:33 am
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

Re: Custom tracking algorithm

Posted: Sun May 10, 2020 11:01 am
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

Re: Custom tracking algorithm

Posted: Sun May 10, 2020 2:21 pm
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

Re: Custom tracking algorithm

Posted: Mon May 11, 2020 4:24 pm
by admin
Hi,

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


Cheers, Robin