mirror of
https://github.com/opencv/opencv.git
synced 2026-09-19 15:23:23 -05:00
Removed unused variables found by pylint.
This commit is contained in:
@@ -112,7 +112,7 @@ class BilinearFilter(object):
|
|||||||
out[yy] = np.round(np.sum(img[ymin : ymin + ymax, 0:out.shape[1]] * k[:, np.newaxis], axis=0))
|
out[yy] = np.round(np.sum(img[ymin : ymin + ymax, 0:out.shape[1]] * k[:, np.newaxis], axis=0))
|
||||||
|
|
||||||
def imaging_resample(self, img, xsize, ysize):
|
def imaging_resample(self, img, xsize, ysize):
|
||||||
height, width, *args = img.shape
|
height, width = img.shape[0:2]
|
||||||
bounds_horiz, kk_horiz, ksize_horiz = self._precompute_coeffs(width, xsize)
|
bounds_horiz, kk_horiz, ksize_horiz = self._precompute_coeffs(width, xsize)
|
||||||
bounds_vert, kk_vert, ksize_vert = self._precompute_coeffs(height, ysize)
|
bounds_vert, kk_vert, ksize_vert = self._precompute_coeffs(height, ysize)
|
||||||
|
|
||||||
@@ -232,7 +232,6 @@ class CpVton(object):
|
|||||||
return Li
|
return Li
|
||||||
|
|
||||||
def _prepare_to_transform(self, out_h=256, out_w=192, grid_size=5):
|
def _prepare_to_transform(self, out_h=256, out_w=192, grid_size=5):
|
||||||
grid = np.zeros([out_h, out_w, 3], dtype=np.float32)
|
|
||||||
grid_X, grid_Y = np.meshgrid(np.linspace(-1, 1, out_w), np.linspace(-1, 1, out_h))
|
grid_X, grid_Y = np.meshgrid(np.linspace(-1, 1, out_w), np.linspace(-1, 1, out_h))
|
||||||
grid_X = np.expand_dims(np.expand_dims(grid_X, axis=0), axis=3)
|
grid_X = np.expand_dims(np.expand_dims(grid_X, axis=0), axis=3)
|
||||||
grid_Y = np.expand_dims(np.expand_dims(grid_Y, axis=0), axis=3)
|
grid_Y = np.expand_dims(np.expand_dims(grid_Y, axis=0), axis=3)
|
||||||
@@ -397,7 +396,7 @@ class CorrelationLayer(object):
|
|||||||
|
|
||||||
def getMemoryShapes(self, inputs):
|
def getMemoryShapes(self, inputs):
|
||||||
fetureAShape = inputs[0]
|
fetureAShape = inputs[0]
|
||||||
b, c, h, w = fetureAShape
|
b, _, h, w = fetureAShape
|
||||||
return [[b, h * w, h, w]]
|
return [[b, h * w, h, w]]
|
||||||
|
|
||||||
def forward(self, inputs):
|
def forward(self, inputs):
|
||||||
|
|||||||
Reference in New Issue
Block a user