I have rectangle data associated with images in a txt file.
Each row is for a diff image.
First column is image number.
8 17 30 70 80
9 49 25 72 83
10 13 21 75 82 74 25 16 21
Each line is for rectangles represented by:
img_number lefttopcorner.Xcoord lefttopcorner.Ycoord width height
associated with an image.
These data are space separated.
The third line shows there is two rectangles for this image, but there could be many.
The rectangles on the same row are tab separated.
So a written example of two rectangles on same line would be like:
img_num<space>lefttopcorner.X<space>lefttopcorner.Y<space>width<space>height<tab>...
How would i load these rectangles into vars in python and put them in some collection structure.
maybe have like parrallel arrays of tuples or rectangles?
am looking for easiest implementation.