Hello Andrey, On Fri, 29 Jan 2010 17:57:37 -0700, Andrey Filippov <[email protected]> wrote:
>> Am I right assuming that while no information loss occurs due to >> quantization, there still some (insignificant?) loss due to DCT/other >> parts >> of compression process? > > There is enough precision in DCT, no color conversion in mono/jp4 modes, so > no other sources of errors. The restored images differ less than 1 count. Ok, great - thanks! [detailed explanation of current gamma/black level behavior skipped] Thank you very much for this explanation! It's likely we'll be using JPEGs from camera (not RAW) indeed either via the path you suggest (getting JPEGs with applied gamma and reversing it on host) or just setting gamma to 1.0 (and loosing those 4 bits) if it appears they're not significant enough for our purposes, so my interest in RAW is mainly to understand current JPEG behavior/difference with RAW and being able to compare things to "original" image to make sure everything goes as it should. > 2. However, resulting RAW and JPEG images have considerably different >> brightness/contrast, suggesting that some parts of processing are done >> differently to RAW than JPEG? >> > Do you have camera set in monochrome (not color) mode? Autoexposure/balance > turned off? Yes, also see below. >> 3. I've tried to switch gamma correction off by changing GTAB_X values to >> 0x640400 (as far as I understood parameter description and gamma curve >> graph >> produced by "Gamma Curve Drawing Example" that should be the correct way >> to >> disable gamma + black level corrections?), but the difference between >> RAW/JPEG still remains. > > Can you provide some example images? Last time I was testing raw it did > match the compressed output http://www.ndl.kiev.ua/downloads/elphel/image.jpg http://www.ndl.kiev.ua/downloads/elphel/image_8.raw http://www.ndl.kiev.ua/downloads/elphel/image_16.raw System information (as far as I see it includes full parameters dump) is here: http://www.ndl.kiev.ua/downloads/elphel/params.txt Gamma is set to 1.0 and black level to zero in parameters, that's why image_8.raw completely matches image_16.raw after normalization. However, JPEG image image.jpg clearly differs from both of RAW images. I've tried to perform the same experiment with "factory default" settings (only set WB off, auto exposure off, color to 0), but result is similar. >> 4. When trying to use 16-bit RAW, gamma correction seems to be not >> applied >> anymore, but max pixel value is limited to exactly 19128 (even for those >> pixels that are clearly fully saturated) - have no idea what this value >> means and why it stops there ... > > Yes, in 2-byte mode gamma is not needed as ADC provides less than 16 bits. > Why did you get 19128 - I'm not sure, data is limited by maximal positive > short (with 12-bit ADC it is actually0x7ff8), I need to look at the other > parameters settings in your case. Disregard that, "stupid user detected" - sorry for misleading info :-( I've got this number looking at pixel values in Photoshop, but it reports 19128 values in RGB mode for channels when the image is gray, while the actual values are somewhere at 16384, as they should be (probably it tries to bee too smart and converts gray values to RGB from linear profile to sRGB, or whatever - haven't figured out it exactly), so everything works as it should here. -- Good luck! Alexander _______________________________________________ Support-list mailing list [email protected] http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com
