scaleIntoMe error message

This isn’t a crucial error, but the opencv addon classes with scaleIntoMe functions seem to produce the error message no matter what parameter is passed in for interpolationMethod

snaps!

this is a fix, there might be a more elegant way of writing this:

  
  
 if ((interpolationMethod == CV_INTER_NN) ||  
        (interpolationMethod == CV_INTER_LINEAR) ||  
        (interpolationMethod == CV_INTER_AREA) ||  
        (interpolationMethod == CV_INTER_CUBIC) ){  
            ; // do nothing, we are all good  
	} else {  
        printf("error in scaleIntoMe / interpolationMethod, setting to CV_INTER_NN \n");  
		interpolationMethod = CV_INTER_NN;  
	}  
  

the old code had bad logic:

  
  
if ((interpolationMethod != CV_INTER_NN) ||  
        (interpolationMethod != CV_INTER_LINEAR) ||  
        (interpolationMethod != CV_INTER_AREA) ||  
        (interpolationMethod != CV_INTER_CUBIC) ){  
        printf("error in scaleIntoMe / interpolationMethod, setting to CV_INTER_NN \n");  
		interpolationMethod = CV_INTER_NN;  
	}  
  

while one would be true, the others would be false, thus falling into that condition. the above code (unless I didn’t drink enough coffee this afternoon) should work…

best!!
zach