Hi,
A couple of more things to think about with the pinhole forming a
image discussion.
How small does a pinhole have to be to form an image.
I think a pinhole is what people designing optics call a "stop".
If a real image ( in the optical sense of real vs virtual) is formed by
a pinhole, one should be able to a converging lens to focus that image
onto a screen. Now with a pinhole you have a huge depth of field with
this arrangement, but I am sure that if you set this up, you can show
that from a known focal length and measured image distance, one will
find the object focused by the lens is before the pinhole and not the
"image" formed by the pinhole.
An alternative way to think about this is to start with a lens focusing
light from an object onto a screen. Place a variable aperture in front
of the lens and slowly close aperture until there is only a pinhole.
The change to the image formed by the lens is a decrease in intensity
and an increase in depth of field.