Update InspireFace to 1.1.1

This commit is contained in:
JingyuYan
2024-06-27 11:20:04 +08:00
parent fa2316589a
commit 21fcc5b6ce
8 changed files with 128 additions and 90 deletions

View File

@@ -66,6 +66,27 @@ void HFDeBugImageStreamImShow(HFImageStream streamHandle) {
#endif
}
HResult HFDeBugImageStreamDecodeSave(HFImageStream streamHandle, HPath savePath) {
if (streamHandle == nullptr) {
INSPIRE_LOGE("Handle error");
return HERR_INVALID_IMAGE_STREAM_HANDLE;
}
HF_CameraStream *stream = (HF_CameraStream* ) streamHandle;
if (stream == nullptr) {
INSPIRE_LOGE("Image error");
return HERR_INVALID_IMAGE_STREAM_HANDLE;
}
auto image = stream->impl.GetScaledImage(1.0f, true);
auto ret = cv::imwrite(savePath, image);
if (ret) {
INSPIRE_LOGE("Image saved successfully to %s", savePath);
return HSUCCEED;
} else {
INSPIRE_LOGE("Failed to save image to %s", savePath);
return -1;
}
}
HResult HFReleaseInspireFaceSession(HFSession handle) {
if (handle == nullptr) {

View File

@@ -676,6 +676,19 @@ HYPER_CAPI_EXPORT extern HResult HFLogDisable();
*/
HYPER_CAPI_EXPORT extern void HFDeBugImageStreamImShow(HFImageStream streamHandle);
/**
* @brief Decode the image from ImageStream and store it to a disk path.
*
* It is used to verify whether there is a problem with image codec, and can quickly perform bug analysis.
*
* @param streamHandle Handle to the data buffer representing the camera stream component.
* @param savePath The path to which the image is written.
* @return HResult indicating the success or failure of the operation.
*/
HYPER_CAPI_EXPORT extern HResult HFDeBugImageStreamDecodeSave(HFImageStream streamHandle, HPath savePath);
#ifdef __cplusplus
}

View File

@@ -7,6 +7,6 @@
#define INSPIRE_FACE_VERSION_MAJOR_STR "1"
#define INSPIRE_FACE_VERSION_MINOR_STR "1"
#define INSPIRE_FACE_VERSION_PATCH_STR "0"
#define INSPIRE_FACE_VERSION_PATCH_STR "1"
#endif //HYPERFACEREPO_INFORMATION_H

View File

@@ -1 +1 @@
InspireFace Version: 1.1.0
InspireFace Version: 1.1.1