public boolean isWhiteSpace3(int idx, int radius, float gScore) { 
      boolean result = false;
      float score = 0.0f;
      int x = idx % this.width;
      int y = idx / this.width;
      int idx2 = 0;
      int val = 0;

      if (isLegal(idx, this.width, this.height) && this.pixels[3*idx] == (byte)1) {
         for (int i = -radius; i <= radius; i++) {
            for (int j = -radius; j <= radius; j++) {
               idx2 = width * (y + j) + x + i;
               if (isLegal(idx2, this.width, this.height)) { 
                  if (this.pixels[3*idx2] >= (byte)1 ) { //1
                     score++;
                  }
                  else {
                     val = this.blackPixels[idx2] & 0xff;
                     if (val >=2 && this.blackRegions.get(val - 2).type == 1)
                        score++;
                  }
               }
            }
         }
         if (score >= gScore) { //(1+(radius*2)) * (1+(radius*2))
            result = true;
         }
      }
      return result;
   }