Image Annotation

[This article was first published on bnosac :: open analytical helpers - bnosac :: open analytical helpers, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This week, I uploaded a newer version of the R package recogito to CRAN.

The recogito R package provides tools to manipulate and annotate images and text in shiny. It is a htmlwidgets R wrapper around the excellent recogito-js and annotorious javascript libraries as well as it’s integration with openseadragon.
You can use the package to set up shiny apps which

  • annotate areas of interest (rectangles / polygons) in images with specific labels
  • annotate text using tags and relations between these tags (for entity labelling / entity linking).

The video below shows the image manipulation functionality in action in a shiny app which allows to align image areas with chunks of transcribed handwritten texts.

Although the package was orginally designed to extract information from handwritten text documents from the 18th-19th century, you can probably use it in other domains as well.
To get you started install the package from CRAN and read the README.


The following code shows an example app which shows an url and allows you to annotate areas of interest. Enjoy.

url <- ""
ui <- fluidPage(openseadragonOutput(outputId = "anno", height = "700px"),
                verbatimTextOutput(outputId = "annotation_result"))
server <- function(input, output) {
 current_img <- reactiveValues(url = url)
 output$anno <- renderOpenSeaDragon({
   annotorious(inputId = "results", src = current_img$url, tags = c("IMAGE", "TEXT"), type = "openseadragon")
 output$annotation_result <- renderPrint({
shinyApp(ui, server)

recogito example

To leave a comment for the author, please follow the link and comment on their blog: bnosac :: open analytical helpers - bnosac :: open analytical helpers. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)