Using MTF, how can I discover the smallest detail a smartphone camera can resolve for use in generating QR codes?

Since most camera lens combinations have variable MTF across the field (that is, the system can usually resolve finer details in the center of the frame than on the edges and in the corners), there is no single “magic number”, even for a specific camera/lens combo.

Then there’s the variability introduced by low light/high ISO that reduces the amount of detail that the same system can resolve compared to when that system is used under more ideal conditions.

There’s also the fact that most scans will not be made with the phone perfectly aligned with the QR code. So the minimum theoretically possible size under “perfect” conditions with the target framed perfectly level by the phone and perfectly perpendicular to the phone’s sensor won’t work if the phone is tilted and/or rotated several degrees with respect to the target QR code.

In the end you have to “aim low” if you want to create QR codes that can be compatible with a large majority of phones.

As for the QR codes themselves, the major variables are:

  • Scanning distance. A QR code on a billboard that will be scanned from 40-50 feet needs to be quite a bit larger than a QR code on a business card that will be scanned from about 12 inches.
  • The amount of data encoded. The more data you want to encode, the more discrete squares called data units arranged in rows and columns your QR code will need, and the larger it must be for each row and column to be the same size. A 25×25 QR code with 625 data units can be smaller than a 125×125 QR code with 2132 data units.
  • The design features of your QR code. If you want to make it something other than a plain B&W “bar code” looking QR code, you need to include plenty of error correction (which increases the total data needed to communicate the same amount of information). QR codes that have colors or are embedded in an image attract more scans than plain B&W QR codes do.
  • Printing considerations. Since printers often scale images, using vector graphics is usually best for QR codes. There also needs to be good contrast between the QR code and the background upon which it is printed.

There are a variety of resources on the net that address this. Here are four that are helpful:

QR Code Minimum Size: Calculate ideal size for your use case
What Size Should a QR Code Be in Relation to Scan Distance?
What is the ideal print size of a QR Code?
QR Code Minimum Size: How Small Can a QR Code Be?