CHDK firmware hack discussion (12)

Started Jun 15, 2007 | Discussions
zdravko Junior Member • Posts: 48
CHDK firmware hack discussion (12)

This is a sequel to the old threads discussing the CHDK firmware.
The CHDK fw is a hacked firmware for DIGIC II cameras. Currently
supported cams are A610, A620, A630, A640, A710 IS, S2 IS and S3 IS
(see the FAQ for a complete list).
The CHDK fw implements new features like RAW, battery indicator,
live histogram (RGB/luminance), zebra mode (blinking areas of
over- underexposure), DOF calculator, scripts (intervalometer,
exposure/focus
... bracketing etc.), text reader, file browser,
calendar, games and much more. New features get implemented
frequently, so check the timeline for the latest changes, or the
FAQ for a complete list.
The CHDK firmware does not touch the original firmware of your
camera. It is an additional program which gets loaded into the
memory of the cam. If you have a problem, just turn your cam off or
remove the batteries, and the CHDK fw is gone.

For further information, a guide, download links and FAQ see the
english WIKI:
http://scratchpad.wikia.com/wiki/CHDK

Timeline:
http://tools.assembla.com/chdk/timeline
Dear Vitalyb, GrAnd and all the others: Thank you so much for
creating this wonderful piece of software!
Some screenshots:

Main menu

Histogram (Blended) and Zebra overexposure indicator

Script menu

Link to the previous thread:
http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=23558340

sandra deeley New Member • Posts: 16
Re: CHDK firmware hack discussion (12)

so could you have this loaded onto one memory card...and use another for 'ordinary shooting' and when you wanted to use raw...take out the card with the hack loaded onto it, and just use that one?

rlx
rlx Senior Member • Posts: 1,150
Re: CHDK firmware hack discussion (12)

David

microfunguy wrote:

Just spellout a suitable email address.

rlemieu(a)cooptel(d)qc(d)ca

These are beautiful little mechanisms driving a leadscrew and
fitted with position and rotation sensors.

If one is taking 6 microns as the circle of confusion, that means
that a single step of the focusing motor nearly takes the focus
from the hyperfocal distance to infinity. That behavior is
similar for all zoom positions.

Of course, you have assumed a single thin lens moving in a
simple linear fashion. We don't know if those assumptions are
justified.

I started just taking measurements without making many
assumptions. Then I added that assumtion and the model fits the
data not so badly. I agree that with better measurements one
could get into more elaborate models.

What may be of practical use, is to use the new feature to move
the lens to a certain position and then find-out what distance
it really corresponds to by using magnified centre of screen
and moving subject.

What do you have in mind here? Using the center of screen to
focus at 7.3 mm ... I didn't have much success when I tried it.

David

Richard

OP zdravko Junior Member • Posts: 48
Re: CHDK firmware hack discussion (12)

sandra deeley wrote:

so could you have this loaded onto one memory card...and use
another for 'ordinary shooting' and when you wanted to use
raw...take out the card with the hack loaded onto it, and just use
that one?

Yes, you catched the point

BUT, if you do not need CHDK to load every time, just do not execute the procedure of making the card bootable (leave it unlocked).

And if you want to use some of the other features of CHDK (like the battery indicator, DOF calculator etc), but not to save RAW files, you have the option from the CHDK menu to disable saving RAW.

Regards,
Zdravko

microfunguy Regular Member • Posts: 234
'StereoData Maker' for Canon Compacts

Thanks to the excellent work by Vitalby and GrAnd, it has been fairly easy to add features to CHDK that provide on-screen display of certain parameters to aid stereo photography.
Thanks to 'znanev' and 'Jcduc' for testing (n6mod did not reply to emails).

The data can also be saved in CSV or XML files and displayed with the image by a mere click of the mouse.

This addition is called 'StereoData Maker' and is available here http://stereo.jpn.org/eng/ .

Be sure to also download the very popular 'StereoPhoto Maker', it autocorrects the errors in your images to make viewing comfortable.

You can create stereo photos with a single camera by moving it between exposures and for outdoor photos simply shift your balance from one foot to the other so the camera moves about 65mm.
Surf the web for 'stereo cha-cha'.

David

microfunguy Regular Member • Posts: 234
Re: Distance numbers

rlx wrote:

What do you have in mind here?

OK, it is tricky with the 7.3mm but I am suggesting that moving the focus motor to a particular position should be very precise and repeatable.

We just need to check, especially for macro, where the distance is measured from.

I am suggesting you measure or estimate distance (or use calculated hyperfocal) and use feature in 'StereoData Maker' to move to that position.

Press ALT + DISPLAY.

I will now send you version that increments distance in variable-sized chunks, it will be interesting if you get the same numbers that I do.

I have put the simple lens equation into a spreadsheet and with an 'infinity' image-distance of 7.304004mm and a stepper movement of 3.666 microns can get object distances very close to the 'allowed' distances.

David

Vahooka New Member • Posts: 2
Re: CHDK firmware hack discussion (12)

Did you notice that on A640 when you flip the display out it sometimes turns completely grey? It happens when the ALT mode is not active and when the display is flipped out in such way that the screen should be mirrored (left-> right). It never happend with older revisions of CHDK. And if you turn ALT mode on the screen will go normal but when you turn it off it will go grey again.

Russel_Sprouts Regular Member • Posts: 297
Re: CHDK firmware hack discussion (12)

GrAnd wrote:
http://forums.dpreview.com/forums/readflat.asp?forum=1010&thread=23558340&page=8

Build #129

+ uBasic: Added commands - "wait_click" and "is_key". To be able to write interactive scripts.

I peeked at the source code and it appears the new is_key command
can accept any of the following as arguments. Correct?

display
down, up, left, right
erase
flash
iso
macro
menu
mf
print
set
shoot_full, shoot_half
timer
video
zoom_in, zoom_out

Russel_Sprouts Regular Member • Posts: 297
timed (vs eternal) wait?

Regarding the wait_click command:

It would be helpful to have an optional argument available so that the wait isn't necessarily eternal.

wait_click x
(where x is time, in ms or sec, until the command exits if no keypress)
If no argument is passed, the wait is absolute/eternal

As-is, without an inbuilt "timeout" for the command, I'm unsure how to wrap code around it to allow breaking out of the loop after a specified time has elapsed

============================
print "More? (12 max)"
print "click RIGHT to increment"
print "[5sec wait for input]"
goto wait_five

:wait_five
let s=s+1
if s=> 5 then return
wait_click
is_key k "right"
if k=1 then gosub "k_right"
sleep 1000
goto "wait_ten"

:k_right
if a
return

============================

The situation represented in this example reminds me:

If the 5 line runtime OSD overlay isn't an imposed uBasic limitation,

I wish a runtime command was available (??? set_plines xx) to force the OSD to display the script author's desired number of lines.

With only 5 print lines avaliable (or 4, considering that one line will be used for [waiting for input] prompt) it's sometimes impossible to present sufficient info to the user within one "screen".

Marty Too Senior Member • Posts: 1,219
RAW update?

Andre (or anyone else who knows),

Is there a new RAW implementation? I took a few test shots this morning and the RAW seemed absolutely great (or grand if you wish). I noitced that Vitaly listed some RAW update on a recent release and wonder if I am actually seeing the better RAW as it seems.

I did notice something that others might want to comment on. I saw purple fringing in the Cam2PC browser that was not present with Picasa and the Gimp.

GrAnd Regular Member • Posts: 325
Re: CHDK firmware hack discussion (12)

Fragglerock wrote:

Just a simple question. I convert all my RAW to DNG.
Since the beginning of the hack i keep all my originals RAW
(CRW_XXX.JPG).
Now it began to be very heavy in my hard drive.
Do you think it's usefull keep them or i just need to keep DNG ?

IMHO, You do not need to keep both files. The only difference between them is the file format. No difference in the image data.

GrAnd Regular Member • Posts: 325
Re: CHDK firmware hack discussion (12)

Vahooka wrote:

Did you notice that on A640 when you flip the display out it
sometimes turns completely grey?

Did you enable 'Flashlight' option?

GrAnd Regular Member • Posts: 325
Re: CHDK firmware hack discussion (12)

Russel_Sprouts wrote:

I peeked at the source code and it appears the new is_key command
can accept any of the following as arguments. Correct?
display
down, up, left, right
[snip]

Yes. This command accepts the same button names as 'click/press/release' commands.

GrAnd Regular Member • Posts: 325
Re: timed (vs eternal) wait?

Russel_Sprouts wrote:

Regarding the wait_click command:
It would be helpful to have an optional argument available so that
the wait isn't necessarily eternal.
wait_click x
(where x is time, in ms or sec, until the command exits if no
keypress)
If no argument is passed, the wait is absolute/eternal
As-is, without an inbuilt "timeout" for the command, I'm unsure how
to wrap code around it to allow breaking out of the loop after a
specified time has elapsed
[snip]

In current implementation you can't emulate 'timeout' because the script will pause at the wait_click command.

If the 5 line runtime OSD overlay isn't an imposed uBasic limitation,

This limitation is just 'by design'. Just to not overwritel whole screen.

I wish a runtime command was available (??? set_plines xx) to force
the OSD to display the script author's desired number of lines.

Actually, I do not think that it is useful. In the beginning there was no console at all and nobody complained.

donmorris Regular Member • Posts: 155
Re: CHDK firmware hack discussion (12)

Hi,
I collected all the scripts posted on pages 1 and 2

http://scratchpad.wikia.com/wiki/CHDK/uBASIC/Scripts#User-written_Scripts_-_Page_01
They are in a zip file here.
http://www.mediafire.com/?bcwcjgilzi7

If anyone needs it,
Don

GrAnd Regular Member • Posts: 325
Re: RAW update?

Is there a new RAW implementation? I took a few test shots this
morning and the RAW seemed absolutely great (or grand if you wish).
I noitced that Vitaly listed some RAW update on a recent release
and wonder if I am actually seeing the better RAW as it seems.

It is impossible to get 'new' RAW. The RAW always is the RAW. CHDK can save two 'types' of RAW - RAW and RAW with dark frame substraction. Vitaly just implemented the another way to save absolutely the same types of RAW. And I even have not integrated his approach yet.

gorton Regular Member • Posts: 131
Re: RAW update?

GrAnd wrote:

It is impossible to get 'new' RAW. The RAW always is the RAW. CHDK
can save two 'types' of RAW - RAW and RAW with dark frame
substraction. Vitaly just implemented the another way to save
absolutely the same types of RAW. And I even have not integrated
his approach yet.

I have a question, for RAW with dark frame substraction, is it only for the exposures over 1 second?

Vahooka New Member • Posts: 2
Re: CHDK firmware hack discussion (12)

So that's how you activate flashlight... I was wondering. But anyway... I noticed that when the display flips (left-> right) all characters flips as well and it's not readable... that would be probably difficult to fix, right?

szek New Member • Posts: 21
Re: CHDK firmware hack discussion (12)

GrAnd wrote:

Fragglerock wrote:

Just a simple question. I convert all my RAW to DNG.
Since the beginning of the hack i keep all my originals RAW
(CRW_XXX.JPG).
Now it began to be very heavy in my hard drive.
Do you think it's usefull keep them or i just need to keep DNG ?

IMHO, You do not need to keep both files. The only difference
between them is the file format. No difference in the image data.

DNGs seem to be much bigger than CRWs ( 10 vs 6 MB for 5MP photo), don't they? Is there any purpose other than compatibility with different software to convert CRW to DNG ?

szek New Member • Posts: 21
Shadow clipping indicates black background in playback mode

Hi, I have noticed that if the camera is set to indicate shadow clipping it will also indicate black background when it is in playback mode whenever background is visible.

Cheers

Keyboard shortcuts:
FForum MMy threads