mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 19:02:47 +08:00
Updated postprocess permutation calculation to handle corner cases (topn = 1 and permutations == topn)
This commit is contained in:
@@ -357,10 +357,11 @@ vector<int> PostProcess::getMaxDepth(int topn)
|
||||
int nextLeastDropCharPos = getNextLeastDrop(depth);
|
||||
while (nextLeastDropCharPos != -1)
|
||||
{
|
||||
depth[nextLeastDropCharPos] = depth[nextLeastDropCharPos] + 1;
|
||||
if (getPermutationCount(depth) > topn)
|
||||
if (getPermutationCount(depth) >= topn)
|
||||
break;
|
||||
|
||||
depth[nextLeastDropCharPos] = depth[nextLeastDropCharPos] + 1;
|
||||
|
||||
nextLeastDropCharPos = getNextLeastDrop(depth);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user