cv-calc roi and
draw operations can now read the shapes from csv files. To incorporate this, usual csv options have also been added to the shape attributes.
If the shapes have (reverse) index fields it will draw / apply all the shapes in the block in each file on single image, otherwise it takes only one shape per file.
If the shapes file has field t (timestamp), then the shapes in the block are drawn only to the image with corresponding timestamp, otherwise each block of shapes is drawn on the next available image (see cv-calc --help for details).
To try following examples, download this image.
> cv-cat --file 20180101T000000.jpg \ | cv-calc draw --rectangles=<( echo "800,500,1600,1700" )";fields=min/x,min/y,max/x,max/y;color/r=255;weight=3" \ --circles=<( echo "2800,1225,300" )";fields=centre/x,centre/y,radius;color/b=255;weight=3" \ --labels=<( echo "1,1200,1100,cat01"; echo "0,2800,1225,cat02" )";fields=index,position/x,position/y,text;color/g=255;weight=2" \ | cv-cat "encode=jpg" --output no-header > drawn.jpg > eog drawn.jpg