title: Get only "valid" points in 2D interpolation of cloud point using Scipy/Numpy
body: <p>I have a cloud point obtained from photogrammetry from a person's back. I'm trying to interpolate it to get a regular grid, and for that I'm using <code>scipy.interpolate</code> with good results so far. The problem is: the function I'm using (<code>scipy.interpolate.griddata</code>) uses the convex hull of the cloudpoint in the plane x,y, thus giving as result some values that don't exist in the original surface, which has a concave perimeter.</p>
  
  <p>The following illustration shows the original cloudpoint at the left (what is displayed as horizontal lines is actually a dense line-shaped cloud of points), the result that <code>griddata</code> gives me in the middle, and the result I would like to get at the right -- kind of the "shadow" of the cloudpoint on the x,y plane, where non-existing points in the original surface would be zeros or Nans.</p>
  
  <p><img src="https://i.stack.imgur.com/LIEbe.png" alt="enter image description here"></p>
  
  <p>I know I could remove the Z coordinate on the cloudpoint and check each grid position for proximity, but this is so brute-force, and I believe this should be a common problem on point-cloud applications.
  Another possibility could be some numpy operation to perform over the point-cloud, finding a numpy mask or boolean 2D-array to "apply" over the result from <code>griddata</code>, but I didn't find any (these operations are a bit beyond my Numpy/Scipy knowledge).</p>
  
  <p>Any suggestion?</p>
  
  <p>Thanks for reading!</p>