Input Image =========== In order to use many of the Trueface AI inference functions (face detection, face recognition, etc), you must first preprocess your image. Once you have preprocessed your image, you are ready to start calling the various Trueface AI inference functions. .. autoclass:: tfsdk.TFImage .. automethod:: tfsdk.TFImage.rotate .. automethod:: tfsdk.TFImage.resize .. automethod:: tfsdk.TFImage.save_image .. automethod:: tfsdk.TFImage.get_height .. automethod:: tfsdk.TFImage.get_width .. automethod:: tfsdk.TFImage.as_numpy_array .. automethod:: tfsdk.TFImage.get_data .. automethod:: tfsdk.SDK.preprocess_image You can set the image using an OpenCV ``cv::Mat`` by passing the image buffer as follows: .. code-block:: python :linenos: cv_img = cv2.imread(img_path) res, image = sdk.preprocess_image(cv_img, cv_img.shape[1], cv_img.shape[0], tfsdk.COLORCODE.bgr) .. automethod:: tfsdk.SDK.get_face_image_rotation .. autoclass:: tfsdk.COLORCODE :no-undoc-members: .. autoclass:: tfsdk.ROTATEFLAGS :no-undoc-members: