title: splits the input into two subset (SMQT)
body: <p>I have an image matrix and i need to split this matrix into two subsets with two condition.</p>
  
  <p>For example D(x)  is the image matrix</p>
  
  <pre><code>        D0(x) = {x | V(x) ≤ mean(V(:)), ∀x ∈ D}
  
          D1(x) = {x | V(x) &gt; mean(V(:)), ∀x ∈ D}
  </code></pre>
  
  <p>where <code>V(x)</code> is the intensity at pixel <code>x</code>. thanks in advance.</p>