Automating a presentation

I’m a resident at an orthopaedic surgery hospital. Every week I have this task to report all the operations we’ve done in the last week. We do that by creating a presentation (either in Powerpoint or Google Slides). I do this by using Google Slides. It’s a simple presentation with text at the bottom, images of the X-Ray’s and/or intraoperative images of the patients at the top. All the images are kept in my Google Drive folder during the week and the text is kept in an image file (“text image”) in another folder. Both the images and text image are labeled as the name of the patient and they take up one slide. This entire task is time consuming for me, I have ~20 patients every week and all of them have preoperative and postoperative images, I do this all by myself. I was wondering if there is a way to automate a part, or the entire task. Somebody suggested I used Google Slides API for the presentation creating itself, and OpenCV for image editing

I keep all my older presentations in a separate folder. Can OpenCV assist me in cropping the X-Ray images and pulling the appropriate text from the “text image” file?

numpy arrays are the common data format at runtime. a lot of libraries can deal with numpy arrays.

numpy itself lets you take a slice of an array. that is cropping.

OpenCV may not know how to read your type of medical image. there are other libraries specifically for reading and writing various image types.

OpenCV is also not an app you can interact with. if you need to drag a rectangle on your image for the cropping, that can be done because OpenCV supports some GUI by itself but that too isn’t its purpose and the GUI facilities provided by OpenCV are bare, not user-friendly.

are you saying it’s an image file with text drawn in it? why is text kept in an image file? is this hand-written or not?

if you need to perform optical character recognition, you’d best look for libraries for the purpose. OpenCV, among the contrib modules, has a text detector and an interface to tesseract for the OCR.

I guess I didn’t understand the purpose of OpenCV then.

are you saying it’s an image file with text drawn in it? why is text kept in an image file? is this hand-written or not?

When we finish a case, we document the operation step-by-step in our database and then it’s printed. It also contains the name of the patient and the procedure we’ve performed. When the document is written, I take a photo with my phone and then upload it to my Google Drive folder. Later, when it’s time to make the presentation, I open the photo and manually copy the text into the presentation’s Text Box (can’t use copy/paste because it’s an image). The X-Rays btw, are not in DICOM or any other medical image format, I photograph the X-Ray film and upload it to a separate Google Drive folder

I thought I could automate a portion of the task by having “something” create a presentation, place images on the slide and maybe add the appropriate text

unless you plan to just put the photo of the text into the presentation, the biggest task you seem to have is getting that text as text.

your options:

  • get the text from your database directly
  • take a screenshot (cleaner than print+scan) and OCR that
  • print the report, take a photo or scan, and OCR that

get the “Adobe Scan” app for your phone. it performs OCR.

once you have your text as text (i.e. OCRed), you can manually copy+paste that into any program you want. no need to program or automate much.

sure, you can write a program to generate a presentation… but first you need the data that goes into the presentation. generating a presentation is the job of other libraries that know how to generate presentation files.