Joseph Redmon
2015-03-30 6553b3f0e3e55fc30a99c7d4b5798aa86d18a114
src/data.c
@@ -66,6 +66,7 @@
typedef struct box{
    int id;
    float x,y,w,h;
    float left, right, top, bottom;
} box;
box *read_boxes(char *filename, int *n)
@@ -83,6 +84,10 @@
        boxes[count].y = y;
        boxes[count].h = h;
        boxes[count].w = w;
        boxes[count].left   = x - w/2;
        boxes[count].right  = x + w/2;
        boxes[count].top    = y - h/2;
        boxes[count].bottom = y + h/2;
        ++count;
    }
    fclose(file);