this is opencv code