Opencv Android Perspective Transformation not working as expected
@Override
public boolean onTouchEvent(MotionEvent event){
    boolean value = super.onTouchEvent(event);
    switch ( event.getAction()){
        case MotionEvent.ACTION_DOWN: {
            return true;
        }
        case MotionEvent.ACTION_MOVE:{
            //Point 1
            float x = event.getX();
            float y = event.getY();
            double dx = Math.pow(x - mCircleX,2);
            double dy = Math.pow(y-mCircleY,2);
            if (dx + dy &lt; Math.pow(mCircleRadius,2)){
                //Toucher
                mCircleX = x;
                //Toast.makeText(getContext(),String.valueOf(mCircleX),Toast.LENGTH_SHORT).show();
                mCircleY = y;
                postInvalidate();
                return  true;

            }
            //Point 2
            float x2 = event.getX();
            float y2 = event.getY();
            double dx2 = Math.pow(x2 - mCircleX2,2);
            double dy2 = Math.pow(y2 - mCircleY2,2);
            if (dx2 + dy2 &lt; Math.pow(mCircleRadius2,2)){
                //Toucher
                mCircleX2 = x2;
                mCircleY2 = y2;
                postInvalidate();
                return  true;

            }
            //Point 3
            float x3 = event.getX();
            float y3 = event.getY();
            double dx3 = Math.pow(x3 - mCircleX3,2);
            double dy3 = Math.pow(y3 - mCircleY3,2);
            if (dx3 + dy3 &lt; Math.pow(mCircleRadius3,2)){
                //Toucher
                mCircleX3 = x3;
                mCircleY3 = y3;
                postInvalidate();
                return  true;

            }
            //Point 4
            float x4 = event.getX();
            float y4 = event.getY();
            double dx4 = Math.pow(x4 - mCircleX4,2);
            double dy4 = Math.pow(y4 - mCircleY4,2);
            if (dx4 + dy4 &lt; Math.pow(mCircleRadius4,2)){
                //Toucher
                mCircleX4 = x4;
                mCircleY4 = y4;
                postInvalidate();
                return  true;

            }
            return true;

        }
    }
    return value;
}


}