Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rects = []
- xmlnomes = glob.glob('Base1/*.xml' )
- for i in range(0,len(xmlnomes)):
- DOMTree = xml.dom.minidom.parse(xmlnomes[i])
- roi = DOMTree.documentElement
- x = int(roi.getElementsByTagName('xmin')[0].childNodes[0].data)
- y = int(roi.getElementsByTagName('ymin')[0].childNodes[0].data)
- width = int(roi.getElementsByTagName('xmax')[0].childNodes[0].data) - x
- height = int(roi.getElementsByTagName('ymax')[0].childNodes[0].data) - y
Add Comment
Please, Sign In to add comment