some small functions create by myself to help my work on OpenCV