cars.applications.sparse_matching.sparse_matching_tools
Sparse matching Sift module: contains sift sparse matching method
Module Contents
Functions
|
Compute sift matches between two datasets |
|
This function will filter the match vector |
|
This function will compute the disparity range |
|
Compute disp min and disp max from matches |
- cars.applications.sparse_matching.sparse_matching_tools.dataset_matching(ds1, ds2, matching_threshold=0.6, n_octave=8, n_scale_per_octave=3, dog_threshold=20, edge_threshold=5, magnification=2.0, backmatching=True)
Compute sift matches between two datasets produced by stereo.epipolar_rectify_images
- Parameters
ds1 (xarray.Dataset as produced by stereo.epipolar_rectify_images) – Left image dataset
ds2 (xarray.Dataset as produced by stereo.epipolar_rectify_images) – Right image dataset
threshold (float) – Threshold for matches
backmatching (bool) – Also check that right vs. left gives same match
- Returns
matches
- Return type
numpy buffer of shape (nb_matches,4)
- cars.applications.sparse_matching.sparse_matching_tools.remove_epipolar_outliers(matches, percent=0.1)
This function will filter the match vector according to a quantile of epipolar error used for testing compute_disparity_range sparse method
- Parameters
matches (numpy array) – the [4,N] matches array
percent (float) – the quantile to remove at each extrema
- Returns
the filtered match array
- Return type
numpy array
- cars.applications.sparse_matching.sparse_matching_tools.compute_disparity_range(matches, percent=0.1)
This function will compute the disparity range from matches by filtering percent outliers
- Parameters
matches (numpy array) – the [4,N] matches array
percent (float) – the quantile to remove at each extrema (in %)
- Returns
the disparity range
- Return type
float, float
- cars.applications.sparse_matching.sparse_matching_tools.derive_disparity_range_from_matches(corrected_matches, orchestrator=None, disparity_margin=0.1, pair_key='PAIR_0', pair_folder=None, disp_to_alt_ratio=None, disparity_outliers_rejection_percent=0.1, save_matches=False)
Compute disp min and disp max from matches
- Parameters
cars_orchestrator – orchestrator : used for info writing
corrected_matches (np.ndarray) – matches
disparity_margin (float) – disparity margin
pair_key (int) – id of pair : only used for info writing
disp_to_alt_ratio (float) – used for logging info
disparity_outliers_rejection_percent (float) – percentage of outliers to reject
save_matches (bool) – true is matches needs to be saved
- Returns
disp min and disp max
- Return type
float, float