Implement PR feedback:

1. Explain grayscale input still read as three channel
2. Fix typo
3. Add more details to image match explanation to include the use of masks
This commit is contained in:
Arthur Cinader
2016-07-11 11:35:50 -04:00
parent a6ade2b914
commit 0ed250cb5d
2 changed files with 17 additions and 10 deletions

View File

@@ -42,7 +42,7 @@ int main( int argc, char** argv )
if(argc > 3) {
use_mask = true;
mask = imread(argv[3], IMREAD_COLOR);
mask = imread( argv[3], IMREAD_COLOR );
}
if(img.empty() || templ.empty() || (use_mask && mask.empty()))
@@ -82,7 +82,7 @@ void MatchingMethod( int, void* )
result.create( result_rows, result_cols, CV_32FC1 );
/// Do the Matching and Normalize
bool method_accepts_mask = CV_TM_SQDIFF == match_method || match_method == CV_TM_CCORR_NORMED;
bool method_accepts_mask = (CV_TM_SQDIFF == match_method || match_method == CV_TM_CCORR_NORMED);
if (use_mask && method_accepts_mask)
{ matchTemplate( img, templ, result, match_method, mask); }
else