Skip to content

Commit

Permalink
lint: black, pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
Marian Rassat committed Feb 19, 2025
1 parent b87735d commit 2ce3ad9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
22 changes: 20 additions & 2 deletions cars/applications/dense_matching/cpp/dense_matching_cpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,27 @@ def mask_left_classif_from_right_mask(
...


def estimate_right_grid_disp(disp_min_grid, disp_max_grid):
def estimate_right_grid_disp_int(disp_min_grid, disp_max_grid):
"""
Estimate right grid min and max.
Estimate right grid min and max for int inputs.
Correspond to the range of pixels that can be correlated
from left -> right.
If no left pixels can be associated to right, use global values
:param disp_min_grid: left disp min grid
:type disp_min_grid: numpy ndarray
:param disp_max_grid: left disp max grid
:type disp_max_grid: numpy ndarray
:return: disp_min_right_grid, disp_max_right_grid
:rtype: numpy ndarray, numpy ndarray
"""
return None, None


def estimate_right_grid_disp_float(disp_min_grid, disp_max_grid):
"""
Estimate right grid min and max for float inputs.
Correspond to the range of pixels that can be correlated
from left -> right.
If no left pixels can be associated to right, use global values
Expand Down
12 changes: 6 additions & 6 deletions cars/applications/dense_matching/dense_matching_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,15 +927,15 @@ def estimate_right_grid_disp(disp_min_grid, disp_max_grid):
return dense_matching_cpp.estimate_right_grid_disp_float(
disp_min_grid, disp_max_grid
)
elif disp_min_grid.dtype in int_types:
if disp_min_grid.dtype in int_types:
return dense_matching_cpp.estimate_right_grid_disp_int(
disp_min_grid, disp_max_grid
)
else:
raise TypeError(
"estimate_right_grid_disp does not support"
f"{disp_min_grid.dtype} as an input type"
)

raise TypeError(
"estimate_right_grid_disp does not support"
f"{disp_min_grid.dtype} as an input type"
)


def optimal_tile_size_pandora_plugin_libsgm(
Expand Down

0 comments on commit 2ce3ad9

Please sign in to comment.