Closed sdv1812 closed 4 years ago
Hi Sanskar Deepak, Take a look at the Mat javascript opaque object that wraps an OpenCV Mat. Take a look at the methods put and get for manipulating the data.
https://github.com/adamgf/react-native-opencv3/blob/master/mats.js
Hope that helps, Adam
On Tue, Jun 23, 2020 at 9:01 AM Sanskar Deepak notifications@github.com wrote:
I want to convert the Mat object returned from RNCv.imageToMat to a ndarray https://github.com/scijs/ndarray object, as I want to use some functions of the ndarray library.
However, from the Mat object i can see it has only got 3 attributes (matIndex, rows, cols).
Can this object be used to get the image matrix or is there a way to fetch the matrix using the matIndex?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adamgf/react-native-opencv3/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6V33WFBAJGEOPNDAGY5LRYDGVZANCNFSM4OFZ4M3Q .
Oh I see. That's what I needed. Thanks for the help!
I want to convert the Mat object returned from RNCv.imageToMat to a ndarray object, as I want to use some functions of the ndarray library.
However, from the Mat object i can see it has only got 3 attributes (matIndex, rows, cols).
Can this object be used to get the image matrix or is there a way to fetch the matrix using the matIndex?