FastDeploy  latest
Fast & Easy to Deploy!
Functions
visualize.h File Reference
#include "fastdeploy_capi/core/fd_common.h"
#include "fastdeploy_capi/core/fd_type.h"
#include "fastdeploy_capi/vision/result.h"
Include dependency graph for visualize.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisDetection (FD_C_Mat im, FD_C_DetectionResult *fd_detection_result, float score_threshold, int line_size, float font_size)
 Show the visualized results for detection models. More...
 
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisDetectionWithLabel (FD_C_Mat im, FD_C_DetectionResult *fd_detection_result, FD_C_OneDimArrayCstr *labels, float score_threshold, int line_size, float font_size)
 Show the visualized results with custom labels for detection models. More...
 
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisClassification (FD_C_Mat im, FD_C_ClassifyResult *result, int top_k, float score_threshold, float font_size)
 Show the visualized results for classification models. More...
 
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisClassificationWithLabel (FD_C_Mat im, FD_C_ClassifyResult *result, FD_C_OneDimArrayCstr *labels, int top_k, float score_threshold, float font_size)
 Show the visualized results with custom labels for classification models. More...
 
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisOcr (FD_C_Mat im, FD_C_OCRResult *ocr_result)
 Show the visualized results for Ocr models. More...
 
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisSegmentation (FD_C_Mat im, FD_C_SegmentationResult *result, float weight)
 Show the visualized results for segmentation models. More...
 

Function Documentation

◆ FD_C_VisClassification()

FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisClassification ( FD_C_Mat  im,
FD_C_ClassifyResult result,
int  top_k,
float  score_threshold,
float  font_size 
)

Show the visualized results for classification models.

Parameters
[in]imthe input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format
[in]resultthe result produced by model
[in]top_kthe length of return values, e.g., if topk==2, the result will include the 2 most possible class label for input image.
[in]score_thresholdthreshold for top_k scores, the class will not be shown if the score is less than score_threshold
[in]font_sizefont size
Returns
cv::Mat type stores the visualized results

◆ FD_C_VisClassificationWithLabel()

FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisClassificationWithLabel ( FD_C_Mat  im,
FD_C_ClassifyResult result,
FD_C_OneDimArrayCstr labels,
int  top_k,
float  score_threshold,
float  font_size 
)

Show the visualized results with custom labels for classification models.

Parameters
[in]imthe input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format
[in]resultthe result produced by model
[in]labelscustom labels for user, the visualized result will show the corresponding custom labels
[in]top_kthe length of return values, e.g., if topk==2, the result will include the 2 most possible class label for input image.
[in]score_thresholdthreshold for top_k scores, the class will not be shown if the score is less than score_threshold
[in]font_sizefont size
Returns
cv::Mat type stores the visualized results

◆ FD_C_VisDetection()

FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisDetection ( FD_C_Mat  im,
FD_C_DetectionResult fd_detection_result,
float  score_threshold,
int  line_size,
float  font_size 
)

Show the visualized results for detection models.

Parameters
[in]imthe input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format
[in]resultthe result produced by model
[in]score_thresholdthreshold for result scores, the bounding box will not be shown if the score is less than score_threshold
[in]line_sizeline size for bounding boxes
[in]font_sizefont size for text
Returns
cv::Mat type stores the visualized results

◆ FD_C_VisDetectionWithLabel()

FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisDetectionWithLabel ( FD_C_Mat  im,
FD_C_DetectionResult fd_detection_result,
FD_C_OneDimArrayCstr labels,
float  score_threshold,
int  line_size,
float  font_size 
)

Show the visualized results with custom labels for detection models.

Parameters
[in]imthe input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format
[in]resultthe result produced by model
[in]labelsthe visualized result will show the bounding box contain class label
[in]score_thresholdthreshold for result scores, the bounding box will not be shown if the score is less than score_threshold
[in]line_sizeline size for bounding boxes
[in]font_sizefont size for text
Returns
cv::Mat type stores the visualized results

◆ FD_C_VisOcr()

FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisOcr ( FD_C_Mat  im,
FD_C_OCRResult ocr_result 
)

Show the visualized results for Ocr models.

Parameters
[in]imthe input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format
[in]resultthe result produced by model
Returns
cv::Mat type stores the visualized results

◆ FD_C_VisSegmentation()

FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_Mat FD_C_VisSegmentation ( FD_C_Mat  im,
FD_C_SegmentationResult result,
float  weight 
)

Show the visualized results for segmentation models.

Parameters
[in]imthe input image data, comes from cv::imread(), is a 3-D array with layout HWC, BGR format
[in]resultthe result produced by model
[in]weighttransparent weight of visualized result image
Returns
cv::Mat type stores the visualized results