Add mask parameter to matrix.matchTemplate#419
Open
acinader wants to merge 1 commit intopeterbraden:masterfrom
Open
Add mask parameter to matrix.matchTemplate#419acinader wants to merge 1 commit intopeterbraden:masterfrom
acinader wants to merge 1 commit intopeterbraden:masterfrom
Conversation
25b4a7c to
c217489
Compare
Open
src/Matrix.cc
Outdated
| // @author ytham | ||
| // Match Template filter | ||
| // Usage: output = input.matchTemplate("templateFileString", method); | ||
| // Usage: output = input.matchTemplate("templateFileString", ["method"], ["maskPath"]); |
There was a problem hiding this comment.
I guess you mean the [] notation to mean 'optional'? But it's confusing in javascript because it looks like you mean Array
Author
|
@pkallos, is that less ambiguous? Glad to take out too.... |
Author
|
I now also see that this conflicts (not irresolvably :)) with #389 So i need some direction on how to integrate that mask functionality. You can see my suggestion in #389 (comment) I'd like to help out and get the match with a mask into the main line. |
| v8::String::Utf8Value args2(info[2]->ToString()); | ||
| std::string maskFilename = std::string(*args2); | ||
| cv::Mat mask; | ||
| mask = cv::imread(maskFilename, CV_8S); |
Author
There was a problem hiding this comment.
should this be -1 instead of CV_8S??
add examples for matchTemplate with and without mask.
40d5036 to
f920053
Compare
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add examples for matchTemplate with and without mask.
Due to #381 I forked this off of v5.0.0 commit 5fb426a which is why it has conflicts.
I'm glad to rebase it when #381 is resolved and head can do a templateMatch without an assert fail.
In matrix.cpp, I don't check if the opencv version can handle the mask (>= 3.1 it think?). I poked around a little to see if this is done anywhere, but didn't see. Let me know if its important and I can poke around some more to find an example.