I have used used interp2 and deformed an image. I transferred all the pixels by random vectors to get the image deformed. Here are both the original and deformed images.
As you see around the image of the tree is an ellipsoid. I want to deform the image but I do want to keep the ellipsoid as you see without any deformation and just deform all the pixels that are in the ellipsoid. I want to discard the pixels which goes out of the ellipsoid and discard the pixels which comes from out of the ellipsoid due to deformation. how should I do that?
Please do not answer my question by referring to the equation of an ellipsoid because in some figures the outer frame is a cone in which I d not have its equation. thanks.