spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaonary Rabarisoa <jaon...@gmail.com>
Subject Efficiently map external array data (OpenCV) to spark array
Date Mon, 17 Mar 2014 15:59:56 GMT
Hi all,

I'm currently trying to use Spark Kmean|| to cluster keypoints descriptor
extracted using OpenCV.
OpenCV extract and store descriptors insinde Mat object. I convert Mat
object into Array[Array[Double]] with the following code :

(0 until descriptors.rows).map { i =>
        val row = new Array[Float](descriptors.cols)
        descriptors.get(i,0,row)
         row.map(_.toDouble)
}

This works but really slow down the code.

Is there another alternatives ?


Cheers,

Mime
View raw message