title: NumPy - Image (matrix) thresholding using an intensity value matrix.
body: <p>I need to segment out anomalies in a greyscale image. In a certain place in my algorithm, I compute a matrix that contains the known pixel intensities that I need to set to zero. How would I do this?</p>
  
  <p>For example: <br>
  The computed pixel intensities: 
  (array([ 94,  95,  96,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106,
         107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
         120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
         133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
         146, 147, 148, 149, 150, 151]),) <br><br>
  The picture is of size (480,640) :<br>
  Printed it gives: <br> [[ 86  90  97 ..., 142 152 157]<br>
   [ 85  89  97 ..., 145 154 158]<br>
   [ 83  87  95 ..., 154 158 159]<br>
   ...,<br>
   [130 134 139 ..., 156 154 154]<br>
   [130 134 140 ..., 154 153 152]<br>
   [130 134 141 ..., 154 153 152]]<br></p>
  
  <p>I realize that for each pixel I could go through the intensity matrix. This would, however, be too expensive. NumPy experts I need your help!</p>