Closed abdelaziz-mahdy closed 4 months ago
Actually Mat.fromList was already supported, please check it in mat.dart, and recently i added Mat.fromVec, which also supports create Mat from a wrapped vector.
And, the current implementation of Mat.tolist is not elegant, i am considering constructing vectors from c++ in the future.
Oh looks like I missed it then, anyway I wanted to use to send data across isolates
Also, imencodeasync returns bool,unilist Why it's not the same as imencode
factory Mat.fromList(int rows, int cols, MatType type, List<num> data);
is there an option to take the output of tolist and just create a mat from it ? since i think this doesnt handle 2d arrays
First of all, sorry for the late reply, I am kind of busy recently.
Also, imencodeasync returns bool,unilist Why it's not the same as imencode
Actually imencode
should return (bool, Mat)
too, same as opencv-python, but I forgot it when developing the sync APIs ...ðŸ˜
So maybe we can fix it in the next release? Afterall, so many breaking changes will be included in the next release.
Or you think we should keep the current status and keep compatibility?
is there an option to take the output of tolist and just create a mat from it ? since i think this doesnt handle 2d arrays
Yes, Mat.fromList
only accepts 1D List for now, I have reviewed #165, thanks for your contribution!
First of all, sorry for the late reply, I am kind of busy recently.
Also, imencodeasync returns bool,unilist Why it's not the same as imencode
Actually
imencode
should return(bool, Mat)
too, same as opencv-python, but I forgot it when developing the sync APIs ...ðŸ˜So maybe we can fix it in the next release? Afterall, so many breaking changes will be included in the next release.
Or you think we should keep the current status and keep compatibility?
is there an option to take the output of tolist and just create a mat from it ? since i think this doesnt handle 2d arrays
Yes,
Mat.fromList
only accepts 1D List for now, I have reviewed #165, thanks for your contribution!
dont worry, i get busy and forget to reply too,
anyway i am confused what does the bool do is that success or failure? and i think matching to the python api will be much easier for developers so i think that breaking change is needed
@abdelaziz-mahdy
anyway i am confused what does the bool do is that success or failure?
Yes, it is.
and i think matching to the python api will be much easier for developers so i think that breaking change is needed
Ok, thanks for your advice, then I am going to change it in the next release.
Hope i'm not hi-jacking the thread but I am trying to use the Mat.fromVec function and it causes the app to crash (on both iOS simulator and physical iphone device). Can you please explain what is the difference between a Vector and a Wrapped Vector?
The following line: penCV.Mat docCntMat = openCV.Mat.fromVec(docCnt!);
Casues the crash. docCnt is Mat.Vec type.
Any idea/advice?
Thanks!
Hope i'm not hi-jacking the thread but I am trying to use the Mat.fromVec function and it causes the app to crash (on both iOS simulator and physical iphone device). Can you please explain what is the difference between a Vector and a Wrapped Vector?
The following line: penCV.Mat docCntMat = openCV.Mat.fromVec(docCnt!);
Casues the crash. docCnt is Mat.Vec type.
Any idea/advice?
Thanks!
Attach your error logs please, also, better to provide a minimum reproducable example.
Also I think a new issue will be better for tracking the status
i found to list for mat object, do you think a from list should be added? it will make it easier to convert to dart and from dart objects to send objects between isolates