detect_corner function added

Signed-off-by: Kevin <kevin@eichenbergs.info>