SX160is: I get a frame around DNG files

  • 5 Replies
  • 1184 Views
SX160is: I get a frame around DNG files
« on: 30 / March / 2017, 22:06:30 »
Advertisements
If I take a close look at the DNG files I get from the SX160is, there is an ugly fine frame around the image. It looks like the code is grabbing the sensor's border. Sure, the frame can be trimmed in software but it is kind of a pain. Is there any way to set the active sensor area from chdk?

Thanks!
« Last Edit: 30 / March / 2017, 22:12:42 by sequencer »

Re: SX160is: I get a frame around DNG files
« Reply #1 on: 30 / March / 2017, 23:01:08 »
Is there any way to set the active sensor area from chdk?
The active sensor area used for CHDK DNG files is set in the camera's platform_camera.h file in the CHDK source code for that camera.  Changing that  requires recompiling the source. 

Typically, the person doing the CHDK port for a camera picks the sensor active area included in the DNG image.  If it's the first port a person has done, the specific area picked might be a little wider than optimal - like what you are seeing.

If you post a CHDK RAW image for your camera, it should be possible to tune the correct crop factors for the DNG image. I'm not sure how much camera to camera variation there is in that crop factor .. but a few extra pixels on each side are usually not a big deal to anyone but the purists.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 11392
Re: SX160is: I get a frame around DNG files
« Reply #2 on: 31 / March / 2017, 01:27:33 »
You can adjust the default crop in CHDK DNG settings. If you use "JPEG" it, should only include normal image area.

Some programs ignore the default crop and only use the active area. It looks to me like Irfanview is one of them.

Ifranview is a good image viewer, but for anything more than a quick look I'd suggest using a dedicated raw processing program like Lightroom, Raw therapee, darktable etc.
Don't forget what the H stands for.

Re: SX160is: I get a frame around DNG files
« Reply #3 on: 31 / March / 2017, 08:54:31 »
>You can adjust the default crop in CHDK DNG settings.

Good to know.


>I'd suggest using a dedicated raw processing program like >Lightroom, Raw therapee

I saw this the first time in Rawtherapee, just used IrfanView to take a screen shot.

Thanks for the tips guys!







Re: SX160is: I get a frame around DNG files
« Reply #4 on: 31 / March / 2017, 08:55:22 »
You can adjust the default crop in CHDK DNG settings. If you use "JPEG" it, should only include normal image area.
Did a quick search but could not find a good summary of the Full vs Active vs JPEG settings or how that relates to the various definitions in platform_camera.h beyond this.

Code: [Select]
#define CAM_RAW_ROWPIX                  4480   
    #define CAM_RAW_ROWS                    3348
    #define CAM_JPEG_WIDTH                  4416
    #define CAM_JPEG_HEIGHT                 3312
    #define CAM_ACTIVE_AREA_X1              12
    #define CAM_ACTIVE_AREA_Y1              12 
    #define CAM_ACTIVE_AREA_X2              4440
    #define CAM_ACTIVE_AREA_Y2              3334

On my G10 for example (info above), the DNG size information reported by ufraw is the same for the ACTIVE and JPEG settings - the Full setting shows up as slightly larger.
( 4480x3348  vs 4428x3322 vs 4428x3322 )

Took a look at the code but that's more work than I want to do right now if a summary already exisits.

TIA.

edit : some history here : Cropping the sensor for DNG saving
« Last Edit: 31 / March / 2017, 09:52:09 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 11392
Re: SX160is: I get a frame around DNG files
« Reply #5 on: 31 / March / 2017, 13:12:32 »
I saw this the first time in Rawtherapee, just used IrfanView to take a screen shot.

Thanks for the tips guys!
It looks to me like Raw Therapee uses the active area as well. I thought it had an option, but I don't see it. However, you could easily make a profile that starts with the crop set to the normal image area.

If you use a flat field, that can significantly reduce the border effect.

Note that the presence or size of the dark border may depend on the zoom level.

In the CHDK code, my preference is for the active area to include everything that contains recognizable image data, because you can salvage the darker parts in a pinch, and most programs don't make pixels outside the active area accessible at all without editing the exif.
Don't forget what the H stands for.

 

Related Topics