As I occasionally see the opinion (in this forum and elsewhere) that RAW images are always superior to JPG images, I want to clarify a few issues here. Generally, digital photographs are affected by different types of noise which ultimately have relevance for using them for 3D modelling.
Sensor noise is caused by random fluctuations in the reaction of each sensor pixel to a given amount of photons. Thermal noise is responsible for a good part of the total sensor noise, so in theory cooling the sensor would help. Besides this usually not being feasible, my guess would be that we could at best reduce sensor noise by a few per cent within the range of temperatures in which our cameras are working. Increasing the sensitivity of the sensor (i.e., higher ISO number) means that sensor output for a given number of photons will be higher. Background noise remaining more or less equal, this of course means that this will reduce the signal to noise ratio (SNR).
Quantisation noise is caused by the mapping of an analog signal onto a digital range of values or by the mapping of a larger onto a smaller digital range of values. Primary quantisation in digital consumer cameras is usually 10 or 12 bit which means that the minimum brightness difference which can be detected (the least significant bit, LSB) is 1/1024 or 1/4096 of the recorded brighness range. The noise we see in a raw image is a combination of sensor noise and primary quantisation noise. Primary quantisation is usually not a big source of noise; it is much smaller then sensor noise. However, when the raw 10 or 12 bit data are re-mapped onto the 8 bit (values 0 to 255) scale used in JPG, there are again quanitisation errors. Their relative importance also depends on whether you are looking at darker or brighter areas of an image (or underexposed/well-exposed images): a change in the LSB in a dark part of an image (let’s say, average value of 10) is equivalent to a 10% change in brightness while a change in the LSB in a medium-bright area of an image (let’s say, average value of 127) is equivalent to less then 1% change in brigthness. Being able to detect small changes in brightness is of course important to be able to detect subtle features in an image (be it visually or by an algorithm).
When the resulting image with 8 bit colour depth is saved as a JPG by the camera, additional noise (or better, artefacts) are introduced, because JPG uses a lossy data compression. This can be best appreciated when splitting a colour JPG into hue, saturation and lightness (HSL) or hue, saturation and value (HSV) channels: the lightness or value channels look quite intact unless you use really strong JPG compression settings, but artefacts can often easily be seen in the hue and saturation channels. [At this point, it would be interesting to find out whether PhotoScan works with the RGB channels, with lightness or something else.]
In consumer cameras, sensor noise is often very noticable when looking at a raw image at full zoom. And because most consumers want to see nice clear pictures without a lot of noise, in-camera noise reduction is performed before converting the raw images to 8 bit colour depth JPG files. Depending on how much noise is produced by a given sensor, noise reduction will usually be more or less severe. I compared the low-cost Canon A3000IS with the more pricey Canon G12, and found that the raw images saved by the A3000IS had much more sensor noise than the raw images saved by the G12 and that the noise reduction in the A3000IS was much more severe than in the G12. Of course, noise reduction also removes image detail. Therefore, even with the same JPG compression strength a A3000IS JPG of the same object would be a smaller file than a G12 JPG (both are 10 MPIX cameras).
Now, what does all this tell us about using RAW or JPG in PhotoScan?
(a) The lowest possible ISO value should be used to reduce sensor noise.
(b) Underexposure and dark areas in images should be avoided because sensitivity to subtle brightness differences (and, as a result, feature detection) in dark areas is poor.
(c) RAW images suffer much less from quantisation noise and not at all from loss of image detail due to noise removal and compression artefacts, but they contain all sensor noise (which can be severe). JPG images, on the other hand, often have less (visible) noise than raw images because of the in-camera noise removal and are much smaller files which are processed much faster. If your camera has very low sensor noise, RAW will be the better choice. For many consumer cameras, JPG may be the better choice unless you are able to apply a better sensor noise removal than the camera itself.
(d) In the end, it all comes down to SNR. You will always have some noise, and you should not only try to reduce noise but also to enhance the signal: a good lens, perfect focus, and an illumination which brings out as much fine detail as possible while not producing underexposed areas. In many cases, more photos taken closer to the subject will also help a lot.
Working on these points improves PhotoScan results much more than simply using RAW instead of JPG.