Skip to content

Code/Standard Inconsistency when OCL == 0 #424

@gfiumara

Description

@gfiumara

Added to the non-square block being skipped, OCL has another flag that is not mentioned in the norm and affects the computation.

	if (eigv_max == 0) {
		// block is excluded from usage
		ocl = 0.0;
		return false;
	}

	// compute the OCL value of the block
	ocl = (1.0 - (eigv_min / eigv_max)); // 0 (worst), 1 (best)
	return true;

Here a boolean is passed that is checked by the following if-statement

if (!getOCLValueOfBlock(bl_img,
						bl_ocl)) {
						continue; // block is not used
					}

					oclres.push_back(bl_ocl);

So it seems that if OCL value is supposed to be set to 0, it is actually skipped. (i.e., continue is executed before oclres.push_back can occur to append the value '0'). I verified this in my Python code by setting the value to np.nan instead of 0, and I get identical values to the list in the norm for OCL. If I set it to 0, it diverges.

The process in NFIQ2 does not match what the norm says, where the norm specifies that if lambda max is 0 or smaller, the local quality needs to be set to 0.

Originally posted by @LarsKooijman in #411

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions