Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/machinevisiontoolbox/ImagePointFeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
5 changes: 0 additions & 5 deletions tests/test_image_point_features_extra.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
Loading