All posts

Blog

Can I crop an endoscopy image to just the lesion without Photoshop?

6 min read

Yes, but only if your capture step writes the smaller region to the file instead of saving the full frame and asking you to crop later. The crop has to happen at capture time, not after.

The pattern that works: open the video in a tool that overlays an adjustable region-of-interest box on the live feed, scrub to the moment of interest, hit capture once, and the JPEG you get is the inside of that box. Nothing else. No Photoshop, no resizing, no second step. The box is usually a square (lesions rarely need a rectangle), it drags to follow the lesion when the scope moves, and corners resize it from a tight vocal-cord view to a wider nasal-cavity view.

Why this is awkward with off-the-shelf tools

Generic video players (VLC, QuickTime, the default photo app) can save a frame, but they save the whole frame. To crop after the fact you're reaching for an image editor, which means a second app, a second file, a second set of decisions per patient. Multiply by 30 patients a day and the cost shows up.

Screenshots-from-a-video tools (Snipping Tool, Cmd+Shift+4 on a paused frame) introduce a different problem. The snapshot includes the player chrome (the timeline, the play button, the title bar), and resampling down to a usable resolution loses detail around the lesion.

The shortcut tools built for social media (CapCut, InShot, the trim tools in messaging apps) are the wrong shape. They're designed for landscape video, not for the portrait endoscopy view, and the crop UX assumes you care about the whole frame.

The pain is real because none of the standard tools were designed for "capture a small medical region from a portrait video while staying inside the patient record."

What good looks like, concretely

The bar is concrete enough to score against any tool. Seven criteria.

Crop at capture, not after. The saved file is the crop. If the tool saves the full frame and only "marks" the crop, you'll be cropping in post every time and you're back to Photoshop.

The crop box has to be adjustable at capture time. Drag to recentre when the scope moves. Resize from a corner when the lesion is wider or narrower than the default. A fixed centre crop with no adjustment works for 60% of cases and frustrates you on the other 40%.

The default should be the crop, not the full frame. If you have to remember to turn crop on, you'll forget. The toggle defaults to on, and the off state is a one-tap switch for the rare "I want the full frame this time" case.

A square (or near-square) is fine for almost every lesion. Free-rectangle crops are nice in theory, but in practice they let you produce inconsistently-shaped frames across patients, which makes your printed reports look uneven.

Capture should be one tap and write a print-quality file. A JPEG at full resolution. If you have to "export" after capture, that's a second step too many.

Multiple captures from one video matter too. A 30-second clip might give you 3 or 4 useful frames. The tool should let you scrub back, capture again, capture again, and only later decide which frames go into the patient file.

The last one is the one most tools miss. Captured frames have to land in the patient record, not on your desktop. Otherwise you end up with a Downloads folder full of frames named "frame_001.jpg" with no way to tell which patient they belong to.

If a tool passes all seven, you can crop to the lesion without Photoshop. If it skips any, you'll know within a week.

How to actually do it

The workflow is shorter than you'd expect.

  1. Drop the procedure video into the tool. Most tools accept the MP4 your scope outputs directly, no conversion.
  2. Position the crop box over the lesion area. The default is usually a centred square covering most of the frame. Drag it so the lesion is centred, resize from a corner if you need a tighter view.
  3. Scrub to the moment of interest. Use the keyboard arrows for fine control (most tools nudge the box by a few pixels per press, or the video playhead by a frame at a time).
  4. Hit capture. One tap. The tool writes a JPEG of just the crop and adds it to the gallery for this session.
  5. Repeat 3 and 4 as the scope moves. Scrub back, reposition, capture again. The gallery accumulates.
  6. When the procedure is done, save the captures to the consultation. They attach to the patient record, ready to print on your letterhead or share as a link.

The browser-side path (which is what DrPenDown's investigation studio implements) is one way to do the six steps: the trim and crop both run on your laptop, the video never leaves the device until you hit "upload to cloud," and the captured frames land directly in the patient file. The workflow works in any tool that meets the seven criteria; the product is incidental.

Common follow-up questions

Can I crop a photo I uploaded separately, or only frames captured from a video? Only frame captures. The crop is part of the capture step, a property of how the frame was taken, not a separate edit on a saved image. If you upload a photo, it goes into the patient file as-is. This is a real limitation, not a workaround: crop a video frame in the capture step, or upload the photo unedited.

Is the crop happening on the doctor's laptop or on a server? On the laptop. The browser draws the live video frame onto a canvas at the crop region and exports the canvas as a JPEG. Nothing is uploaded, nothing is processed in the cloud, until you decide to attach the captured frames to the consultation and hit the cloud-upload button. For clinics with strict data-residency rules, this matters.

Can I take 10+ frames from one procedure and pick later? Yes. Capture accumulates in a per-session gallery; nothing leaves the gallery until you commit. Discard the ones you don't want at the commit step.

Does the tool save the original full frame alongside the crop? In DrPenDown's case, no. The saved file is the crop. This is deliberate: storing both wastes cloud storage and most doctors never look at the full frame again. If you want the full frame for one capture, toggle crop off for that one capture.

Related reading