Extracting image features using PySpark-OpenCV on RDD data

Extracting image features using PySpark-OpenCV on RDD data

Postby gsreddy2507 » Mon Dec 07, 2015 8:45 am

Dear Team,

Let me explain my experiment. I have convert the image files to sequencefile(SequenceWritable). Using java i.e from local drive to hadoop(HDFS) file. And trying to read this sequencefile from hadoop using pySpark. Here I am able to load the data in RDD.

If trying to use this RDD with OpenCV function could not able to compile. I need help on this.

code eg:

Code: Select all
import cv2 import numpy as np imageRdd = sc.sequenceFile("/user/GR5017759/Retinopathy/OutputSeq")
R = cv2.imdecode(np.asarray(bytearray(imageRDD), dtype=np.uint8)


===================================

error:

Code: Select all
TypeError: 'RDD' object is not iterable
If you have any idea on this please help me.

--
Thanks & Regards,
G Sridharan Reddy
Last edited by stranac on Mon Dec 07, 2015 11:23 am, edited 1 time in total.
Reason: First post lock. Added code tags.
gsreddy2507
 
Posts: 1
Joined: Mon Dec 07, 2015 8:35 am

Re: Extracting image features using PySpark-OpenCV on RDD da

Postby Ofnuts » Mon Dec 07, 2015 3:17 pm

Can you repost your code with proper line breaks and indent?
This forum has been moved to http://python-forum.io/. See you there.
User avatar
Ofnuts
 
Posts: 2659
Joined: Thu May 14, 2015 9:46 am
Location: Paris, France, EU, Earth, Solar system, Milky Way, Local Cluster, Universe #32987440940987


Return to Challenges

Who is online

Users browsing this forum: No registered users and 1 guest

cron