uvagfx / hipi

HIPI: Hadoop Image Processing Interface
http://hipi.cs.virginia.edu
BSD 3-Clause "New" or "Revised" License
133 stars 82 forks source link

My change #27

Open honestold3 opened 8 years ago

honestold3 commented 8 years ago

Modify HibRecodReader to support Spark! so Spark Driver code Declare hadoopConfuration variable is "imagetype" , for example: val conf = new SparkConf() val sc = new SparkContext("local", "HipiDemo", conf) val hconf = sc.hadoopConfiguration hconf.set("fs.defaultFS", "hdfs://honest:8020") hconf.set("imagetype","FloatImage") val aa = sc.newAPIHadoopFileHipiImageHeader,HipiImage,HibInputFormat aa.saveAsNewAPIHadoopFile("hdfs://honest:8020/dw4", classOf[NullWritable],classOf[OpenCVMatWritable],classOf[BinaryOutputFormat[NullWritable, OpenCVMatWritable]])