能帮我解决检测白色或白色可见光的问题
UByteIndexer srcIndexer = image.createIndexer();
int[] hsv = new int[3];
boolean yellow = false;
for (int i = 0; i < srcIndexer.rows(); i++) {
for (int j = 0; j < srcIndexer.cols(); j++) {
if (j == x && i == y) {
srcIndexer.get(i, j, hsv);
if (hsv[0] <= 0 && hsv[1] <= 0 && hsv[2] >= 0 && hsv[2] <= 255) {
white = true;
}
}
}
}
return white;
}
有人可以帮助我将白色的RGB转换为HSV吗? 预先感谢,