Quoted By:
also, using a script to target green colours is not a bad idea
shootFrogs(data) {
let r = false;
let g = false;
let b = false;
for (let j = 0; j < data.length; j += 4) {
if ((data[j] >= 72 && data[j] <= 94) && (data[j + 1] >= 128 && data[j + 1] <= 148) && (data[j + 2] >= 0 && data[j + 2] <= 60)) g = true;
if ((data[j] >= 146 && data[j] <= 168) && (data[j + 1] >= 62 && data[j + 1] <= 106) && (data[j + 2] >= 0 && data[j + 2] <= 84)) r = true;
if (data[j] <= 16 && data[j + 1] <= 16 && data[j + 2] <= 16) b = true;
}
if (r && g && b) return true;
return false;
buuuuuut, it will work at least 70% of the time, I thought about implementing a neural shit to filter frogs with more efficiency. (also ez training because the machine could triangulate the frog face in less than 1 hour of training)