Photodiode
First thing needed is a sensor, capable of seeing the shades in the faint light of pinhole's projection.
A photodiode should be good enough.
It's a simple semiconductor thingie that converts light or similar waves into electricity. Solar panels are big photodiodes, for example.
The smaller the photodiode is, the higher the resolution is.
The bigger the photodiode is, the lower the noise is.
It's your choice.
i.e. here is one with 7.5 mm^2 sensor:
And this is with 1 mm^2 sensor:
Photodiodes i got so far
Silicon ones, 300nm-1000nm.
Green photodiode, BPW21r, too much capacitance:
NIR photodiode, BPW41n, nice one:
All visible light photodiode, BPW34, very sensitive, easily covered to reduce size:
Getting InGaAs or InAs for lower bands wasn't easy - they are considered dual-use devices, and are under export control for international shipping.
InAs photodiode, made by Ioffe institute in St. Petersburg. Peak sensitivity at 3400nm.
Amplifier
But how do you read a value off it?
Like what Arduino page proposes?
With such a set up you will indeed be able to tell night from day, but not much else.
More practical solution would be a transimpedance amplifier.
This thingie converts the photocurrent from the diode into voltage for Arduino or other ADC to read.
With 50 MOhm resistor you would indeed be able to read off a faint image in the direct sunlight:
To get better sensitivity it will take bigger resistors:
But gigaohm resistors mean picoAmpere level currents being amplified. And that opens a whole can of worms. To be solved down text.
Mechanics on the next page