mapillary / mapillary/OpenSfM

The undistort function for equirectangular images assumes width = 2*height which is not always correct

Open
#387 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement sfm-reconstruction
Dominant language
Python
Stars
3.8k
Forks
899
PR merge metrics
No merged PRs in 30d

Description

In some equirectangular images, the width is not equal to 2x the height. In these cases, the denormalized_image_coordinates is incorrect, since the normalized coordinates will range from -0.25 to 0.25 (height) and -0.5 to 0.5 (width). This can cause the function to crash or to produce poor multiview stereo results. The fix is simple. For equirectangular images, modify denormalized_image_coordinates to multiply normalized value by width (for x value) and 2*height (for y value). This impacts only the rendering to perspective images.

Separately, the SfM can be improved for 360 images by undistorting, computing features on undistorted images, and projecting feature coordinates back to the 360 images, rather than computing features on the equirectangular images.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the undistort function and its denormalized_image_coordinates calculation, then inspect the rendering-to-perspective path. Reproduce the behavior with an equirectangular image whose width is not twice its height and verify that x uses the width while y uses twice the height, without regressing standard dimensions.

Written by the indexing model from the issue text.

Assessment

Tech stack
opencv, python
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.