0

Is there a method to check that an image captured from a GestureOverlayView is not blank, has a drawing?

1 Answers1

0

I was having the same issue but in c#. Blank image would mean "one color" let's say "black". So, the only way to do this is comparing pixels together: if all pixels' colors are the same, it means the image is blank otherwise it isn't blank! You can use:**

getPixel()

If you have an idea about the blank image's color, you can build a similar method to this one :

for( int x=0; x< image.getWidth(); x++){
        for( int y = 0; y< image.getHeight() ;y++){
          if(pixel == Color.BLACK){
                ourBoolVal=false;
                 break;

          }else{
                ourBoolVal=true;
                }
              }
         }
return ourBoolVal;

Here is a good example for searching for through an image: Here

Community
  • 1
  • 1
Sarah
  • 75
  • 1
  • 1
  • 7