Finidng edges of convexhull from rectangles Green Boxes = rectangles 
red dots = edge points
red lines = to be generated from convex hull algorithm


I have a problem with creating the convex hull algorithm.
I want to select or collect all the edges from these rectangles and draw convex hull around through these edges (See red dots from the Image).
To make my algorithm more efficient, I don't know how to deselect or eliminate the points (X black points) inside all rectangles.  

Could someone give me a solution for this?

Thanks in advance
If you have $n$ rectangles, take the convex hull of the $4n$ points given by the corners of those rectangles.  This gives you exactly what you want, and you can use any standard algorithm for computing the convex hull.  There is no need to explicitly deselect individual corners -- let the algorithm for computing a convex hull take care of that.