Guest User

Untitled

a guest
Nov 19th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. rects = []
  2.  
  3. xmlnomes = glob.glob('Base1/*.xml' )
  4.  
  5. for i in range(0,len(xmlnomes)):
  6. DOMTree = xml.dom.minidom.parse(xmlnomes[i])
  7. roi = DOMTree.documentElement
  8.  
  9. x = int(roi.getElementsByTagName('xmin')[0].childNodes[0].data)
  10. y = int(roi.getElementsByTagName('ymin')[0].childNodes[0].data)
  11.  
  12. width = int(roi.getElementsByTagName('xmax')[0].childNodes[0].data) - x
  13. height = int(roi.getElementsByTagName('ymax')[0].childNodes[0].data) - y
Add Comment
Please, Sign In to add comment