# How big would a QR code have to be on my roof for a satellite to be able to scan it given today's allowable resolution?

Say, using the Planet Labs satellites

Thank you

• – uhoh Jan 26 at 15:13
• Commercial imagery offers 0.5m resolution (in practice you might get slightly better). Smallest QR code is 17 pixels on a side, so 8.5m back-of-the-envelope. – antlersoft Jan 26 at 16:34
• there your sample frequency matched your signal @antlersoft, which is not a comfortable place to be. So you're looking at about a square chain. – user20636 Jan 26 at 20:17
• Small QR codes have 21 x 21 Elements, the largest 177 x 177. From 330 bit to 23,648 bits. So the distance for small and large QR codes will be very different. – Uwe Jan 26 at 21:52
• Obligatory "We could tell you but then we'd have to kill you." The Lacrosse -series of spysats had pretty decent resolution & I'd be astonished if modern sats not only have equivalent raw resolution but also take advantage of phase and scan techniques to do genuine enhancement. – Carl Witthoft Jan 27 at 15:30

How big would a QR code have to be on my roof for a satellite to be able to scan it given today's allowable resolution?

Say, using the Planet Labs satellites

This is a supplementary answer. I've simulated 6 meter "QR" pixels as viewed from space with a 9 cm aperture (out the end of a 3U Dove cubesat) at 450, 550 and 650 nm wavelengths, rotated at 45 degrees and then sampled with 3 meter pixels.

It's a scrappy and fragile script but it does the job.

The image supports the main conclusion in the other answer that this is probably the minimum size for some reliability of seeing it with a Dove.

The script is suboptimal, I was lazy and used PIL to rotate, I could have interpolated with scipy.ndimage.map_coordinates, and I could have "fuzzified" with scipy.ndimage.gaussian_filter instead of a fancy Airy disk.

The hues in the final image are due to wavelength dependent diffraction limits of the aperture, the approximately $$1.22 \lambda / D$$ variation of angular resolution with wavelength to aperture ratio.

import numpy as np
import matplotlib.pyplot as plt
import itertools
from PIL import Image
from scipy import special as spe
from scipy.ndimage import convolve

N = 5*2

data = ('111111' + '110001' + '111011' +
'000011' + '010101' + '111111')
data = np.array([int(x) for x in data]).reshape((6, 6))
data = np.pad(data, ((6, 6), (6, 6)))

img = np.zeros((N*18, N*18, 3))

for i, j in itertools.product(np.arange(18), repeat=2):
img[N*i:N*(i+1), N*j:N*(j+1)] = data[i, j]

pixsize = 6 # meters
scale = pixsize/N
extent = 9*N * scale * np.array([-1, 1, -1, 1])

R = 575 * 1000. # meters distance
x = 4*N * scale * np.linspace(-1, 1, 8*N)
X, Y = np.meshgrid(x, x)
q = np.sqrt(X**2 + Y**2)
wavelengths = 1E-09 * np.array([650, 550, 450])

a = 0.045 # radius of aperture in meters (looking out end of a 3U cubesat)
x = (2 * np.pi * a / wavelengths) * (q[..., None] / R)

# https://en.wikipedia.org/wiki/Airy_disk
airy = (2 * spe.j1(x) / x)**2
areas = airy.sum(axis=0).sum(axis=0)
airy /= areas

new = [convolve(img[..., i], airy[..., i]) for i in range(3)]
newarray = np.stack(new, axis=2)
newarray = np.uint8(255 * newarray/newarray.max())

newimg = Image.fromarray(newarray)
newimg45 = newimg.rotate(45)
newimg45.show()
n45 = np.array(list(newimg45.getdata())).reshape(18*2, N>>1, 18*2, N>>1, 3)
n45 = np.uint8(n45.sum(axis=(1, 3)) / (N>>1)**2)

if True:
plt.figure()
plt.subplot(1, 2, 1)
plt.imshow(img, extent=extent)
plt.title('6 meter pixels on Earth')
plt.xlabel('meters')
plt.subplot(1, 2, 2)
plt.imshow(n45, extent=extent)
plt.title('9cm aperture at 575 km, 3 m pixels')
plt.xlabel('meters')
plt.show()


How big would a QR code have to be on my roof for a satellite to be able to scan it given today's allowable resolution?

Say, using the Planet Labs satellites

tl;dr: using 6x6 "augmented reality tag" discussed in @CamilleGoudeseune's answer like the one on the Curiosity rover and 6 meter pixels (twice minimum resolution to allow for arbitrary translation and rotation) your pattern should be 36 x 36 meters to have a good change of being spotted and recovered from an image from a PlanetLabs Dove.

I would remove red and infrared reflectivity from the bright areas and encode only in the shorter wavelengths, since the Doves do have four color channels are (probably) diffraction limited and longer wavelengths may then have worse resolution.

Try to excite only the shorter wavelength bands of your targeted spacecraft to make them "pop-out" to casual viewers, or only look at those wavelengths in the final data product if you are looking for yourself.

At https://www.planet.com/products/planet-imagery/ the most numerous satellites or "Doves" provide data for the PLANETSCOPE data product. The satellites are said to have 3.7 meter resolution and the data product have a resampled pixel size of 3 meters. See also @djr's answer to Are these images from Planet Labs? Are the images publicly available?

If you were incredibly lucky to have the pixels lined up with your QR pattern both translationally and rotationally, they could theoretically be 3 meters.

Practically though, given arbitrary translation and rotation of your pattern within the field of the image, you should have them a factor of at least 2 if not 3 larger than this.

@Uwe reminds us that a small QR code would still be pretty big. There are 11 x 11 Micro QR codes and spacefolks have used even smaller pixel numbers for alternatives to QR codes with even fewer pixels.