Live Collimation Aid

Discussions on extending SharpCap using the built in Python scripting functionality
cyrille.de.brebisson
Posts: 75
Joined: Sun Oct 01, 2023 4:42 pm

Re: Live Collimation Aid

#21

Post by cyrille.de.brebisson »

Hello,

I am trying to use this script to collimate my telescope, but it is not finding the donut...
Can you help me figure out why?
The telescope is a HAC125, it has the camera at prime focus (no 2nd mirror) and the "shadow" is the camera usb cable/connector.

Here is a screen shot:
colimoverlay.jpg
colimoverlay.jpg (358.39 KiB) Viewed 366 times
Thanks,
Cyrille
User avatar
admin
Site Admin
Posts: 17552
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Live Collimation Aid

#22

Post by admin »

Hi,

my guess it is going to be the shadow causing the problem - you could try making a non shadow version of the image in something like Windows Paint, then load that into the SharpCap test camera (drag the saved PNG file into SharpCap) to test to see if that resolves the problem.

Having had a look at the code of the collimation tool, there is a 'Number of Rays' setting that it might be worth changing - either set it higher in the hope that more 'good' rays helps it find the right circle, or set it to the lowest possible then potentially rotate the camera to try to get the lead shadow to fall between the rays so it doesn't get measured (the lowest number seems to be 12, so they will be laid out like the hour markers on a clock face with that setting, so try to get the shadow at '2:30' not '2:00' or '3:00' if that makes sense).

cheers,

Robin
bvalente
Posts: 40
Joined: Mon Aug 08, 2022 4:26 pm

Re: Live Collimation Aid

#23

Post by bvalente »

Hi Cyrille

Please download the latest version from github:
https://github.com/bvalente22/sharpcap- ... on-overlay

It now includes both size and brightness target bars and improved UI overlay rendering.
Make sure you are within the target zone on both of these.

Then I suggest trying different detection algorithms on the Detection tab

I have a similar hyperstar setup that works with the plugin.

You can also try loading one of the sample static images (you can load via the planetary simulator camera type) to make sure the plugin is working properly.

Brian
cyrille.de.brebisson
Posts: 75
Joined: Sun Oct 01, 2023 4:42 pm

Re: Live Collimation Aid

#24

Post by cyrille.de.brebisson »

Hello,

Yes, your advice do make sense.
Unfortunately, it did not work :-( I tried it yesterday evening but to no avail, the script was not able to detect my dougnut :-(

I have 2 telescopes which have collimation issues and I really need to find a good solution to collimate them...

Cyrille
bvalente
Posts: 40
Joined: Mon Aug 08, 2022 4:26 pm

Re: Live Collimation Aid

#25

Post by bvalente »

Cyril can you please save a frame and post it here (png, jpg, etc. is fine) and i will look at it


Brian
cyrille.de.brebisson
Posts: 75
Joined: Sun Oct 01, 2023 4:42 pm

Re: Live Collimation Aid

#26

Post by cyrille.de.brebisson »

Hello,

Thanks so much for taking the time to look at it.

Here is a file.
Cyrille
Attachments
vega.jpg
vega.jpg (197.18 KiB) Viewed 301 times
Howardk
Posts: 138
Joined: Tue Feb 18, 2025 12:40 am
Location: UK

Re: Live Collimation Aid

#27

Post by Howardk »

That looks like your collimation is very good
But…. collimation on an infocus star is really how to do it

I use a tribahtinov mask and skycalc download
You won’t get easier or better collimation on an infocus star in average seeing than this
Jean-Francois
Posts: 858
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Live Collimation Aid

#28

Post by Jean-Francois »

Hello Cyrille,

It works on my system (last 4.2 beta and the last version of the script) with the jpeg image loaded in the Test Camera 2 (high speed).
With the "full" image or here with a smaller area:
Collimation_Test_Vega_image.jpg
Collimation_Test_Vega_image.jpg (384.27 KiB) Viewed 288 times
The number of rays has to be large enough. It works with all 3 algorithm with the "Reset" parameters.
The brightness threshold can be set higher ... so near the maximum intensity of the diffraction ring (inside and outside rings).

Regards,
Jean-Francois
cyrille.de.brebisson
Posts: 75
Joined: Sun Oct 01, 2023 4:42 pm

Re: Live Collimation Aid

#29

Post by cyrille.de.brebisson »

Hello,

"I use a tribahtinov mask and skycalc download"
What is skycalc? Never heard about it....

"It works on my system"
So what did you do exactly? You took a smaller ROI and did you change any of the other parameters?

Thanks,
Cyrille
bvalente
Posts: 40
Joined: Mon Aug 08, 2022 4:26 pm

Re: Live Collimation Aid

#30

Post by bvalente »

Hi Cyrille,

That sample works on my system as well.

First try to use your own vega.jpg image to see if it works for you as well:
In SharpCap's scripting console (Scripting → Console), with the Collimation Aid running:
type:
test_image(r"C:\path\to\vega.jpg") (change C;\path\to\vega.jpg to wherever your vega.jpg file is)

It succeeds → the detector is fine, and the problem is in live frame or saved settings. Continue below.
It fails → config may have drifted from defaults. Run reset_config(), then restart(), then re-run test_image() above.


Next, using the same Console do these commands below. T\Run with the camera live and the star in frame:

debug_on()
# let it run ~30 seconds
debug_off()

Reply back the full debug() output, everything between the ==== lines.

Brian
Post Reply