Most efficient way to loop through a Mat #44
Replies: 2 comments 8 replies
-
UPDATE: Since @msmartin4470 You can use Mat.at<T>() too, but only for getter, if you need setter, use Mat.set<T> Although not tested, I think it is an efficient way to loop through a mat for now. |
Beta Was this translation helpful? Give feedback.
-
@msmartin4470 Recently I have implemented the Mat::ptr in v1.0.3 and v2.0.0-dev.4 to allow accessing pointer like c++, with proper and careful operation this might be more efficient, you can try it and open new issues if there are any problems. Mat::ptr<T>() -> Mat.ptrAt<T>() or Mat::ptr<uchar>() -> Mat.ptrU8() and more similar APIs, you can explore more in release and document. |
Beta Was this translation helpful? Give feedback.
-
What is the best way to loop though a Mat in dart? In C I did this using pointers as follows. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions