Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

If all the bounding boxes for an image have zero area, then the whole image will be set to zero

The followings examples will use the linked To try following examples, download this image.

Code Block
languagebash
> # mask in 2 rectangles
> cv-cat --file 20180101T000000.jpg \
    | csv-paste "value=800,500,1600,1700,2500,750,3100,1700;binary=8ui" "-;binary=t,3ui,s[21723870]" \
    | cv-calc roi --fields=rectangles,t,rows,cols,type --binary=8ui,t,3ui --rectangles="2,weight=5" \
    | csv-bin-cut --binary=8ui,t,3ui,s[21723870] --fields 9-13 \
    > masked.bin

> # crop out 2 rectangles ( csv-bin-cut not needed in this case )
> cv-cat --file 20180101T000000.jpg \
    | csv-paste "value=800,500,1600,1700,2500,750,3100,1700;binary=8ui" "-;binary=t,3ui,s[21723870]" \
    | cv-calc roi --crop --fields=rectangles,t,rows,cols,type --binary=8ui,t,3ui --rectangles="2,weight=5" \
    > cropped.bin

...