Possible improvements for dense matching
Open
Nobody has claimed this yet.
dense-reconstruction
enhancement
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 899
- PR merge metrics
- No merged PRs in 30d
Description
The current dense matching implementation uses the PatchMatch variant from Shen13
Here is a list of possible improvements to the current implementation.
- Init scores scores properly. Right now scores are initialized to 0. They should be initialized by computing the score of the initial depth map.
- Init depthmaps from sparse point cloud. Depthmap is currently initialized using random values to explore the search space. An alternative would be to initialize it using the SfM points. For example, interpolating the depth of those points for all pixels.
- Ignore homogeneous pixels. Pixel on the sky or on white walls have very little texture information and usually produce no match or an erroneous one. It would be better to not use them at all. Should try removing patches with constant color or constant gradient.
- Sample views instead of checking them all. Currently, if more than one view are used as a reference, the score of a given depth plane is best correlation score amount the reference views. All views are checked in order to compute the best correlation. A faster alternative would be to sample the reference view randomly in a similar way we do for depth and normal. After each all random samples of depth and normal are done, we can sample a random view and check if matching score is better on that other view.
- Filter out depth values without supporters on their neighborhood. When cleaning a depthmap, additionally to checking that other depthmaps agree with a depth value, check that the neighborhood of the point on its depthmap and on the others has enough points/depths nearby. That should remove many more outliers.
- Average matching points instead of keeping just one of them when merging.
- Striding depth computation. Since we use a 7x7 correlation kernel, very little change between one pixel and the next one. One could try computing the depth only every each other pixel to save time and then interpolating. Note that this is different than reducing the image size.
- Approximate the plane induced homography by an affinity. We only use the homographies locally around one pixel so an affinity would be a good approximation. Given the affinity, the warpping for every pixel can be computed by adding vectors.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the current dense matching implementation and reading how depth maps, reference views, neighborhood filtering, and point merging are handled. Choose and scope one unchecked improvement from the issue, then define completion by verifying the matching results or computation cost against the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100