Efficient way of gathering 4 point subimage, matrix transformation problems + antialiasing
<p><strong>QUICK RECAP OF THE PROJECT:</strong></p>

<p><em>I'm making a car that would drive itself in between the obstacles of which picture will be taken by your phone. The picture should then be cropped to the size of the "area of movement" or the area where car can move. That should have been done automatically. In my case I’d do it like this:</em></p>

<ol>
<li><em>Before you would take picture of the "obstacle map", you would have to put a paper sheet on the ground, so the program would recognize the size of the area/the way image should be transformed to be "perpendicular" to the ground.</em></li>
<li><em>In program you would mark the area where car can move and it would crop it. Then it would automatically transform the selected area to be as "perpendicular" as possible, so the obstacle map would be good enough for the car to move in it as it would be an obstacle map.</em></li>
</ol>

<p><em>Then I have 2 options: either to automate obstacle recognition or to make it manual. If I would automate it, I would have to use some sort of OpenCV obstacle recognition. Else id just make a simple program for marking obstacles. After that you would mark a point, where the car should move to and it would calculate the most optimal path with A</em> algorithm. This algorithm only gives the points where the car should move, so I connected with some professors in my school and they are now doing some help with steering of car and calculating the right angle the car should steer to come to certain location.*</p>

<p><strong>I have 2 questions, both connected with BufferedImage.</strong></p>

<ol>
<li>Two questions back in the past, I asked how to get a sub image that is defined by 4 random points. I got no answers for doing that so I did it myself, but I know that <a href="http://pastebin.com/sjALJErr" rel="nofollow noreferrer">this</a> method is VERY INEFFICIENT and I'd like to know how can it be done better?</li>
<li>My second question is about matrix transformation. I have already been discussing about that and got <a href="http://pastebin.com/Y7mTUMhk" rel="nofollow noreferrer">this</a> code which is basically a modded version of <a href="https://stackoverflow.com/questions/24341033/texture-deforming-4-points/24344967#24344967">this</a> one. The code is limiting me to the size of the input bufferedimage and i'd like to know how can I "remove" this limit, because in some cases the image needs to be upscaled, but the code keeps cropping it. Also I’d like to have some sort of AA (Anti Aliasing) on it, because the transformed image just looks weird/pixelated.</li>
</ol>

<p>EDIT: In first question's code, there is a method line(Point p1, Point p2) in class Place_2D which basically creates an arraylist of points connecting 2 points in place, creating a line.</p>