'I Tried To Pass My Image Memory From Flutter to Native C++ But It Showed Me Following Error Using OpenCV
Code from my native c++ enter image description here
Code from my native dart enter image description here
Code from my main dart enter image description here
I'm trying to pass my image memory from flutter dart to native c++ and showed me following error. enter image description here I tried to name the datatype to ByteData but it shows an error to. Please also note that I'm a beginner. Thank you
Solution 1:[1]
[Reposting the question]
My problem is that I'm using opencv 2d feature detection framework in flutter, the first problem I encountered is that flutter doesn't provide full core packages in opencv. So I tried another to solution to it, then I found Native Binding, which means I can bind my native code to dart. Which goes to my current problem, I managed to make it work from python and successfully converted it to c++ using visual studio code. Now the problem is my image is coming from flutter in raw data(ByteData) and I wanted to pass it to c++ file through native binding. But I'm having a conversion problem (this is the most current one) I tried to convert the bytedata from flutter Int32, and from my c++ file I change the 2 input data type to Uint32_t in c++, then from my dart ffi I also made in to Int for the input of the function. Then I got this following error.
c++ native code enter image description here dart native code where I got the error enter image description here My main dart code where I tried to pass the value of my image memory to the native function enter image description here
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
