FastDeploy  latest
Fast & Easy to Deploy!
Functions
visualize.cc File Reference
#include "fastdeploy_capi/vision/visualize.h"
#include "fastdeploy/vision/visualize/visualize.h"
#include "fastdeploy_capi/internal/types_internal.h"
Include dependency graph for visualize.cc:

Functions

FD_C_Mat FD_C_VisDetection (FD_C_Mat im, FD_C_DetectionResult *fd_c_detection_result, float score_threshold, int line_size, float font_size)
 Show the visualized results for detection models. More...
 
FD_C_Mat FD_C_VisDetectionWithLabel (FD_C_Mat im, FD_C_DetectionResult *fd_c_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...
 
FD_C_Mat FD_C_VisClassification (FD_C_Mat im, FD_C_ClassifyResult *fd_c_classify_result, int top_k, float score_threshold, float font_size)
 Show the visualized results for classification models. More...
 
FD_C_Mat FD_C_VisClassificationWithLabel (FD_C_Mat im, FD_C_ClassifyResult *fd_c_classify_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...
 
FD_C_Mat FD_C_VisOcr (FD_C_Mat im, FD_C_OCRResult *fd_c_ocr_result)
 Show the visualized results for Ocr models. More...
 
FD_C_Mat FD_C_VisSegmentation (FD_C_Mat im, FD_C_SegmentationResult *fd_c_segmenation_result, float weight)
 Show the visualized results for segmentation models. More...
 

Function Documentation

◆ FD_C_VisClassification()

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()

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()

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()

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()

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()

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