nihui / opencv-mobile

The minimal opencv for Android, iOS, ARM Linux, Windows, Linux, MacOS, HarmonyOS, WebAssembly, watchOS, tvOS, visionOS
Apache License 2.0
2.56k stars 347 forks source link

Problem when use imwrite on Android #163

Open giganticlab opened 2 weeks ago

giganticlab commented 2 weeks ago

i use release : https://github.com/nihui/opencv-mobile/releases/download/v30/opencv-mobile-4.10.0-android.zip

this is my code:

void VisionPlatform::SaveFrame(const char* filePath) {
    if (saveFrame.empty()) {
        LOGD("Empty frame, cannot save.");
        return;
    }

    // Save image to the provided file path
    if (imwrite(filePath, saveFrame)) {
        LOGD("Image saved successfully at %s", filePath );
    } else {
        LOGD("Failed to save image at %s", filePath );
    }
}

but error when i build:

ld.lld: error: undefined symbol: cv::display_fb::open()
>>> referenced by highgui.cpp
>>>               highgui.cpp.o:(cv::imshow(cv::String const&, cv::_InputArray const&)) in archive X:/SDK/VISION_SDK/opencv-android-sdk/sdk/native/staticlibs/arm64-v8a/libopencv_highgui.a
giganticlab commented 2 weeks ago

Back to Release v29. Problem Solved!