Nearest neighbor interpolation for disparity images with missing parts.
Project description
Fast nearest-neighbor interpolation of disparity maps using Cython
Some stereo matching methods such as Semi-Global Matching (SGM) might provide sparse disparity maps, meaning that some pixels will not have valid disparity values. In those cases, an interpolation of the predicted disparity map might be needed for evaluation against semi-dense ground-truth, as in the KITTI Stereo 2015 benchmark.
Usage example:
import disparity_interpolation
def interpolate_disparity(disparity_map: np.array) -> np.array:
"""Intepolate disparity image to inpaint holes.
The expected run time for a stereo image with 2056 × 2464 pixels is ~50 ms.
"""
# Set the invalid disparity values defined as "0" to -1.
disparity_map[disparity_map == 0] = -1
disparity_map_interp = disparity_interpolation.disparity_interpolator(disparity_map)
return disparity_map_interp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
disparity_interpolation-1.0.3.tar.gz
(115.6 kB
view hashes)
Built Distributions
Close
Hashes for disparity_interpolation-1.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d16a7222fd2ccf066a66b71ee64144959daf37c39cf66e4aa00608697f74154 |
|
MD5 | ad502449aa4becb10742e3fe9b6a5d03 |
|
BLAKE2b-256 | 8b46f03fcefb713365f64c6e8165cc0341f73ecba20aef0cb65e34c3e3f52027 |
Close
Hashes for disparity_interpolation-1.0.3-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | afcec58c8ab30d67f2baac9b36719bbc042f56c0e241f53962dffa4616c4ebdc |
|
MD5 | 9fd5577fc8564acadc598d5c72dcb8b1 |
|
BLAKE2b-256 | 8f4ecc3b4f3674a150692100244ad01a76e5b2e7916453bca31515977066ba28 |
Close
Hashes for disparity_interpolation-1.0.3-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 723147d706a413c16375299c7547a85dbb2c41e5460dded74bb26445dff709aa |
|
MD5 | 4862bfb8a1c0bf81f564b324da93fce3 |
|
BLAKE2b-256 | e2ddb5e478b936072dcbc9547caa7ad83c96da1192b029e86b05118c4c03b9bd |
Close
Hashes for disparity_interpolation-1.0.3-cp36-cp36m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba9293e9605de5581a8edd634fd62ffd7e5785ee4202b94549b38bb422be4d5b |
|
MD5 | e4f4fcf9d01a5b7cc65f993a539198f0 |
|
BLAKE2b-256 | 91fb2eedebc745c3c4582c9a25c5d84dabb74dc286addcfe755843b2548700a8 |