Skip to content

Commit

Permalink
update FD_C_CreateDetectionResultWrapperFromCResult
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoII committed Apr 19, 2024
1 parent 235cf56 commit 4b4a5ee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions c_api/fastdeploy_capi/vision/result.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,15 @@ FD_C_DetectionResultWrapper* FD_C_CreateDetectionResultWrapperFromCResult(
fd_c_detection_result->boxes.data[i].data[j];
}
}
// copy rotated_boxes
const int rotated_boxes_coordinate_dim = 8;
detection_result->rotated_boxes.resize(fd_c_detection_result->rotated_boxes.size);
for (size_t i = 0; i < fd_c_detection_result->rotated_boxes.size; i++) {
for (size_t j = 0; j < rotated_boxes_coordinate_dim; j++) {
detection_result->rotated_boxes[i][j] =
fd_c_detection_result->rotated_boxes.data[i].data[j];
}
}
// copy scores
detection_result->scores.resize(fd_c_detection_result->scores.size);
memcpy(detection_result->scores.data(), fd_c_detection_result->scores.data,
Expand Down

0 comments on commit 4b4a5ee

Please sign in to comment.