opencv-starry-sky-panorama-stitcher

OpenCV Starry Sky Panorama Stitcher

Motivation

Collecting images for a fisheye panorama

For an all sky fisheye panorama starry sky images should be taken according to a plan.

For an 18 mm lens this setup yields good overlap between the images:

ORB keypoint/descriptor matching vs. shape/constellation matching

OpenCV matchers can match keypoints/descriptors, which are single points on each image:

On starry sky images, especially on images with a low amount of stars and a dark unique background, this can become problematic because »many stars look the same«.

Matching star constellations would be helfpful but OpenCV matchers are not able to match constellations – they are just able to match keypoints/descriptors.

The StarPolygonMatcher presented here provides this functionality:

Star constellations or polygons are compared based on angles, side lengths and star brightnesses.

For a 5-sided polygon like shown above there are 5 vertex angles, 5 side lengths and 5 star brightnesses.

The vertex angles and side lengths are not measured in the image plane! The stars from the image plane are projected to a sphere in the physical real world. Angles and side lengths are then measured on this sphere leveraging spherical trigonometry. The radius of this sphere does not matter since side lengths of spherical triangles are measured in radian.

The panorama stitching pipeline

Examples

Example 1: Stitching daylight images, Example 2: Colorizing seams and edges (Keypoints detected by ORB, Stars detected by Canny Edge, ORB features generated from stars detected by Canny Edge, Matches (inliers) found via ORB keypoing matching, Reducing the amount of stars by sklearn.cluster.AgglomerativeClustering, Matching polygons (star constellations) found by the Custom Star Polygon Matcher, Matches (inliers) found via StarPolygonMatching, Warped images, Seams, Colorized edges, Assembled panorama)

Example 3: Removing the waviness effect, Example 4: Projections (warp modes), Example 5: Rotating cameras, Example 6: ORB matching results vs. CustomStarPolygon matching results

Left to do

December 2022

Joachim Broser