Skip to content

magick to opencv #36

@jwijffels

Description

@jwijffels

I'm using this package a lot to parse out data from Transkribus and get the text lines in order to build some handwritten text recognition models.
For the data preparation there, I regularly switch between tools part of magick and tools part of opencv, normally I do this now as follows, it would be nice to have something more native in opencv.

magick_to_opencv <- function(img){
  p <- tempfile()
  on.exit({
    if(file.exists(p)){
      file.remove(p) 
    }
  })
  magick::image_write(img, path = p)
  image <- opencv::ocv_read(p)
  image
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions