mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 15:26:53 +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);
|
int nextLeastDropCharPos = getNextLeastDrop(depth);
|
||||||
while (nextLeastDropCharPos != -1)
|
while (nextLeastDropCharPos != -1)
|
||||||
{
|
{
|
||||||
depth[nextLeastDropCharPos] = depth[nextLeastDropCharPos] + 1;
|
if (getPermutationCount(depth) >= topn)
|
||||||
if (getPermutationCount(depth) > topn)
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
depth[nextLeastDropCharPos] = depth[nextLeastDropCharPos] + 1;
|
||||||
|
|
||||||
nextLeastDropCharPos = getNextLeastDrop(depth);
|
nextLeastDropCharPos = getNextLeastDrop(depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user