Ionic & OpenCV

Hey guys,
I want to create a simple application that take a photo of a document and “scan” it (like CamScanner).
I found that this can easily achieved with OpenCV but I have few questions:

  • How I can connect from Ionic to Java component?
  • How I can build my app for android and iOS with such a component?
  • Is it easier if I just take the photos and upload them to the server and process them there? But if they are pre-processed on the device it will be less data transferred?