Skip to content

example text detection does not compile, and also does not work? #282

@zzlk

Description

@zzlk

Before reporting an issue please first check the
troubleshooting guide. If
the issue you're encountering is not solved thereby please state the following in your bugreport:

  1. Operating system
    arch linux

  2. The way you installed OpenCV: package, official binary distribution, manual compilation, etc.
    arch linux package

  3. OpenCV version
    4.5.4

  4. rustc version (rustc --version)
    rustc 1.55.0 (c8dfcfe04 2021-09-06)

  5. Attach the full output of the following command from your project directory:

    RUST_BACKTRACE=full cargo build -vv 

I can attach this if it is necessary.

I noticed that the text detection example is commented out in the cargo.toml file
https://github.com/twistedfall/opencv-rust/blob/master/Cargo.toml#L35

and I suspect that the api for dnn detector has changed since that example was ported over. I think the "detector.detect" function no longer exists and has been replaced by "detector.predict".

https://github.com/twistedfall/opencv-rust/blob/master/examples/text_detection.rs#L80

once you replace detector.detect with detector.predict it can then compile, however, I could not get the example to work as it now fails at runtime with an internal opencv error which is thrown from line 80 in text_detection.rs.

Err value: Error { code: -213, message: "OpenCV(4.5.4) /build/opencv/src/opencv-4.5.4/modules/core/src/matrix_wrap.cpp:2052: error: (-213:The function/feature is not implemented) in function 'assign'\n" }

I think this is coming from here:
https://github.com/opencv/opencv/blob/master/modules/core/src/matrix_wrap.cpp#L1906

but i don't really understand anything about opencv. I noticed that it is doing some sort of conditional on the kind of the matrix and I am wondering if something is being lost by the bindings?

Alternatively if you could confirm that the example still works then that would also help me a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions