def test_blank_image_nans():
 detectors = [corner_moravec, corner_harris, corner_shi_tomasi, corner_kitchen_rosenfeld, corner_foerstner]
 constant_image = np.zeros((20, 20))
 for det in detectors:
  response = det(constant_image)
  assert np.all(np.isfinite(response))

def test_blank_image_nans ( ) : detectors = [ corner_moravec , corner_harris , corner_shi_tomasi , corner_kitchen_rosenfeld , corner_foerstner ] constant_image = np . zeros ( ( 20 , 20 ) ) for det in detectors : response = det ( constant_image ) assert np . all ( np . isfinite ( response ) )
some of the corner detectors had a weakness in terms of returning nan when presented with regions of constant intensity .