Pixels don't exist in real life, so pixels and centimeters can't be converted directly, but only in the resolution (dpi). For example, 72 and 300dpi are often used, 72dpi is used for computer monitors and 300dpi is used for photos. Then the conversion between pixels and centimeters is: 72dpi 1 cm = 28.346 pixels, 300 dpi1cm =118.1/pixel.
The history of photos
After centuries of development in chemistry and optics, the invention of pinhole camera provided a good opportunity for the appearance of the first photo in the world. 1826, the French scientist Joseph Nicéphore Niépce took the world's first picture at home, entitled "Scenery outside Legolas".
This photo shows the courtyard and outhouse outside the window upstairs of his house. The shooting method is exposed on the asphalt metal plate in the pinhole camera.