How can I identify and remove those four RED points drawn in image
Those four points
Use a convex hull algorithm (such as the Graham scan), and remove all points that are not part of the resulting convex hull.
In your example, the convex hull will consist of P1, P2, P3, P5, P7, P8, P9, P11, P12, P13, P14, P15, P16, P18, which are precisely all points except the red ones.
Note that simply removing those points whose inner angle is greater than 180 will not necessarily result in a convex polygon. Take this polygon for example: