Short-bus / pilomar

RaspberryPi based miniature observatory
https://shortbus.blog/
GNU General Public License v3.0
63 stars 14 forks source link

Tree branches confuse astroalign #54

Closed Short-bus closed 5 months ago

Short-bus commented 5 months ago

The attached images show a case where there are trees in the field of view and it seems to confuse the astroalign routine. The branches are being recognised as potential stars. As a workaround have suggested trying shorter exposure times in TrackingExposureSeconds, reducing from 5 seconds to 1 or 2 seconds to see if a darker image helps the real stars stand out better in the image.

Original Tracking_Analysis image Jeff_Trees_Analysis

Original Latest_Tracking image Jeff_Trees_Latest

Original Target_Tracking image Jeff_Trees_Target

Short-bus commented 5 months ago

Adding experimental new parameter "TrackingUrbanFilter". Default (False) - means no effect. When set to True, the program uses OpenCV to try to remove 'haze' from the image. It also reduces the impact of tree branches in the image.

The filter blurs the image horizontally to establish a background light level for the image. This blurred image is subtracted from the live captured image. The result is then passed to the pilomarimage.EnhanceStars() method. EnhanceStars() applies OpenCV's Gaussian Blur and Threshold methods to isolate the stars that remain.

Needs to be tested and tuned with more observations.

Before applying the UrbanFilter: BeforeUrbanFilter

After applying the UrbanFilter: AfterUrbanFilter

Short-bus commented 5 months ago

2024-01-issues has a workaround in the new filter scripts, these can be further adjusted now via the parameter file.