Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing check for "OPENCV_ENABLE_NONFREE" in "TestSIFT()" #1118

Open
pericles-tpt opened this issue Oct 20, 2023 · 0 comments
Open

Missing check for "OPENCV_ENABLE_NONFREE" in "TestSIFT()" #1118

pericles-tpt opened this issue Oct 20, 2023 · 0 comments

Comments

@pericles-tpt
Copy link
Contributor

Description

There seems to be a missing check for "OPENCV_ENABLE_NONFREE" in TestSIFT(), which according to the OpenCV documentation is a required option to use the SIFT algorithm.

TestSURF() has the check at the top of the function:

func TestSURF(t *testing.T) {
	testNonFree := os.Getenv("OPENCV_ENABLE_NONFREE")
	if testNonFree == "" {
		t.Skip("Skipping SURF test since OPENCV_ENABLE_NONFREE was not set")
	}

	img := gocv.IMRead("../images/face.jpg", gocv.IMReadGrayScale)
	if img.Empty() {
		t.Error("Invalid Mat in SURF test")
	}
	defer img.Close()
    ...

However TestSIFT() is missing that check:

func TestSIFT(t *testing.T) {
	img := IMRead("./images/face.jpg", IMReadGrayScale)
	if img.Empty() {
		t.Error("Invalid Mat in SIFT test")
	}
	defer img.Close()
    ...

I identified the issue in the dev branch and I couldn't find an existing PR or issue that mentions this. It's also possible that I've overlooked something and this is either already being addressed, or has been omitted intentionally.

Steps to Reproduce

N/A

Your Environment

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant