Hi, I am working with Apache Spark 2.3.2, implementing an image grep application using Scala 2.11. I am reading images from HDFS using ImageSchema package. The series of step I run are:
1. import org.apache.spark.ml.image.ImageSchema 2. val df = ImageSchema.readImages("hdfs://filepath/*") // all the images 3. val result = df.select(col("image.data")).where(df.col("image.origin") === "hdfs://desired path").collect() I get an image binary in result. isInstanceOf[Any] of it gives "true". But when I try to convert it into array of integers using asInstanceOf it gives an error stating "cannot convert to Array[Int]". If I create any other random array and make it type Any the asInstanceOf works. I need to convert this because binary to image conversion does not work on type Any. implementing using image as data source with package org.apache.spark.ml.source.image as mentioned in docs does not work giving error of no such package, I am assuming it works in >= spark 2.4 . Any idea of what I may be missing or doing wrong? -- Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/ --------------------------------------------------------------------- To unsubscribe e-mail: user-unsubscr...@spark.apache.org