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

the sx20 porting thread

  • 1279 Replies
  • 259893 Views
*

Offline jan

  • *
  • 48
  • PowerShot SX20 IS (100f)
    • cms -db
Re: the sx20 porting thread
« Reply #220 on: 14 / November / 2009, 07:02:28 »
Advertisements
I've the same result with the md script posted by you: Either there is no reaction to motion or it takes photos when there is no motion.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #221 on: 14 / November / 2009, 07:13:08 »
I didn't modify kbd_get_autoclicked_key() or anything, but I think you said you are using the SX10 version for the keyboard, so maybe that's where the problem is?
Whenever there is a problem, debug the offending function, see why it doesn't get triggered as expected.
Well, i see, that "osd_to_draw" must be true, to draw osd.

1. First of all, i tried to set osd_to_draw = 1; and osd was drawn always, with high flickering, i think it because the osd was drawn in every "frame".

2. Second, i tried to set osd_to_draw = 1; at the end of gui_osd_draw() function (where the original line was osd_to_draw = 0;). Power on the camera and the osd was not drawn. Playing a little bit, clicking button, etc., once the osd become to draw, and keeps draw always (with flickering) as expected. That's why i think, the kbd_get_autoclicked_key() just rarely gives other value than 0.

3. Let's see kbd_get_autoclicked_key() in deep. (platform/sx20/kbd.c) This uses kbd_get_clicked_key(). I revisioned the functions and i think i understand them.

4. In fact, when i replace the kbd_get_autoclicked_key() call with kbd_get_pressed_key(), i got osd to drawn when i press cursor keys.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #222 on: 14 / November / 2009, 10:48:26 »
For those with raw problems:

> rawconvert.exe -12to8 -w=4080 -h=3048 rafile.CRW out.RAW

Opening out.RAW i got the picture with black and white colors.

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #223 on: 15 / November / 2009, 13:39:43 »
I've the same result with the md script posted by you: Either there is no reaction to motion or it takes photos when there is no motion.
Sorry, that script really not works. Try this one. Tell me, what is your best reaction, because it is very slow, to me.

Code: [Select]
@title md split h3

@param a Columns
@default a 8

@param b Rows
@default b 6

@param c Threshold (0-255)
@default c 10

@param d compare Interval (millisecs)
@default d 80

@param e Begin Triggering Delay(secs)
@default e 20

@param f Rows
@default f 1

@param g pix step(speed/accuracy adj)
@default g 8

@param h  reg mode(0-no,1-incl,2-excl)
@default h 2

@param i measure mode(1-Y,0-U,2-V)
@default i 1


if a<1 then let a=1
if b<1 then let b=1
if c<0 then let c=0
if g<1 then let g=1
if f<1 then let f=1

let e=e*1000



print ">[";a;",";b;"] threshold: ";c

let x=30000

for z=0 to 10000

let t=0

rem              /--/-columns, rows to split picture into
rem              |  |
rem              |  |  measure mode (Y,U,V R,G,B) - U-0, Y-1, V-2, 3-R, 4-G, 5-B
rem              |  |  |                     
rem              |  |  |  timeout
rem              |  |  |  |  comparison interval (msec)
rem              |  |  |  |  |  threshold ( difference in cell to trigger detection)
rem              |  |  |  |  |  |  draw_grid (0-no, 1-yes)
rem              |  |  |  |  |  |  |  return variable. number of cells with motion detected
rem              |  |  |  |  |  |  |  |
rem              |  |  |  |  |  |  |  |  VVVVVV  OPTIONAL PARAMETERS: VVVV
rem              |  |  |  |  |  |  |  |
rem              |  |  |  |  |  |  |  |  region (masking) mode: 0-no regions, 1-include,  2-exclude
rem              |  |  |  |  |  |  |  |  |  region first column
rem              |  |  |  |  |  |  |  |  |  |  region first row
rem              |  |  |  |  |  |  |  |  |  |  |   region last column
rem              |  |  |  |  |  |  |  |  |  |  |   |    region last row
rem              |  |  |  |  |  |  |  |  |  |  |   |    |   parameters- 1-make immediate shoot, 2-log debug information into file. OR-ed values are accepted
rem              |  |  |  |  |  |  |  |  |  |  |   |    |   |  pixels step - speed vs. Accuracy adjustments (1-use every pixel, 2-use every second pixel, etc)
rem              |  |  |  |  |  |  |  |  |  |  |   |    |   |  |  number of milliseconds to wait before begin triggering - can be useful for calibration with "draw_grid" option
rem              |  |  |  |  |  |  |  |  |  |  |   |    |   |  |  |
rem              V  V  V  V  V  V  V  V  V  V  V   V    V   V  V  V
md_detect_motion a, b, i, x, d, c, 1, t, h, 1, 1,  a,   f , 0, g, e

if t<1 then goto "zzz"

click "shoot_full"
rem sleep 10
rem release "shoot_full"

:zzz

next z


end


*

Offline jan

  • *
  • 48
  • PowerShot SX20 IS (100f)
    • cms -db
Re: the sx20 porting thread
« Reply #224 on: 15 / November / 2009, 14:36:04 »
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).
« Last Edit: 15 / November / 2009, 14:38:50 by jan »

Re: the sx20 porting thread
« Reply #225 on: 15 / November / 2009, 14:54:20 »
What do I do to get a firmware dump? I have firmware version 1.0.2

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #226 on: 15 / November / 2009, 16:10:43 »
What do I do to get a firmware dump? I have firmware version 1.0.2
Read http://chdk.setepontos.com/index.php/topic,4188.0.html

*

Offline neszt

  • ***
  • 174
Re: the sx20 porting thread
« Reply #227 on: 15 / November / 2009, 16:42:45 »
SX20 1.00F beta firmware update.

http://chdk.neszt.hu/bin (For testers)
http://chdk.neszt.hu/git (For sourcecode maintainers)

- FIX * OSD appearing bugfix
- FIX * Canon menu appearing fixed
- NEW * BatteryTemperature
- NEW * CCDTemperature


Re: the sx20 porting thread
« Reply #228 on: 16 / November / 2009, 09:59:50 »
I'm a newbie, so excuse my question if it is out of place.

Will it be possible to reintroduce the "super fine" jpeg quality to SX20 using CHDK?
Simply reducing the amount of Jpeg compression will probably fit many simple scenarios where RAW will be an overkill.

Thanks

Re: the sx20 porting thread
« Reply #229 on: 16 / November / 2009, 13:09:58 »
Ok neszt. I will try this. Thx

 

Related Topics