added pixel operations and OpenCV conversion