Image Processing a Metal Dot Peen Data Matrix / QR Code

Solution 1:

Lighting is important, and imaging might work better on the side with depressions, because on the other side, raised bumps cast shadows. Try lighting from two sides, or using ring-lighting around the lens.

You might also ink the bumps with a ink-pad, used for rubber stamps, and press on paper to make a print to use for OCR.

After you have taken the best image, adjust contrast, brightness and gamma (or the whole monochrome light curve) with a tool such as the free IrfanView, which runs in native Windows OS or in Linux under wine. The 8bf filter SmartCurve can be added to IrfanView to enable fine adjustments. There are many similar free and commercial image processing tools.

Once you've established optimal settings for OCR results, you can automate batch processing of the images.