Changeset 1410 for trunk


Ignore:
Timestamp:
11/12/11 21:48:56 (19 months ago)
Author:
philmoz
Message:

Add optional lens info to DNG files. To have this included define CAM_DNG_LENS_INFO in platform_camera.h (see the comments in camera.h for the data format).
Enabled for G12, SX30 and IXUS310.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/dng.c

    r1326 r1410  
    1212const int cam_ActiveArea[]={CAM_ACTIVE_AREA_Y1, CAM_ACTIVE_AREA_X1, CAM_ACTIVE_AREA_Y2, CAM_ACTIVE_AREA_X2}; 
    1313const int cam_DefaultCropOrigin[]={CAM_DEFAULT_CROP_ORIGIN_W,CAM_DEFAULT_CROP_ORIGIN_H}; 
     14#if defined(CAM_DNG_LENS_INFO) 
     15const int cam_lensinfo[] = CAM_DNG_LENS_INFO; 
     16#endif 
    1417#if defined(CAM_DNG_EXPOSURE_BIAS) 
    1518const int cam_BaselineExposure[]={CAM_DNG_EXPOSURE_BIAS}; 
     
    6467 {0xC62C, T_RATIONAL,  1,  (int)cam_BaselineSharpness}, 
    6568 {0xC62E, T_RATIONAL,  1,  (int)cam_LinearResponseLimit}, 
     69#if defined(CAM_DNG_LENS_INFO) 
     70 {0xC630, T_RATIONAL,  4,  (int)cam_lensinfo}, 
     71#endif 
    6672 {0xC65A, T_SHORT,     1,  cam_CalibrationIlluminant1},  
    6773 {0} 
  • trunk/include/camera.h

    r1365 r1410  
    148148                                                // This reduces the file size by approx 45% 
    149149 
     150#undef  CAM_DNG_LENS_INFO                       // Define this to include camera lens information in DNG files 
     151                                                // Value should be an array of 4 DNG 'RATIONAL' values specifying 
     152                                                //   - min focal length in mm 
     153                                                //   - max focal length in mm 
     154                                                //   - max aperture at min focal length 
     155                                                //   - max aperture at max focal length 
     156                                                // E.G - SX30 = { 43,10, 1505,10, 27,10, 58,10 } 
     157                                                //            = 4.3 - 150.5mm, f/2.7 - f.5.8 
     158                                                // Each pair of integers is one 'RATIONAL' value (numerator,denominator) 
     159 
    150160#undef  PARAM_CAMERA_NAME                        // parameter number for GetParameterData to get camera name 
    151161 
  • trunk/platform/g12/platform_camera.h

    r1392 r1410  
    7575        #define CAM_DNG_EXPOSURE_BIAS           0,1             // Specify DNG exposure bias value to 0 (to override default of -0.5 in the dng.c code) 
    7676 
    77         //need fixing ***************************************************** 
     77    #define     CAM_DNG_LENS_INFO           { 61,10, 305,10, 28,10, 45,10 }     // See comments in camera.h 
     78 
    7879    #define cam_CalibrationIlluminant1  17              // Standard Light A 
    79 /* 
    80     #define CAM_COLORMATRIX1                               \ 
    81       14134, 100000, -5576, 100000, -1527, 100000, \ 
    82       -1991, 100000, 10719, 100000,  1273, 100000, \ 
    83       -1158, 100000,  1929, 100000,  3581, 100000 
    84 */ 
    8580    // From dcraw 
    8681    #define CAM_COLORMATRIX1                       \ 
  • trunk/platform/ixus310_elph500hs/platform_camera.h

    r1381 r1410  
    8888        #define CAM_DNG_EXPOSURE_BIAS           0,1             // Specify DNG exposure bias value to 0 (to override default of -0.5 in the dng.c code) 
    8989 
     90    #define     CAM_DNG_LENS_INFO           { 43,10, 188,10, 20,10, 58,10 }     // See comments in camera.h 
     91 
    9092        //need fixing ***************************************************** 
    9193/* 
  • trunk/platform/sx30/platform_camera.h

    r1352 r1410  
    5353 
    5454        #define CAM_DNG_EXPOSURE_BIAS           0,1             // Specify DNG exposure bias value to 0 (to override default of -0.5 in the dng.c code) 
     55 
     56    #define     CAM_DNG_LENS_INFO           { 43,10, 1505,10, 27,10, 58,10 }    // See comments in camera.h 
    5557 
    5658        // TODO - Still needs work  
Note: See TracChangeset for help on using the changeset viewer.