Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi, The solution seems easy when found ;o) I hope doc will be extnded soon !

Here is how to load and use a matrix stored in an opencv generated xml file :

fileToLoad="myFile.xml"
cv.Load(fileToLoad)
click to hide/show revision 2
finished explanation

Hi, The solution seems easy when found ;o) I hope doc will be extnded soon !

Here is how to load and use a matrix stored in an opencv generated xml file :

#load xml file
fileToLoad="myFile.xml"
myLoadedData = cv.Load(fileToLoad)

#check data properties
print myLoadedData # this print shows matrix size, datatype, cool !

#access a cell of the matrix
rowIdx=1
colIdx=10
print "Accessing matrix at col:"+str(colIdx)+", row:"+str(rowIdx)
print myLoadedData[rowIdx, colIdx]

That's done ! Hope it helps

Regards