rainyl / opencv_dart

OpenCV bindings for Dart language and Flutter. Support Asynchronous Now!
https://pub.dev/packages/opencv_dart
Apache License 2.0
136 stars 18 forks source link

Deprecate `Mat.shape` or make it as an alias of `Mat.size` #232

Closed rainyl closed 2 months ago

rainyl commented 2 months ago
          > How can I use Mat.size in Dart to handle 3D Mat data? Could you give me some more suggestions? I'm sorry, but I'm not familiar with C++ at all.

Refer to the API doc, https://pub.dev/documentation/opencv_dart/latest/cv.core/Mat/size.html , Mat.size will return a VecI32, basically you can use it as other Iterable like List.

But Mat.shape may be misleading and we will make it as an alias of Mat.size in the future.

_Originally posted by @rainyl in https://github.com/rainyl/opencv_dart/issues/231#issuecomment-2327716519_

rainyl commented 2 months ago

I have reconsidered this, and think it's not necessary now.

2D mat is the most commonly used, and many users have used Mat.shape, keeping compatibility is important.

for 3D mat, just use Mat.size, same as opencv c++.