I use the camera functionality of android and capture the image in the form of a bitmap. I tried to extract an area of a certain color(RED, PINK, BLUE, YELLOW) from the captured image using the following method but was not successful:
for(int i=0;i<bitmap.getWidth();i++){
for(int j=0;j<bitmap.getHeigth();j++){
int pixel = bitmap.getPixel(i,j);
if(pixel == Color.RED){
//create new image
}
}
}
I got to know openCV can be used in this matter. If someone can show me the way it would be greatly appreciated.