A pinhole camera is a simple camera without a lens but with a tiny aperture, a pinhole – effectively a light-proof box with a small hole in one side. Light from a scene passes through the aperture and projects an inverted image on the opposite side of the box, which is known as the camera obscura effect. It is based on property of light
The image of a pinhole camera may be projected onto a translucent screen for real-time viewing
Up to a certain point, the smaller the hole, the sharper the image, but the dimmer the projected image. Optimally, the size of the aperture should be 1/100 or less of the distance between it and the projected image.
Within limits, a smaller pinhole (with a thinner surface that the hole goes through) will result in sharper image resolution because the projected circle of confusion at the image plane is practically the same size as the pinhole. An extremely small hole, however, can produce significant diffraction effects and a less clear image due to the wave properties of light.
Additionally, vignetting occurs as the diameter of the hole approaches the thickness of the material in which it is punched, because the sides of the hole obstruct the light entering at anything other than 90 degrees.