diff --git a/src/machinevisiontoolbox/ImagePointFeatures.py b/src/machinevisiontoolbox/ImagePointFeatures.py index e3bf9e90..6b5d06f2 100644 --- a/src/machinevisiontoolbox/ImagePointFeatures.py +++ b/src/machinevisiontoolbox/ImagePointFeatures.py @@ -997,7 +997,7 @@ def filter(self, **kwargs: Any) -> "BaseFeature2D": k = (limits[0] <= v) & (v <= limits[1]) elif filter == "minstrength": v = features.strength - k = limits >= v + k = v >= limits elif filter == "percentstrength": v = features.strength vmax = v.max() diff --git a/tests/test_image_point_features_extra.py b/tests/test_image_point_features_extra.py index 9508faea..8f5bbf83 100644 --- a/tests/test_image_point_features_extra.py +++ b/tests/test_image_point_features_extra.py @@ -289,11 +289,6 @@ def test_unknown_key(self): with pytest.raises(ValueError, match="unknown filter"): make_features().filter(colour=1) - @pytest.mark.xfail( - strict=True, - reason="minstrength keeps features weaker than the limit: the test is " - "written limits >= v, not v >= limits", - ) def test_minstrength_keeps_the_stronger(self): f = make_features(5).filter(minstrength=0.25) nt.assert_array_equal(f.id, [2, 3, 4])