[Elphel-support] questions from elphel_dng.c

support-list support-list at support.elphel.com
Sun Oct 14 01:18:35 PDT 2012


Venkat,

I'm not the author of that program, but yes - it seems to convert the file and save it as Tiff. I'm not sure if it process metadata needed for the correct convertion (our ImageJ plugin un-applies all processing between the raw pixels and the camera output (i.e. sensor internal analog gain for each channel).

Andrey

---- On Sun, 14 Oct 2012 00:20:24 -0700 Venkat Subbiah<venkat at magnasinc.com> wrote ---- 

 > In elphel_dng.c file I see a reference to a gamma file, what is the purpose of this file? 
 >   if ((gam = atof(argv[1])) <= 0) {
 >     fprintf (stderr, "Gamma must be positive!\n");
 >      return 1;
 >   }
 > 
 > 
 > ----------------------------------------------------------------------------------------------
 > 
 > 
 > First want to figure out how I can take this data and write out 
 >   for (row=0; row < cinfo.image_height; row += 16) {
 >     for (r=0; r < 16; )
 >       r += jpeg_read_scanlines (&cinfo, buf+r, 16-r);
 >     for (r=0; r < 16; r++) {
 >       for (col=0; col < cinfo.image_width; col += 16)
 >  	for (c=0; c < 16; c++)
 > 	  out[col+c] = buf[ROT(r)][col+ROT(c)];
 >       TIFFWriteScanline (tif, out, row+r, 0);
 >      }
 >   }
 > 
 > 
 > 
 > 
 > I am new to the jpeg API, but In this loop looks like it takes the data from the JP4 file and writes it out as a tiff file.
 > 
 > 
 > I would like to figure out how I could write this out as just sequence of bytes (or 16-bit words) 
 >  corresponding to (width+4)*(height+4), where width and height are dimensions, rather than converting it to tiff file.
 > Would this data be be exactly similar to the data from the raw camera file?
 >  _______________________________________________ 
 > Support-list mailing list 
 > Support-list at support.elphel.com 
 > http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com 
 > 





More information about the Support-list mailing list