#define CAM_ACTIVE_AREA_Y1 11 #define CAM_ACTIVE_AREA_Y2 3059
#undef CAM_ACTIVE_AREA_X1 // Define usable area of the sensor - needs to be divisible by 4 - calibrate using a CHDK RAW image converted with rawconvert.exe (eg :rawconvert -12to8 -pgm -w=4480 -h=3348 photo.crw photo.pgm) #undef CAM_ACTIVE_AREA_Y1 // Define usable area of the sensor - needs to be divisible by 2 - " #undef CAM_ACTIVE_AREA_X2 // Define usable area of the sensor - needs to be divisible by 4 - " #undef CAM_ACTIVE_AREA_Y2 // Define usable area of the sensor - needs to be divisible by 2 = "
From the sample c_joerg sent me, I noticed the s110 has Code: [Select] #define CAM_ACTIVE_AREA_Y1 11 #define CAM_ACTIVE_AREA_Y2 3059This is correct in terms of which pixels have data in them, but camera.h saysCode: [Select] #undef CAM_ACTIVE_AREA_X1 // Define usable area of the sensor - needs to be divisible by 4 - calibrate using a CHDK RAW image converted with rawconvert.exe (eg :rawconvert -12to8 -pgm -w=4480 -h=3348 photo.crw photo.pgm) #undef CAM_ACTIVE_AREA_Y1 // Define usable area of the sensor - needs to be divisible by 2 - " #undef CAM_ACTIVE_AREA_X2 // Define usable area of the sensor - needs to be divisible by 4 - " #undef CAM_ACTIVE_AREA_Y2 // Define usable area of the sensor - needs to be divisible by 2 = "The rawop code assumes the the values are even, and IIRC some of the other code depends on this as well. It is not a requirement of the DNG spec, but it makes our code simpler.I don't recall where the divisible by 4 requirement comes from, quite a few ports seem to violate it. If anyone can remind me, it would be appreciated.From a quick look s110 is the only port that uses and odd value.Unless there are objections, I'll make s110 use 12, 3058Once this is sorted out I'll add some #error checks to camera.h to make the build fail if the values aren't acceptable. A similar check for jpeg area > active area would be a good idea too.
I've played with this in the past and making the X1 value odd causes Adobe software to screw up the de-bayering unless the CFA is also changed to match.
Started by mattkime Script Writing
Started by sinthemau CHDK Releases
Started by Lebeau General Discussion and Assistance
Started by fx General Help and Assistance on using CHDK stable releases
Started by koshy « 1 2 » General Discussion and Assistance