the sx20 porting thread - page 24 - General Discussion and Assistance - CHDK Forum

the sx20 porting thread

  • 1286 Replies
  • 478622 Views
*

Offline yakabmarci

  • *
  • 16
  • sx20is
Re: the sx20 porting thread
« Reply #230 on: 17 / November / 2009, 03:30:13 »
Advertisements
I think the following values in include\camera.h are not good:

    #define CAM_RAW_ROWPIX              4072
    #define CAM_RAW_ROWS                3036

    #define CAM_ACTIVE_AREA_X1 20
    #define CAM_ACTIVE_AREA_Y1 12
    #define CAM_ACTIVE_AREA_X2 4056
    #define CAM_ACTIVE_AREA_Y2 3038

I've changed these values to:

    #define CAM_RAW_ROWPIX              4080
    #define CAM_RAW_ROWS                3048

    #define CAM_ACTIVE_AREA_X1 24
    #define CAM_ACTIVE_AREA_Y1 12
    #define CAM_ACTIVE_AREA_X2 4080-48
    #define CAM_ACTIVE_AREA_Y2 3048 -24

Now I can open the DNG file with variouos programs (picasa, photoshop, ufraw...)

Shooting in raw mode takes about ~5sec. Is this normal?

*

Offline reyalp

  • ******
  • 14121
Re: the sx20 porting thread
« Reply #231 on: 17 / November / 2009, 03:50:40 »
Now I can open the DNG file with variouos programs (picasa, photoshop, ufraw...)
Ability to open in some program does not indicate the values are correct. http://chdk.setepontos.com/index.php/topic,2361.msg42298.html#msg42298 has some discussion of how to obtain the correct active area values. ROWPIX and ROWS can probably be determined from the firmware dump. (ROWPIX*ROWS*BPP)/8 must equal raw size, so possible values are limited.
Quote
Shooting in raw mode takes about ~5sec. Is this normal?
Raw or DNG ? DNG is quite slow, especially if "raw buffer cached" is not set. Raw is slow too, but not as slow as DNG. 5 sec would be a bit long, unless you are using a very slow card.
Don't forget what the H stands for.

*

Offline yakabmarci

  • *
  • 16
  • sx20is
Re: the sx20 porting thread
« Reply #232 on: 17 / November / 2009, 06:01:56 »
Yes, I've got theese values as you've described. (I didn't just guessed it :) )
Raw shooting is slow for both dng and cdr. It is very possible that it is because of the card (old 512mb card)
I will try it with a never sdhc class 6 card to see if there is any difference.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #233 on: 17 / November / 2009, 06:18:50 »
I think the following values in include\camera.h are not good:

    #define CAM_RAW_ROWPIX              4072
    #define CAM_RAW_ROWS                3036

    #define CAM_ACTIVE_AREA_X1 20
    #define CAM_ACTIVE_AREA_Y1 12
    #define CAM_ACTIVE_AREA_X2 4056
    #define CAM_ACTIVE_AREA_Y2 3038

I've changed these values to:

    #define CAM_RAW_ROWPIX              4080
    #define CAM_RAW_ROWS                3048

    #define CAM_ACTIVE_AREA_X1 24
    #define CAM_ACTIVE_AREA_Y1 12
    #define CAM_ACTIVE_AREA_X2 4080-48
    #define CAM_ACTIVE_AREA_Y2 3048 -24
Ohh, good. Thx. I wasn't sure in these values, i copied from another 12.1 mp camera's settings.
Quote
Now I can open the DNG file with variouos programs (picasa, photoshop, ufraw...)
Wait, is that mean, that you modified the values, can compiled a new binary? (I hope, because a new active developer is a good news. :) )
Quote
Shooting in raw mode takes about ~5sec. Is this normal?
It's ~2 sec for me. (While AF led is lighting) I use 1GB sd card for testing.


*

Offline yakabmarci

  • *
  • 16
  • sx20is
Re: the sx20 porting thread
« Reply #234 on: 17 / November / 2009, 06:41:55 »
yes, I recompiled your sw frame with the new values, I have some free time now, and I've been playing with raw shooting, I have a surprisingly large number of bad pixels (~5000), reported by badpixel.lua, they appear as black pixels in the crw (converted to black n white with rawconvert). Is this normal?

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #235 on: 17 / November / 2009, 12:43:45 »
yes, I recompiled your sw frame with the new values, I have some free time now, and I've been playing with raw shooting
Well, it is good news.
Quote
I have a surprisingly large number of bad pixels (~5000), reported by badpixel.lua, they appear as black pixels in the crw (converted to black n white with rawconvert). Is this normal?
I got 2479 bad pixels with badpixel.lua, i suppose, it is normal from 12,1 million. :)

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #236 on: 17 / November / 2009, 13:41:08 »
I could only test it indoors with poor lighting (currently don't have a working tripod), but this script didn't work for me either. Some cells (always the same ones) keep lighting up red in short intervals while others always stay green. The number of the cells that get triggered can be reduced by increasing the threshold, but at some point (about 120 with this script) there aren't anymore cells that are triggered, even when abruptly moving the camera (which is a very big movement).
It is possible, that the motion detection not works perfectly, but it is works, as i tested again. Try to set very high threshold values, if you get triggered without motion.

Indoor, i tested with 230(!) threshold and light on-off dozen times, with 10-30 sec pauses and it worked for me. It is just still slow for me even with manual focus, etc. I'll optimize for speed later.

Re: the sx20 porting thread
« Reply #237 on: 17 / November / 2009, 15:14:00 »
It's ok for me ^^


*

Offline reyalp

  • ******
  • 14121
Re: the sx20 porting thread
« Reply #238 on: 17 / November / 2009, 17:12:35 »
yes, I recompiled your sw frame with the new values, I have some free time now, and I've been playing with raw shooting, I have a surprisingly large number of bad pixels (~5000), reported by badpixel.lua, they appear as black pixels in the crw (converted to black n white with rawconvert). Is this normal?
Yes, badpixel.lua just detects the pixels that canon sets to 0, rather than blacklevel.

Several thousand is normal. The number may change depending on sensor temp and possibly other factors.
Don't forget what the H stands for.

*

Offline jan

  • *
  • 48
  • PowerShot SX20 IS (100f)
    • cms -db
Re: the sx20 porting thread
« Reply #239 on: 18 / November / 2009, 10:22:31 »
Indoor, i tested with 230(!) threshold and light on-off dozen times, with 10-30 sec pauses and it worked for me. It is just still slow for me even with manual focus, etc. I'll optimize for speed later.

I can confirm that it works (threshold 200) when changing the light from none to normal, but any smaller movement than that is not detected. So the motion detection basically works, but it's not usable for anything.
It does also sometimes work when moving the camera, but only very few cells get triggered and only when moving the camera quickly from a dark place to the computer screen.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal