added opencv library functions created by Simon, check opencv lib doc for details