mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-07 10:08:17 +08:00
Removed debug print and corrected formatting
This commit is contained in:
@@ -12,7 +12,7 @@ from ._geometric import (warp, warp_coords, estimate_transform,
|
||||
from ._warps import swirl, resize, rotate, rescale, downscale_local_mean
|
||||
from .pyramids import (pyramid_reduce, pyramid_expand,
|
||||
pyramid_gaussian, pyramid_laplacian)
|
||||
from seam_carving import seam_carve
|
||||
from .seam_carving import seam_carve
|
||||
|
||||
|
||||
__all__ = ['hough_circle',
|
||||
@@ -45,4 +45,4 @@ __all__ = ['hough_circle',
|
||||
'pyramid_expand',
|
||||
'pyramid_gaussian',
|
||||
'pyramid_laplacian',
|
||||
'seam_carve']
|
||||
'seam_carve']
|
||||
|
||||
@@ -78,7 +78,6 @@ cdef find_seam_v(cnp.double_t[:, ::1] energy_img, cnp.int8_t[:, ::1] track_img,
|
||||
for row in range(rows-2, -1, -1):
|
||||
col = seam[row + 1]
|
||||
offset = track_img[row, col]
|
||||
#print offset
|
||||
seam[row] = seam[row + 1] + offset
|
||||
|
||||
return seam
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _seam_carving import _seam_carve_v
|
||||
from ._seam_carving import _seam_carve_v
|
||||
from .. import util
|
||||
from .._shared import utils
|
||||
import numpy as np
|
||||
|
||||
@@ -32,3 +32,7 @@ def test_seam_carving():
|
||||
|
||||
out = transform.seam_carve(img3, 'vertical', 1, energy, border=0)
|
||||
testing.assert_allclose(out, 0)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
np.testing.run_module_suite()
|
||||
|
||||
Reference in New Issue
Block a user