Hi !
I am having some strange behavior and I would like to have some lighting on how the function set behave towards roi…
Here is a part of my code
for (int i = 0; i < mesure; i++){
for (int j = 0; j < octave; j++){
nonZeroMatrixBlock = matrixImg.countNonZeroInRegion(i*sizeMesure, j*sizeOctave, (i+1)*sizeMesure, (j+1)*sizeOctave);
if(nonZeroMatrixBlock>nonZeroThreshold){
matrixImg.setROI(i*sizeMesure, j*sizeOctave, (i+1)*sizeMesure, (j+1)*sizeOctave);
matrixImg.set(255.0);
matrixImg.resetROI();
sampleMatrix[i+j*mesure] = 1;
}
else{
matrixImg.setROI(i*sizeMesure, j*sizeOctave, (i+1)*sizeMesure, (j+1)*sizeOctave);
matrixImg.set(0.0);
matrixImg.resetROI();
sampleMatrix[i+j*mesure] = 0;
}
}
}
I just go through an image and check for non-zero values.
If the value is higher than the threshold then I would like to set this ROI to 255.0 else to 0.
But does the function set take into account the ROI ?..
thanks in advance