OCR & Identification

Reading, inspecting, and assigning clearly – even under challenging conditions

OCR and identification in industrial machine vision are more than just reading. The decisive factor is that plain text, barcodes, or 2D codes are reliably recognized, checked, and clearly assigned even on difficult surfaces, at high speeds, and under changing conditions. Read more here about how robust identification systems are structured and which procedures are useful.

Serial numbers, batches, best-before dates, and codes connect a product to its digital data record. They enable traceability, control production steps, and prevent mix-ups. To ensure this works reliably, the marking must not only be present. It must be legible, correct in content, and assigned to the right object.

Camera-based identification systems from phil-vision read plain text, 1D barcodes, and 2D codes even at high speeds and on demanding surfaces. They check print quality, compare contents with order data, and transfer results to a PLC, database, or control system.

The general rule is: A high-performance algorithm can extract a lot from a difficult image. However, what is not optically visible cannot be read reliably by even the best OCR. That is why we always develop image acquisition, lighting, and evaluation as a complete system.

What does industrial identification involve?

Identification means more than just "reading a number". Depending on the process, the system must combine different tasks:

MethodTypical task
OCR – Optical Character Recognitionrecognizing unknown plain text and converting it into characters
OCV – Optical Character Verificationchecking known text for completeness & quality
1D Code Readingdecoding barcodes such as Code 128, GS1-128, EAN, or Code 39
2D Code Readingrecognizing Data Matrix, QR, Aztec, or other matrix codes
DPM IdentificationDPM Identification
Marker and Feature Identificationrecognizing fiducials, symbols, or natural object features

Which method is suitable depends on the marking, surface, speed, and process goal. If the expected content is known, OCV can be simpler and more reliable than completely free OCR. If the product bears a code, a standards-compliant decoder is usually the first choice. If all marking is missing, an image-based signature can distinguish the object based on natural features.

OCR and OCV: similar, but not the same

With OCR, the text content is initially unknown. The system locates characters or words and converts them into machine-readable data. Typical applications include serial numbers, lot numbers, dates, or markings on packaging and components.

With OCV, the system already knows the target text from a recipe, database, or previous process step. It checks whether the expected content has been applied correctly, completely, and with sufficient quality. This reduces the search space and allows for targeted print or embossing inspection.

Additional rules increase security:

  • fixed character count or defined positions
  • permitted character set and format patterns
  • date and value ranges
  • check digits and checksums
  • comparison with order, product, or batch
  • comparison of plain text and encoded content

An OCR result with a high score can still be syntactically incorrect. Only the comparison with process knowledge turns read characters into a reliable identification.

Classical OCR or Deep OCR?

Classical OCR segments characters and compares their features with trained font models. Under controlled conditions, it is fast, traceable, and often requires only a few samples. It is particularly suitable for consistent fonts, defined positions, and stable contrast.

Deep OCR recognizes connected words and can perform text localization and character recognition in separate model components. Pre-trained models can handle many fonts, orientations, and print variants. For special applications, recognition or localization can be re-trained with custom data.

Deep OCR is of interest for:

  • changing fonts, sizes, and text positions
  • rotated or perspectively distorted labels
  • fluctuating print quality
  • difficult character segmentation
  • complex or structured background

We do not use deep learning automatically. If classical OCR reads a defined label stably, it is often the simpler solution. For difficult variants, Deep OCR can provide the decisive gain in robustness. In both cases, format rules and process data safeguard the result.

Reading, checking, and verifying codes

When reading codes, a distinction must be made between three tasks:

  1. Decoding: The algorithm finds the code and outputs the contained data string. Error correction can mean that even damaged 2D codes can still be read.
  2. Validating content: The read string is technically checked: Do length, check digit, application identifier, batch, or serial number match? Does the code match the product and the current order?
  3. Evaluating print or marking quality: The physical quality of the symbol is assessed based on defined characteristics. For 2D codes, this includes symbol contrast, modulation, damage to fixed patterns, or grid distortion.

However, there is an important distinction here: "Readable does not automatically mean good." A powerful decoder can still recognize a code even though its quality grade is already critical. The next station with different optics or lighting might fail. Anyone who only checks for "read / unread" will recognize a gradual deterioration of the printing or marking process too late.

For standardized verification, depending on the symbol and application, ISO/IEC 15416 for linear codes, ISO/IEC 15415 for 2D symbols, and special procedures for Direct Part Marking apply, among others. Full standard-compliant verification places defined requirements on lighting, measurement geometry, calibration, and evaluation. A standard industrial camera is therefore not automatically a certified verifier.

Nevertheless, inline systems can monitor valuable quality parameters, identify trends, and issue warnings before codes become unreadable. Whether you need standard-compliant verification or process-related quality control is something we determine at the start of the project.

Direct Part Marking: when the code becomes part of the surface

With DPM, the code is laser-etched, needle-etched, stamped, or engraved directly into the component . It cannot fall off, thus ensuring the... machine vision but it faces particular challenges:

  • low contrast between the marking and the base material
  • shiny, rough, or curved surfaces
  • dot-matrix and incomplete modules
  • fluctuating marking depth and material color
  • contamination, corrosion, and processing marks
  • changing position and orientation of the component

This is usually where lighting makes all the difference. Low-angle darkfield illumination highlights recesses and edges. Coaxial light utilizes directed reflection on flat surfaces. Diffuse lighting reduces hotspots on shiny or curved components. Depending on the material, a different wavelength can also significantly improve contrast.

Image quality: resolution alone is not enough

For reliable detection, the smallest character or code module must be captured with multiple pixels, and edges must be sufficiently sharp. The actual resolution required depends on the symbol type, print quality, contrast, and decoder, and is validated using real samples.

Other decisive factors include:

  • sufficient depth of field in case of height and position deviations
  • short exposure time to prevent motion blur
  • defined polarity and stable light-dark contrast
  • clear quiet zones around barcodes and codes
  • controlled reflections on metal, foil, and paint
  • reproducible perspective or geometric distortion correction

With large components, a single image cannot capture the entire field of view while resolving small characters in high enough detail. In such cases, multiple cameras, moving image capture, or image stitching are used.

An example from electronics testing: Twelve individual images of an assembly are captured, calibrated, corrected for distortion, and seamlessly combined. In the final composite image, the system reads barcodes and plain text while simultaneously determining the position of fiducials. A homogeneous lighting concept is just as important here as the stitching itself.

Markerless identification

Not every object requires a printed code. Technologies such as FeaturePrint® generate a digital signature from natural surface and structural characteristics, comparable to a fingerprint. This allows products or packaging to be recognized and tracked without an additional label.

This is ideal for applications where markings are disruptive, prone to damage, or cause additional process costs. The prerequisites remain reproducible image acquisition and reliable inspection of variants, wear, partial views, and potential mix-ups.

From read character to traceability

An identification system does not end with the machine vision algorithm. The result must be assigned to the correct object and data record at the right time. Typical system functions include:

  • Triggering and assignment to the workpiece
  • Comparison with target values, recipe, or database
  • Good/bad decision and sorting/rejecting
  • Storage of the image, reading result, and quality values
  • Communication with PLC, robot, MES, or ERP
  • Handling of no-reads, multiple reads, and duplicates
  • Seamless logging for track & trace

The error strategy is particularly critical. What happens in the event of a low reading score, a missing database connection, or two detected codes? A robust solution deliberately defines such cases and does not force a seemingly safe answer.

How we develop an identification solution

1. Understand marking and process: We clarify the code or font type, materials, variants, speed, interfaces, and the consequences of a misread or unread code.

2. Test image acquisition: Using real good, limit, and bad samples, we compare the camera, optics, lighting angle, and spectral range.

3. Select and secure the method: We test code decoders, classical OCR, deep OCR, or markerless identification and supplement them with format, plausibility, and database checks.

4. Integrate and validate: Image capture, software, PLC, and data system are connected. Approval takes place under real cycle, variant, and environmental conditions.

Why phil-vision?

We combine OCR and code algorithms with experience in optics, lighting, calibration, deep learning, and industrial integration. As a result, we not only solve simple well-lit image capture, but also directly marked codes on metal, large fields of view, moving products, and changing inscriptions.

Our approach is pragmatic: We use the method that works most reliably in your system. This can be a classic decoder, deep OCR, a hybrid workflow, or markerless identification.

Conclusion: Reliable identification requires more than just a good decoder

Reliable identification results from visible marking, suitable resolution, controlled lighting, the appropriate algorithm, and clear process assignment. Read content, print quality, and technical validity are three different questions—a robust system answers all three.

Classical methods remain fast and transparent for defined codes and fonts. Deep OCR expands the possibilities with changing fonts, positions, and difficult print quality. Plausibility rules and database comparisons ultimately turn the result into a reliable decision.

Would you like to reliably read and inspect codes or plain text?

Send us sample images or components along with details on cycle time, markings, and the desired inspection. We will evaluate feasibility and develop a suitable identification concept.

FAQ on OCR & Identification

What is the difference between OCR and OCV?

OCR first reads unknown text. OCV compares an inscription with an already known target content and additionally checks for completeness or quality.

What is deep OCR?

Deep OCR uses neural networks to locate and recognize text. It is particularly well-suited for varying fonts, orientations, and difficult backgrounds.

Is a readable code automatically a good code?

No. A decoder can still read a damaged code using its error correction capabilities. A quality check evaluates whether the code remains reliably readable even under standardized or subsequent conditions.

What kind of lighting is suitable for laser-marked codes on metal?

That depends on the surface and the marking. Darkfield, coaxial, or diffuse lighting are frequently tested. The optimal geometry is determined using real components.

Can products be identified without a barcode?

Yes. Markerless methods can use natural surface and structural features as an individual image signature. Feasibility depends on the distinguishability and reproducibility of these features.

Your idea — our solution

Challenge us!

We are happy to provide you a free consultation on any type of inquiry, no matter how unusual it may be.

Call us at +49 89 125094350, or send us your requirements directly by email. Alternatively, you can use the button in the menu bar to book an appointment directly for a free initial consultation.