title: excessive green color extraction implementation
body: <p>i want to segment image pixels into vegetation and Non vegetation. For this excessive green color extraction algorithm is developed.the algorithm is shown below.</p>
  
  <p>Outimage (x,y,z) = inimage (x,y,z)</p>
  
  <p>if { inimage (x,y,r) &lt; (x,y,g) inimage (x,y,b) &lt; (x,y,g) }</p>
  
  <p>outimage(x,y,z) = 0 otherwise*</p>
  
  <p>where outimage (x,y,z) is the output image after excessive green segmentation saved in jpg format, inimage(x,y,z) is the image acquired by an camera, x is the no of pixels in each row, y is the no of pixels in each column and z is the primary color plane for red the z is equal to 1, for green the z is 2 and for blue the z is 3.</p>
  
  <p>i am not getting how to implement this so please help me to implement it.or just give some rough idea or suggestion how i can implement it.</p>
  
  <p>input image:</p>
  
  <p><img src="https://i.stack.imgur.com/4JIS9.png" alt="input image"></p>
  
  <p>output:</p>
  
  <p>i want the output to be in this format after applying above mentioned algorithm</p>
  
  <p><img src="https://i.stack.imgur.com/vKrAn.png" alt=""></p>