I just found Scala Breeze as a high performance linear algebra library for Scala applications.
I wonder if there is a way to initialize a DenseMatrix with an Int Array as element unit.
This is the OpenCV functionality i am trying to port to Breeze:
val rgb_raw = Array[Byte] (....) //ByteArray RGB values dim 480x360
val rgb_mat = new Mat (360, 480, CvType.CV_8UC3)
rgb_mat.put(0,0,rgb_raw)
I wish it was something as easy as:
val rgb_mat = new DenseMatrix(360,480, rgb_raw)
or
val rgb_mat = new DenseMatrix[Array[Int,Int,Int]](360,480,rgb_raw)
I haven't found anything in the documentation that points me in the right direction.
This works for me