private void wmSubBand(Image img,double[] wm,int n,double a,double threshold){
  for (int i=0; i < img.getWidth() * img.getHeight(); i++) {
    if (Math.abs(img.getData()[i]) > threshold) {
      img.getData()[i]+=(a * Math.abs(img.getData()[i]) * wm[i % n]);
    }
  }
}

private void wmSubBand ( Image img , double [ ] wm , int n , double a , double threshold ) { for ( int i = 0 ; i < img . getWidth ( ) * img . getHeight ( ) ; i ++ ) { if ( Math . abs ( img . getData ( ) [ i ] ) > threshold ) { img . getData ( ) [ i ] += ( a * Math . abs ( img . getData ( ) [ i ] ) * wm [ i % n ] ) ; } } }
embeds a watermark of ' n ' normally distributed values into ' a ' coefficents greater than threshold value of a subband
