#4449: Blur Before You Publish: Image Redaction Tools

How to automatically find and blur QR codes, credit cards, and sensitive text in photos before publishing.

Featuring
Listen
0:00
0:00
Episode Details
Episode ID
MWP-4628
Published
Duration
23:45
Audio
Direct link
Pipeline
V5
TTS Engine
chatterbox-regular
Script Writing Agent
deepseek-v4-pro

AI-Generated Content: This podcast is created using AI personas. Please verify any important information independently.

The gap between text redaction and image redaction is surprisingly wide. Text is linear — named entity recognition models walk token by token through a document, flagging phone numbers, credit card numbers, and names with decent recall. Images are unstructured spatial data with variable lighting, weird angles, partial occlusion, and content that isn't text at all — QR codes are patterns of squares, faces aren't text, and a laptop screen showing a Slack thread is text rendered at an angle with reflections.

The fundamental challenge is that image redaction requires a two-stage pipeline. First you have to find the sensitive region in pixel space using computer vision, and then you have to decide whether it's sensitive — which might mean running OCR on it and then running NER on the extracted text. Each stage introduces its own errors, and they compound.

For the narrow case of QR codes on shipping labels, the open-source path is viable today. pyzbar or OpenCV's QRCodeDetector can find those distinctive finder patterns — the nested concentric squares in the corners — and return bounding box coordinates. A few lines of Python later, you apply Gaussian blur inside each polygon and save. Batch processing fifty images takes seconds. For the broader case of credit cards, ID cards, laptop screens, and whiteboards with API keys, you need a more sophisticated pipeline: OCR to extract text, regex patterns or Presidio for PII detection, then blurring at the corresponding bounding boxes.

Cloud providers offer detection APIs — AWS Rekognition, Google Cloud Vision, Microsoft Azure Computer Vision — but none offer a single "redact this image" call. You always have to chain detection with your own blurring logic. For developers that's a day of work. For bloggers who just want to publish safely, it's a non-starter.

Downloads

Episode Audio

Download the full episode as an MP3 file

Download MP3
Transcript (TXT)

Plain text transcript file

Transcript (PDF)

Formatted PDF with styling

#4449: Blur Before You Publish: Image Redaction Tools

Corn
Daniel was writing up a blog post about the Eurobox system — something he's covered before, trying to help renters understand how all the boxes fit together. He's got fifty photos, each with a QR code that encodes an internal system URL, and suddenly he realizes he should blur those before publishing. The question is whether he has to open every single one in GIMP, or whether there's a smarter way. And he widens it out: beyond QR codes, what about credit cards on a desk, partial ID cards, a laptop screen showing Slack messages? What tools exist for automated image obfuscation, open-source or commercial?
Herman
That Eurobox scenario is exactly the kind of thing that catches people out. You take photos for a blog post, you're focused on framing and lighting, and six months later someone scans a QR code in the background of shot fourteen and lands on your internal provisioning dashboard. The gap between what we have for text redaction and what we have for images is... it's not small.
Corn
Text redaction is practically a solved problem by comparison. You've got Presidio, scrubadub, AWS Comprehend — they do named entity recognition, regex patterns, they can pull out phone numbers and credit card numbers and names with decent recall. Drop a document in, get a redacted document out. Images are a different beast entirely.
Herman
The fundamental challenge is that images are unstructured spatial data. Text is linear — you read left to right, token by token, and your NER model just walks along the sequence. An image has no sequence. You've got variable lighting, weird angles, text that's partially occluded by someone's thumb, QR codes printed on curved surfaces. And then there's the stuff that isn't text at all — a QR code isn't words, it's a pattern of squares. A face isn't text. A laptop screen showing a Slack thread is text, but it's text rendered on a display at an angle with reflections on it.
Corn
So the pipeline has to be two-stage in a way text redaction isn't. First you have to find the thing in pixel space — that's computer vision — and then you have to decide whether it's sensitive, which might mean running OCR on it and then doing NER on the extracted text. Each stage introduces its own errors, and they compound.
Herman
Right. If your OCR misreads a credit card number as something else, your NER stage never flags it. If your QR detector misses a code because it's partially behind a coffee cup, you ship the image with a live URL. Text redaction doesn't have that first detection problem — the text is already text.
Corn
So what's actually out there? Daniel asked about the landscape, and I went digging through GitHub. Found four repos worth looking at. The first is CloakFrame, from a user called nyattic. It looks like a frame-level obfuscation tool — probably designed for video or image batches, applying blurring or masking across frames. The big question with CloakFrame is whether it does automatic QR detection or whether it expects you to manually select regions. If it's manual region selection, it solves the batch-processing part — you mark a region once and it applies to fifty frames — but it doesn't solve the detection part. You still have to find the QR codes yourself.
Herman
And that's the tedious part. The blurring takes half a second. Finding the thing to blur is where the time goes. So if CloakFrame is just a blur propagation tool, it's useful but incomplete. The second repo is called censor, from aklid01, and it's more of a general-purpose censorship tool. Based on the repo description, it uses computer vision to detect faces, text, or custom regions. The interesting question is what's under the hood — is it using OpenCV contour detection, which is fast but brittle, or a pre-trained object detector like YOLO or SSD, which is more robust but heavier?
Corn
Contour detection works by finding edges and shapes — it's what you'd use to find rectangular regions or high-contrast patterns. For something like a QR code with its distinctive finder patterns, contour detection can actually work pretty well. But for a credit card at an angle on a cluttered desk, you're going to want a trained model that understands what a card looks like from different perspectives.
Herman
The third repo is tuomin-dao, from zhengdonggit. The name — tuomin, anonymization, dao, the way — suggests it might be a more comprehensive pipeline. Possibly integrating OCR for text detection and then blurring. The critical question is whether it handles non-text objects. If it's OCR-only, it fails the QR code scenario entirely — a QR code isn't text, it's a machine-readable pattern. But it might handle receipt photos well, picking up credit card numbers and blurring them.
Corn
And the fourth is hackathon_project_mediavizard from jeredhiggins. Hackathon project, so probably rough around the edges, but those often have the most interesting ideas. Might combine OCR with object detection in a way that more polished tools haven't adopted yet. Hackathon projects are where you see someone try something like "what if we just ran YOLO on every frame and then piped the bounding boxes into Tesseract" — and it works surprisingly well, even if the code is held together with tape.
Herman
The thing that connects all four of these is the two-stage pipeline problem. Stage one: find the sensitive region. Stage two: obfuscate it. Stage one is the hard part, and it's where all the tools diverge in approach. Some use classical CV — edge detection, contour finding, template matching. Some use deep learning — CNNs trained to spot specific object classes. Some use OCR as a proxy — extract all text, then run NER on the extracted text to find PII, then map back to pixel coordinates and blur those regions.
Corn
The OCR-then-NER approach is interesting because it reuses the maturity of text redaction tools. You could theoretically take Presidio, point it at OCR output, and get a list of sensitive strings. Then you go back to the image with the bounding boxes from the OCR engine and blur wherever those strings appeared. But the failure mode is OCR errors. If Tesseract reads a credit card number as "1234 5G78 9012 3456" — that G instead of a 6 — your regex for credit card numbers never fires.
Herman
And credit card numbers have a checksum, so you could validate them after OCR, but that adds another step. The QR code case is actually simpler in some ways because QR codes were designed to be machine-detectable. They have those three finder patterns — the squares in the corners with the nested concentric squares inside them. Those patterns are distinctive and don't occur naturally in most scenes. You can detect them with classical computer vision — contour detection looking for a specific ratio of nested squares, which is exactly what OpenCV's QRCodeDetector does.
Corn
pyzbar is another option — it's a Python wrapper around the zbar library, and it can decode QR codes and return bounding box coordinates. You feed it an image, it gives you back a list of polygons. Then you just apply a Gaussian blur or pixelation inside each polygon and save. Batch processing fifty images takes seconds, not hours.
Herman
The finder pattern approach is robust to rotation and scaling, which is why QR codes work at all — they're designed to be scanned from any angle. But partial occlusion is still a problem. If a QR code is half-hidden behind something, the finder patterns might not all be visible, and the detector fails. That's where deep learning approaches can help — a CNN trained on partially occluded QR codes can sometimes spot them even when classical methods can't.
Corn
So for Daniel's specific Eurobox scenario — fifty photos, QR codes on shipping labels — the open-source path is viable today. pyzbar or OpenCV's QRCodeDetector, a few lines of Python, done. But that's the narrow case. Widen it out to credit cards, ID cards, laptop screens, whiteboards with API keys, and suddenly you need a much more sophisticated detection pipeline.
Herman
Let's shift to what the cloud providers offer, because a lot of people assume there's a "redact this image" button somewhere in AWS or Google Cloud. There isn't. What you get are detection APIs. AWS Rekognition has a DetectText API that finds text in images and returns bounding boxes with confidence scores. It can handle dense document text, text on curved surfaces, text at angles. But it doesn't redact anything — it just tells you where the text is and what it says.
Corn
So you'd need to take that output, run your own PII detection on the extracted strings, then apply blurring to the corresponding bounding boxes. Rekognition does the first half of stage one — finding the text — but you still have to do the sensitivity decision and the obfuscation yourself.
Herman
Same story with Google Cloud Vision. Their text detection is excellent — they handle dense document text and even handwriting in multiple languages. They also do object detection and logo detection. You could theoretically use logo detection to find credit card logos and then look for numbers nearby. But again, no built-in redaction. Just detection.
Corn
Microsoft Azure has their Computer Vision API with OCR and a read API for printed and handwritten text. They've also got this dense captioning feature that generates detailed descriptions of image regions — it might identify "a credit card on a wooden desk" in the caption, which you could then use as a trigger. But that's a very indirect approach, and the caption might not be specific enough to give you a precise bounding box.
Herman
The gap is clear: no major cloud provider offers a single API call that takes an image and returns a redacted image. You always have to chain at least two services — detection plus your own blurring logic. For a developer, that's maybe a day of work to wire up. For a blogger who just wants to publish safely, it's a non-starter.
Corn
There are specialized SaaS tools in specific verticals. Legal document redaction platforms like Everlaw and Relativity handle scanned documents and can redact PII, but they're designed for discovery workflows in litigation — they cost thousands of dollars a month and aren't built for casual photo publishing. Medical imaging has de-identification tools for DICOM images, stripping patient metadata and burning in anonymized identifiers. But again, narrow verticals with enterprise price tags.
Herman
And then there's the privacy question with any SaaS approach. If you're sending photos to a third-party API for redaction, you're trusting them with the unredacted images. For a blog post about shipping containers, maybe that's fine. For photos that might contain a partial national ID card or a screenshot of internal systems, you probably want the processing to happen locally.
Corn
That's the open-source advantage. Local processing, no per-image cost, no data leaving your machine. The tradeoff is setup complexity. If you're comfortable with Python, you can build a pre-publish pipeline in an afternoon. If you're not, you're still opening GIMP fifty times.
Herman
Let me sketch what that pipeline looks like. You've got a directory of images. You write a script that loops through them. For each image, you run pyzbar or OpenCV's QRCodeDetector to find QR codes. Then you run EasyOCR or Tesseract to extract all text regions. You pipe the extracted text through a set of regex patterns — credit card numbers, phone numbers, email addresses, anything that looks like an API key. You could even use Presidio on the OCR output for more sophisticated NER. For each match, you get the bounding box from the OCR engine, and you apply a Gaussian blur with a kernel size large enough to make the text unreadable — maybe a 25-pixel radius. Then you save the processed image.
Corn
The regex approach catches the obvious stuff. Credit card numbers have a well-defined format and a Luhn checksum. Phone numbers follow patterns. API keys often have distinctive prefixes or entropy characteristics. But it won't catch a partial ID card unless you have a specific template for that card type, and even then you're into object detection territory.
Herman
National ID cards are a genuinely hard problem. They have structured layouts — photo here, name there, ID number in this corner — but the layouts vary by country and even by issuance year. You could train an object detector to recognize specific card designs, but that's a maintenance burden — new card designs get issued, your detector needs retraining. Template matching is brittle because lighting and angle variations throw it off. This is an active research area, not a solved problem.
Corn
So the practical advice splits into tiers. Tier one: QR codes and barcodes. Solved. Use pyzbar, batch process, done. Tier two: text-based PII with clear patterns — credit cards, phone numbers, email addresses. Doable with OCR plus regex, expect maybe 80 to 90 percent recall depending on image quality. Tier three: unstructured sensitive objects — ID cards, laptop screens showing arbitrary content, whiteboards. Not solved. You can get partial coverage with object detection models, but you're going to miss things.
Herman
And that tier three is where the real risk lives. A QR code is obvious — it's a weird pixelated square, people notice it. A whiteboard covered in architecture diagrams and API endpoints just looks like a whiteboard. Nobody thinks to blur it, and the OCR on the published image might be good enough for a motivated attacker to read.
Corn
There's an integration angle worth mentioning. If you're publishing regularly — a blog, documentation, social media — you can build the redaction check into your publishing pipeline. Option one: a local script you run before uploading anything. Option two: a GitHub Action or pre-commit hook that scans images in your repo. Option three: a browser extension that checks images before they hit the upload button on WordPress or Twitter. Option one is the most mature. Option three is... I don't think anyone's built a good one yet.
Herman
The GitHub Action approach is clever for documentation repos. You commit your screenshots, the action runs on push, scans for QR codes and potential PII, and either warns you or auto-redacts. The problem is that auto-redaction in CI means you're committing the redacted version, and if the detector makes a mistake — false positive, blurs something important — you might not notice until it's published.
Corn
Better as a warning than an auto-fix, then. "Hey, we found what looks like a credit card number in screenshot_04.png, please check." That's a lot more useful than silently blurring half your diagram.
Herman
Let's talk costs for a minute, because the open-source versus SaaS decision often comes down to volume. AWS Rekognition DetectText costs about a tenth of a cent per image for the first million images per month. If you're publishing fifty blog post photos, that's five cents. Negligible. But if you're running a platform where users upload thousands of images an hour, the costs add up — and you're also paying for the blurring compute, and you're dealing with the latency of an API call per image.
Corn
The open-source pipeline costs zero in API fees. Your only cost is compute time. For QR detection with pyzbar, it's basically instant on a CPU. For OCR with Tesseract, a few hundred milliseconds per image. For deep learning object detection, you might want a GPU, but for batch processing fifty images it's still seconds, not minutes.
Herman
The real cost of open-source is the setup time and the maintenance. You have to know enough Python to wire the pieces together, and you have to keep the dependencies updated. That's trivial for a developer, prohibitive for a non-technical blogger. Which is exactly why the market gap exists — there's no "install this and forget it" solution for image redaction yet.
Corn
Someone's going to build it. The question is whether it comes from a cloud provider finally adding a redact endpoint, or from the open-source community packaging up something like CloakFrame or censor into a desktop app with a simple UI.
Herman
I'd bet on open-source getting there first. The cloud providers are focused on enterprise use cases — content moderation for social media platforms, document processing for legal and healthcare. A general-purpose image redaction tool for bloggers and documentation writers isn't their market. But it's exactly the kind of thing a motivated open-source developer builds over a weekend and puts on GitHub.
Corn
Where does that leave Daniel and the Eurobox photos? The specific problem he's got is the easiest case. QR codes, fifty images, batch processing. pyzbar plus OpenCV, maybe fifteen lines of Python, and he's done. The wider question he asked — what about everything else — that's where the landscape gets patchy.
Herman
Here's what I'd tell someone to do right now. Step one: for QR codes and barcodes, use pyzbar or OpenCV's QRCodeDetector. It works, it's fast, it's free. Step two: for text-based PII, set up an OCR pipeline with Tesseract or EasyOCR, run regex patterns on the output, and blur the matching regions. Expect to tune the regex for your specific use case. Step three: for everything else — ID cards, screens, whiteboards — manual review is still your safety net. The automated tools aren't reliable enough yet to trust without human verification.
Corn
If you're publishing regularly, make the pre-publish check a habit. Don't rely on spotting things by eye. You'll miss the QR code on the shipping label in the background, or the reflection of your monitor in the window, or the sticky note with a password on the edge of the frame. Our visual attention is terrible at catching security-relevant details in the periphery of an image.
Herman
The sticky note problem is real. People focus on the subject of the photo — the product, the desk setup, the whiteboard — and everything else is just background. But the camera captures it all at full resolution. A sticky note with a password that's eight pixels tall in the final image might still be readable if someone zooms in.
Corn
Which brings us back to automation. The whole point of a pre-publish pipeline is that it doesn't have human attention limitations. It scans every pixel, every region, every pattern. It's not smarter than a human — it's dumber, but it's thorough in a way humans aren't.
Herman
Thoroughness is what you want for this. You don't need a genius AI that understands the semantic content of your photos. You need a dumb scanner that says "this pattern looks like a QR code, blur it" and "this string of digits passes the Luhn check, blur it." The bar is low, and that's actually an advantage — simple rules are easy to implement and easy to verify.
Corn
The open-source tools we mentioned — CloakFrame, censor, tuomin-dao, mediavizard — they're all attacking different pieces of this. None of them is the complete solution yet, but they're building blocks. If I were putting together a recommendation for Daniel, I'd say start with pyzbar for the immediate QR code problem, then look at censor or tuomin-dao for the broader text redaction, and keep an eye on the space because it's moving fast.
Herman
It is moving fast. The computer vision models are getting smaller and faster — you can run YOLO on a phone now. The OCR engines are getting better at handling weird angles and lighting. The gap between what text redaction can do and what image redaction can do is closing. It's not closed, but it's closing.
Corn
The incentive to close it is only growing. More people are publishing visual content — blogs, social media, documentation, video streams. More devices are capturing images automatically — dashcams, doorbell cameras, AR glasses. Every image that gets published is a potential information leak. The tools we're talking about today are early-stage, but in a year or two, automated image redaction is going to be as standard as spell-check.
Herman
The Eurobox blog post is a canary. If you're publishing photos with QR codes or barcodes or visible PII today, the time to build your redaction pipeline is now — not after someone scans something they shouldn't.
Corn
Try the open-source tools on a test set of your own photos. See how they handle QR codes versus text versus the weird edge cases. The community needs more real-world testing, and the feedback loop between users and developers is what turns rough hackathon projects into reliable tools.
Herman
If none of the existing tools quite fit, the pieces are all there to build your own. pyzbar for QR codes, Tesseract for text, OpenCV for the blurring. It's a weekend project, and the peace of mind is worth it.
Corn
The bigger question — whether cloud providers will eventually offer a single redact-this-image API — is still open. The market exists. Every blogger, documentation writer, and social media manager has this problem. But the cloud providers seem content to offer detection and leave the redaction as an exercise for the developer. That gap is where open-source is going to win.
Herman
Or where a startup steps in. A simple SaaS product that does one thing — upload image, get redacted image back — with local processing as an option for sensitive use cases. Charge five bucks a month, solve a real problem, build a business. The pieces are all commodity now. Someone just needs to package them.
Corn
Until then, we've got Python scripts and GitHub repos and a community of people figuring it out. Which is, honestly, how most useful infrastructure gets built.
Herman
Thanks to Hilbert Flumingtop for producing.
Corn
This has been My Weird Prompts. Find us at my weird prompts dot com, or email the show at show at my weird prompts dot com.
Herman
We'll be back soon. Go blur your QR codes.

This episode was generated with AI assistance. Hosts Herman and Corn are AI personalities.