@@ -460,19 +460,19 @@ def test_square_image():
460460
461461 # Harris
462462 results = peak_local_max (
463- corner_harris (im , method = 'k' ), min_distance = 10 , threshold_rel = 0
463+ corner_harris (im , method = 'k' ), min_distance = 10 , threshold = 0
464464 )
465465 # interest at corner
466466 assert len (results ) == 1
467467
468468 results = peak_local_max (
469- corner_harris (im , method = 'eps' ), min_distance = 10 , threshold_rel = 0
469+ corner_harris (im , method = 'eps' ), min_distance = 10 , threshold = 0
470470 )
471471 # interest at corner
472472 assert len (results ) == 1
473473
474474 # Shi-Tomasi
475- results = peak_local_max (corner_shi_tomasi (im ), min_distance = 10 , threshold_rel = 0 )
475+ results = peak_local_max (corner_shi_tomasi (im ), min_distance = 10 , threshold = 0 )
476476 # interest at corner
477477 assert len (results ) == 1
478478
@@ -510,23 +510,23 @@ def test_noisy_square_image():
510510 im = im + rng .uniform (size = im .shape ) * 0.2
511511
512512 # Moravec
513- results = peak_local_max (corner_moravec (im ), min_distance = 10 , threshold_rel = 0 )
513+ results = peak_local_max (corner_moravec (im ), min_distance = 10 , threshold = 0 )
514514 # undefined number of interest points
515515 assert results .any ()
516516
517517 # Harris
518518 results = peak_local_max (
519- corner_harris (im , method = 'k' ), min_distance = 10 , threshold_rel = 0
519+ corner_harris (im , method = 'k' ), min_distance = 10 , threshold = 0
520520 )
521521 assert len (results ) == 1
522522 results = peak_local_max (
523- corner_harris (im , method = 'eps' ), min_distance = 10 , threshold_rel = 0
523+ corner_harris (im , method = 'eps' ), min_distance = 10 , threshold = 0
524524 )
525525 assert len (results ) == 1
526526
527527 # Shi-Tomasi
528528 results = peak_local_max (
529- corner_shi_tomasi (im , sigma = 1.5 ), min_distance = 10 , threshold_rel = 0
529+ corner_shi_tomasi (im , sigma = 1.5 ), min_distance = 10 , threshold = 0
530530 )
531531 assert len (results ) == 1
532532
@@ -539,11 +539,11 @@ def test_squared_dot():
539539 # Moravec fails
540540
541541 # Harris
542- results = peak_local_max (corner_harris (im ), min_distance = 10 , threshold_rel = 0 )
542+ results = peak_local_max (corner_harris (im ), min_distance = 10 , threshold = 0 )
543543 assert (results == np .array ([[6 , 6 ]])).all ()
544544
545545 # Shi-Tomasi
546- results = peak_local_max (corner_shi_tomasi (im ), min_distance = 10 , threshold_rel = 0 )
546+ results = peak_local_max (corner_shi_tomasi (im ), min_distance = 10 , threshold = 0 )
547547 assert (results == np .array ([[6 , 6 ]])).all ()
548548
549549
@@ -580,7 +580,7 @@ def test_subpix_edge(dtype):
580580 img [:25 , :25 ] = 255
581581 img [25 :, 25 :] = 255
582582 corner = peak_local_max (
583- corner_harris (img ), min_distance = 10 , threshold_rel = 0 , num_peaks = 1
583+ corner_harris (img ), min_distance = 10 , threshold = 0 , num_peaks = 1
584584 )
585585 subpix = corner_subpix (img , corner )
586586 assert subpix .dtype == _supported_float_type (dtype )
@@ -591,7 +591,7 @@ def test_subpix_dot():
591591 img = np .zeros ((50 , 50 ))
592592 img [25 , 25 ] = 255
593593 corner = peak_local_max (
594- corner_harris (img ), min_distance = 10 , threshold_rel = 0 , num_peaks = 1
594+ corner_harris (img ), min_distance = 10 , threshold = 0 , num_peaks = 1
595595 )
596596 subpix = corner_subpix (img , corner )
597597 assert_array_equal (subpix [0 ], (25 , 25 ))
@@ -604,7 +604,7 @@ def test_subpix_no_class():
604604
605605 img [25 , 25 ] = 1e-10
606606 corner = peak_local_max (
607- corner_harris (img ), min_distance = 10 , threshold_rel = 0 , num_peaks = 1
607+ corner_harris (img ), min_distance = 10 , threshold = 0 , num_peaks = 1
608608 )
609609 subpix = corner_subpix (img , corner )
610610 assert_array_equal (subpix [0 ], (np .nan , np .nan ))
@@ -642,9 +642,7 @@ def test_num_peaks():
642642
643643 for i in range (20 ):
644644 n = np .random .randint (1 , 21 )
645- results = peak_local_max (
646- img_corners , min_distance = 10 , threshold_rel = 0 , num_peaks = n
647- )
645+ results = peak_local_max (img_corners , min_distance = 10 , threshold = 0 , num_peaks = n )
648646 assert results .shape [0 ] == n
649647
650648
0 commit comments