I found the centroid of the contour for my program using opencv -python.I got the coordinates.I need to save those numerical data on to a text file?

I used the following code 

myList=[]

i=0

for i in range(100):

myList.append(center)

print "list"

print myList[i]

f = open("file1.txt","w")

f.write(cPickle.dumps(myList))

f.close()

After execution ,My result is like this 

(lp1

(I448

I30

tp2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

ag2

a.

i am getting the data in this format instead of numerical data.Please kindly help me in this regard.What should be my code to meet the expectations.

More venkata sriharsha Kuncham's questions See All
Similar questions and discussions