Forums - fcvNCCPatchesOnRectu8 incorrect bestNCC output??

3 posts / 0 new
Last post
fcvNCCPatchesOnRectu8 incorrect bestNCC output??
martint
Join Date: 30 Oct 13
Posts: 8
Posted: Mon, 2014-12-08 02:27
Hi,
 
With reference to my previous post about an assertion in fcvNCCPatchesOnRectu8 I can confirm that with fastcv 1.6 I don't get the assertion anymore and as expected fastcv fcvNCCPatchesOnRectu8 performs faster than opencv matchTemplate.
 
Now I'm finding another problem with the same function. I get the right match locations but the bestNCC I get doesn't look right to me. The reference says: “bestNCC:  NCC value of the best match blocks. It's quantized to integer value in Q7 (between -128 and 128). “
 
I assume 128 is perfect correlation and -128 is perfect anti-correlation. 
 
In my project I was getting very low values for bestNCC even when the match was correct. Then I tested fcvNCCPatchesOnRectu8 to match patches from an image against the same image. I would expect perfect matches all the time, ie bestNCC=128 . However to my surprise in a substantial number of cases the bestNCC was very low!
 
I attach a file with some code to test for this. The code first loads a test image, then it tests a few of the locations where I was getting unexpected low bestNCC value despite of the correct match location.
 
When I run the code I get the following output:
 
0
61, 40 --> 61, 40 -- 6
89, 19 --> 89, 19 -- 28
107, 45 --> 107, 45 -- 21
126, 48 --> 126, 48 -- 22
 
The first column are the patch locations, the second are the matches (which are correct) then the last number is the bestNCC. I would expect 128 in all the 4 cases, but that's not the case!
Any help would be highly appreciated. 
 
  • Up0
  • Down0
jeff4s Moderator
Join Date: 4 Nov 12
Posts: 106
Posted: Sun, 2015-01-04 09:31

Hi,

Thank you for reporting the issue. We investigated it and found an overflow issue when patch size is big. The bug will be fixed in next release (1.7.0).

Appreciate your support and patience.

Cheers,

-Jeff

  • Up0
  • Down0
martint
Join Date: 30 Oct 13
Posts: 8
Posted: Mon, 2015-01-05 09:46

Ok, thanks.

I look forward to try version 1.7.0

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.