It was the 10th-century Arab physicist, astronomer and mathematician, Ibn al-Haytham (Alhazen), who published this idea in the Book of Optics in 1021 AD. He also invented the first pinhole camera after noticing the way light was streaming through a hole in a window shutter.He improved on the camera after realizing that the smaller the pinhole, the sharper the image (though the less light). He designed the first camera obscura (Lat. Dark chamber). As a side benefit of his invention, he was credited with being first man to shift physics from a philosophical to an experimental basis
No he did not, this Arab was no scientist, just like the rest of "them", he was using a Greek invention that had its instructions translated into Arabic! The Greeks invented the pinhole camera!