Blog

Find QR codes and text regions in images

Link detection decodes QR codes and moderates what they say, and OCR text regions record where text and contact details sit in an image.

3 min read

  • OCR
  • Images

A screenshot or flyer can carry more than its picture. A QR code in the corner may point anywhere, and a photo of a receipt or a parcel label can show someone's phone number. Release 2026.3 adds two results for text inside images: the linkDetection processing feature, which decodes QR codes and lists the links an image contains, and OCR text regions, which record where text and personal information sit.

Link detection is on by default for every image. To skip it for an upload, turn it off in processingOptions:

{
  "processingOptions": {
    "features": {
      "linkDetection": { "enabled": false }
    }
  }
}

CalmLens decodes up to five QR codes in the image. What each code says is moderated as text and merged into the image's report, the same way OCR text is. A QR code that holds abusive text can therefore change the decision on an image that looks harmless.

The results are on the asset as classification.linkDetection:

{
  "status": "evaluated",
  "stage": "ga",
  "qrCodes": [
    {
      "value": "https://example.com/offer",
      "box": { "left": 0.62, "top": 0.71, "width": 0.18, "height": 0.18 }
    }
  ],
  "links": [{ "url": "https://example.com/offer", "source": "qr-code" }]
}

Each QR code has its contents and a box giving its position as fractions of the image width and height. links lists the web links found, without repeats. A link written without a scheme, such as example.com/offer, is listed with https:// added.

When OCR is also on, links includes the links in the extracted text, with source: "text". Without OCR, only links inside QR codes are listed.

CalmLens doesn't visit the links. They are listed so you can check them yourself, for example against a list of domains your community has seen used for scams, and decide what to do with the post.

Link detection itself is free. Moderating the text in a QR code is billed in text-moderation tokens, like OCR text.

Where OCR found text

When OCR is on for an upload (processingOptions.features.ocr.enabled: true), it now also records where the text sits, in classification.ocr.textRegions. There is a box for each paragraph, and a box around each piece of personal information OCR reads: email addresses, phone numbers, payment card numbers, IBANs and US social security numbers. Those boxes are marked personalInformation: true. Like QR code positions, the boxes are fractions of the image size, so they stay correct whatever size you display the image at.

The OCR and image reports guide covers how extracted text and QR code text are merged into an image's report.

Signing in

Signing out

Cookies on CalmLens

We use essential cookies for sign-in and security. With your permission, functional cookies remember your preferences and Google Analytics measures website use and signups. Optional ad measurement cookies link Google ad clicks to signups. Personalised advertising stays off. Manage cookies