CAM_ACTIVE_AREA for SD4000 (RAW/DNG) - page 2 - General Discussion and Assistance - CHDK Forum  

CAM_ACTIVE_AREA for SD4000 (RAW/DNG)

  • 22 Replies
  • 8344 Views
*

Offline Lebeau

  • ***
  • 187
Re: CAM_ACTIVE_AREA
« Reply #10 on: 18 / February / 2011, 20:16:09 »
Advertisements
That means after trying these values in camera.h
Code: [Select]
   #define CAM_RAW_ROWPIX             3816
    #define CAM_RAW_ROWS                2784
    // cropping
    #define CAM_JPEG_WIDTH  3648
    #define CAM_JPEG_HEIGHT 2736
    #define CAM_ACTIVE_AREA_X1 116
    #define CAM_ACTIVE_AREA_Y1 14
    #define CAM_ACTIVE_AREA_X2 3788
    #define CAM_ACTIVE_AREA_Y2 2766

You still have black border ?

Note: 2x2 CFA means that your sensor have RGGB CFA (RED, GREEN, GREEN, BLUE dispose in 2x2 matrix) then:
first line is       RGRGRGRGRGRG...
second line is: GBGBGBGBGBGB...
third line is:     RGRGRGRG...
and so on   ...
« Last Edit: 18 / February / 2011, 20:21:56 by Lebeau »

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: CAM_ACTIVE_AREA
« Reply #11 on: 18 / February / 2011, 20:41:47 »
You still have black border ?
...compiling... testing right now...

Note: 2x2 CFA means that your sensor have RGGB CFA (RED, GREEN, GREEN, BLUE dispose in 2x2 matrix) then:
first line is       RGRGRGRGRGRG...
second line is: GBGBGBGBGBGB...
third line is:     RGRGRGRG...
and so on   ...
I see! This is:
Code: [Select]
#define cam_CFAPattern 0x02010100 // Red  Green  Green  Blue
The result is attached. I get dark frame with left 4px, top 9px and right 4px.
« Last Edit: 18 / February / 2011, 21:02:26 by pixeldoc2000 »

*

Offline Lebeau

  • ***
  • 187
Re: CAM_ACTIVE_AREA
« Reply #12 on: 18 / February / 2011, 21:06:24 »
That means if you have odd numbers you will misalign CFA pattern.


Look at Bayer filter in that page
http://en.wikipedia.org/wiki/Color_filter_array

Each bayer cell will become a pixel when demosaic
http://en.wikipedia.org/wiki/Demosaicing

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: CAM_ACTIVE_AREA
« Reply #13 on: 18 / February / 2011, 21:38:41 »
Thanx for the infos about CFA / Bayer.

That means if you have odd numbers you will misalign CFA pattern.
Now using even value for CAM_ACTIVE_AREA_Y2:
Code: [Select]
   #define CAM_ACTIVE_AREA_Y2          2764
Dark Frame is not visible.
« Last Edit: 18 / February / 2011, 21:43:32 by pixeldoc2000 »


Re: CAM_ACTIVE_AREA
« Reply #14 on: 20 / February / 2011, 06:03:25 »
>The green border mark the actual "good" pixel without the darker pixel (Dark Frame) around the "active" >area.
>AFAIK badpixel generation also use CAM_ACTIVE_AREA.

this dark frame around, have this something todo with darkframe subtraction ?
Ixus 1000 HS

*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: CAM_ACTIVE_AREA
« Reply #15 on: 01 / March / 2011, 19:05:36 »
this dark frame around, have this something todo with darkframe subtraction ?
Actually a very good question. I would like to know myself...

*

Offline Lebeau

  • ***
  • 187
Re: CAM_ACTIVE_AREA
« Reply #16 on: 01 / March / 2011, 21:45:35 »

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: CAM_ACTIVE_AREA
« Reply #17 on: 03 / March / 2011, 12:59:26 »
this dark frame around, have this something todo with darkframe subtraction ?
Actually a very good question. I would like to know myself...
No.

In "dark frame reduction" the word frame is used in the same context as in "25 frames per second" in video files. So you take one or more photos (frames) and a dark photo (a dark frame) and subtraction will get rid of some noise.

In discussion related to RAW active area, the word frame may be used similarly to the frame around a painting on a wall i.e. to describe the shape of the inactive (apparently darker for some reason) area around the active area that ends up in JPEGs.


*

Offline pixeldoc2000

  • ****
  • 356
  • IXUS900Ti 1.00C, IXUS300HS 1.00D
    • pixel::doc homebase
Re: CAM_ACTIVE_AREA for SD4000 (RAW/DNG)
« Reply #18 on: 05 / March / 2011, 20:48:13 »
In discussion related to RAW active area, the word frame may be used similarly to the frame around a painting on a wall i.e. to describe the shape of the inactive (apparently darker for some reason) area around the active area that ends up in JPEGs.
Thanks for clarification.

I've updated my figure. Now the question is if "official" CHDK DNG should include Dark Frame or not (like my figure) ?
I think DNG should not include Dark Frame.
« Last Edit: 07 / March / 2011, 17:44:17 by pixeldoc2000 »

*

Offline Lebeau

  • ***
  • 187
Re: CAM_ACTIVE_AREA for SD4000 (RAW/DNG)
« Reply #19 on: 06 / March / 2011, 17:31:18 »
1) DNG format have provision to pinpoint active area
2) The dark frame could be used by other software
3) Writing the raw data is faster when including all the sensor area :)

 

Related Topics