Skip to contents

Draw an image and show the polygon where the detection was made as a polygon on top of the image.

Usage

ca_img_detection(data, height = 3000L, border = NA, col = NA, lwd = 4)

Arguments

data

data.frame Data.frame with imageurl, centerx, centery and size.

height

Integer specifying the height of the desired plot. Width is scaled proportionally.

border

chr Polygon outline color

col

chr Color to use if plotting filled polygons. The format is #RRGGBBAA where AA is the alpha channel for transparency

lwd

int Polygon outline line width

Examples

images[1,] |>
  ca_img_detection(height = 500, border = "red")
#> # A tibble: 1 × 7
#>   format width height colorspace matte filesize density  
#>   <chr>  <int>  <int> <chr>      <lgl>    <int> <chr>    
#> 1 JPEG     683    500 sRGB       TRUE         0 4096x3000

images |>
  ca_img_detection(height = 500, col ="#FF000040")
#> # A tibble: 1 × 7
#>   format width height colorspace matte filesize density  
#>   <chr>  <int>  <int> <chr>      <lgl>    <int> <chr>    
#> 1 JPEG     683    500 sRGB       TRUE         0 4096x3000