There are many problems with the common image file types which exist today. The libjlm library exists to provide new image types which overcome these problems. This page serves as a portal to distribute the libjlm library as well as programs which use this imaging technology.
The reason you can not just multiply pixel values by a constant in order to lighten an image is because pixel values are non-linear in terms of the amount of light they represent. So you cannot multiply a pixel value by 2 in order to make an image twice as bright. The original reason for this may be traced back to the development of the original television sets used sold and consequently the cameras used to record video images. The electron guns of a television respond exponentially to the voltage applied to them. Rather than correcting this non-linearity in televisions, it was more economical to correct the problem by applying a logarithmic compression to the output of the video cameras. A more detailed description of this series of events in image processing history is described in Professor Steve Mann's textbook Intelligent Image Processing available from John Wiley and Sons.
Coincidentally, the eye (and various other senses of our bodies) perceive intensities logarithmically. This has resulted in sonic intensity being measured in decibels (a logarithmic measure), just to name one well known instance. Perceptually, this means if the sonic intensity of a source is doubled, you will not perceive it as being twice as loud, you will most likely perceive it as being less than half as loud. Similarity, if you double the intensity of a light source, you will not see the light as being twice as bright, but less than twice as bright. Like hearing, your eye sees light logarithmically.
Seeing light logarithmically, (as well as hearing logarithmically, feeling pressure and weight logarithmically, etc.) has a great consequence. The logarithmic compression allows for a greater dynamic range in perception. Because the range compression exists, we may look into a brightly lit scene in strong daylight and see with great detail. We may also look into dim scenes and also see great detail. Some of this is because of gain control applied by pupil expansion and contraction, but much of the phenomenon is because of range compression. This explains why you can look through a window into a bright daylight scene and see detail while also seeing detail in the room you are in.
Logarithmic compression of pixels results in a greater dynamic range possible in the representation of a particular image file given a limited number of bits (such as 8-bit image files). However, the range compression means that linear processing on the file is no longer possible (with good results) unless the range compression is undone. Many of todays digital cameras allow for output of raw data as well as traditional file types (such as jpeg). However, these raw data files are usually proprietary, and quite large. On top of this, the data is may be 12-bit rather than 8-bit data, which means traditional libraries such as jpeg will not deal with the data.
The idea of libjlm is to store the data in double-precision floating point values normalized between the values 0 and 1 with no range compression. This allows for incredible dynamic range, and linear processing. For example to properly lighten an image, all that is needed is to multiply the values of the file by a desired scalar constant k. If we were to use k=2, the effect would be an image which was identical to the original image, but having the exposure time of the camera doubled.
The downside of storing images in this format (known as a PLM, Portable Light Map) is that the image sizes are larger than even the raw data from the camera. Therefore, a file compression is desired on these non-range compressed files (I apologize for the two different uses of compression). The JLM was developed as a solution to this. The JLM is in many ways a copy of JPEG compression, but file compresses PLM files rather than previous 8-bit range-compressed image files.
The files and the project page are accessible HERE
The project summary page is also accessible through: http://sf.net/projects/libjlm
JLMview: | a Mac OS X application which can load, view and save PLM, PLM and other image files. The program is able to retroactively change the exposure time of an image (properly lighten and darken). The source code (an Xcode project) is also available from the files page of the libjlm project, which you can get you can get to from HERE. If you just want a disk image with the executable, you can download that HERE. |