All projects

BW Converting

Print Plate Vision System

A Python and OpenCV system that scans a flexographic print plate on its cylinder and maps which areas are raised versus recessed, with a 3D-printed camera mount I designed.

Cameras on an aluminum extrusion mount in front of the machine, aimed straight at a print plate wrapped on a cylinder

Problem

Flexographic print plates have raised areas that carry ink and recessed areas that don’t. The goal was a camera system that could look at a plate mounted on its cylinder and measure how much of it is raised (its coverage), without needing perfect precision: results only had to land in the right one of three buckets (low, medium, or high).

Approach

  • I researched and compared several camera options. 2D cameras were the best value, since three coverage buckets didn’t call for the accuracy of more expensive sensors.
  • For data collection I designed a prototype mount in SolidWorks and 3D printed it on a Prusa Core One. It holds two cameras side by side, straight on to the cylinder at roughly its center, so every scan is taken from the same position.
  • The plate is wrapped around a cylinder, so the operator rotates it and captures a set of images around the full circumference. Frames from the two cameras are stitched together to cover the full length of longer plates.
  • The vision pipeline, in Python and OpenCV:
    1. Load the camera calibration to correct lens distortion.
    2. Find the plate on the cylinder and fit an adaptive region of interest to it: each side is fit with a polynomial, so the region follows the plate’s edges as they curve away from the camera.
    3. In a teach step, the user marks a few points on raised areas and a few on recessed areas of one scan.
    4. For the neighborhoods around those points, the program computes color-channel values in LAB color space plus several other image measures, then uses them to classify the rest of the image.
    5. The output is a confidence heatmap: hot for raised, cold for recessed, in-between colors where it’s unsure.
    6. The same model runs on every other scan in the set, and the results are averaged into a coverage bucket.
  • When the plate’s original one-bit TIFF artwork file is available, a separate program computes coverage directly from it as a second, exact method. That’s the ground truth, since it’s what the plate was made from.

How it came together

The camera choice, the mount, and the software were designed around each other, and the three coverage buckets set how good each part had to be.

  • There were only a few places to mount the camera. Inside the machine, the cameras’ wide field of view and the tight space wouldn’t have left enough working distance to see most of the cylinder, so the mount sits out in front of the machine, straight on at roughly the cylinder’s center. The prototype mount worked on the first try.
  • One camera couldn’t see the full length of some plates, so two sit side by side and their frames are stitched. The stitch doesn’t have to be perfect, because three coverage buckets don’t need that precision.
  • Because the plate wraps around a cylinder, its edges curve away from the camera. The region of interest adapts to each scan by fitting a polynomial to each side of the plate, so the analysis stays on the plate and off the machine around it.
  • I took as many images as it took to roughly cover the circumference, judged by eye, with minimal overlap. Some areas may be counted twice, but since every shot is averaged with the rest, the effect on the bucket is marginal.
  • With only the shop lights, specular reflections on the plate showed up in both the HSV and LAB color channels. That limited which measures I could rely on and made the analysis more complex than it would have been with controlled light.

Key decisions

  • 2D cameras over pricier options: best value for the accuracy the buckets actually needed.
  • Teach-by-example instead of fixed thresholds: a few clicked points per plate patch over the system’s weak spots (uncontrolled lighting and low-contrast plates), let it adapt to different plate colors and materials, and keep it simple for an operator to use. It was a cheap solution that worked for a prototype.
  • Confidence heatmap, not just a yes/no mask: low-confidence areas stay visible instead of being silently guessed.
  • Develop off the machine first: a standalone test fixture made it faster to iterate and prove the concept without tying up the machine.

What went wrong

The system worked well on most plate colors. It struggled on low-contrast and more transparent plate materials, where raised and recessed areas look nearly the same to a 2D camera, and specular reflections from the shop lights added false bright spots that the software had to work around.

What I’d do differently

  • Plan the lighting from the start. Grazing light, shining across the plate at a low angle, would cast shadows off the raised relief, bring back contrast on exactly the plates that were hardest to read, and reduce the reflections that complicated the software.
  • Replace the teach step with a trained model. The clicked points were a quick fix for poor contrast. With enough labeled scans, a trained classifier could make the call without any operator input.
  • Design a real mount. Mine was a prototype for collecting data. A production version would need to be designed for the machine itself. The system was built as a proof of concept, so it still needs to be tested in real use on the machine.

Media