java - input Mat used in goodFeatureToTrack -
i'm trying detect feature in face goodfeaturetotrack
function in java. crashes there. code:
mat eyeregion = detectcascade();//i used here cascadeclassifier detect eye region if(eyeregion.empty()) log.i("face_calibrated","eye region empty");
i make sure region not empty.
if(eyeregion.channels()==1) { //i convert mat rgb detectfeatures imgproc.cvtcolor(eyeregion, eyeregion, imgproc.color_gray2rgb); log.i("face_calibrated","eyeregion channel1"); }
here problem:
imgproc.goodfeaturestotrack(eyeregion,cornersa,4,0.01,5.0,null,3,false,0.04);
i have declared cornersa
global matofpoint
public matofpoint cornersa = new matofpoint();
what type of input mat (rgb or gray) should used in function?