OT: (sort of) BASIC in a Canon camera

I have the Canon powershot 470a, and needed to do some very low light stuff with it (stars etc). Now as this is a cheap model, the hardware has it all , but the firmware allows very little.

So, after a hint from a news site, I found an alternative software for the Canon cameras (most Canons in fact), a firmware replacement that you can boot from the SD-card and will run in RAM (leaving the original firmware intact).

formatting link

It allows programming the Canon cameras in some form of BASIC (Mr Larkin will like that), and also in LUA, some more C like syntax language.

All of the sudden the camera hardware is available from scripts, making for example nice time lapse recordings possible.... Maybe you all already knew this, but for me, and maybe for some, this will add a lot of fun to the Canon. Look here what it for example can do with a simple time lapse script:

formatting link

Reply to
Jan Panteltje
Loading thread data ...

allows very little.

Canon cameras

SD-card and will run

like that),

Now that is very neat. Thanks.

Reply to
ingvald44

CHDK is neat, I like the histogram function. And it works with most Canon models. Easy to remove since it boots off of the sd card.

Cheers

Reply to
Martin Riddle

Thanks - but this does remind me of a couple other things:

  1. Within budget, get a camera that has more megapixels and larger sensor area. To the extent that the former increases grain along with detail, that can be fixed by photo editing software to do smoothing. Do a minimal blur or better still an "averaging" with small "cell size". Then scale down the pixel dimensions of the image, with at least one photo editor program calling this "resampling".

I am very happy with my Canon Powershot A640. This is a 10 megapixel camera with larger sensor area. I find ratio of graininess to megapixels to be on the low side due to large sensor area and also due to level of advancement of the image processing firmware in the camera.

One thing I like to do if I like to take extra steps to reduce graininess:

Take the 3648*2736 image, and do an "average" with cell size of 2x2 pixels in ULead's "Photo Plus", which I have gotten used to doing in the Windows 3.1 version, version 1.2. Then "resample" by 50%, giving a nice

1824*1368 image.

Another thing I like to do sometimes, is homebrew processing of images with homebrew software. I have only advanced my homebrew software to the extent of working with image files in forms of 24 bit "Windows Bitmap" with horizontal and vertical dimensions in pixels being a multiple of 4 - easy enough to come up with via photo editor programs.

It is simple enough of a BASIC program to post here. It requires a BASIC programming language or compiler not requiring line numbers, and was developed under Microsoft's Quick Basic 4.5. If you make the processing function something requiring floating point math, you may want to add in the Dan Barclay "mathptch" to improve processing speed, maybe from half a minute to a few seconds on modern computers, unless you use a BASIC programming language or compiler unaffected by the bug that "mathptch" mostly fixes.

I give plenty of info on "mathptch" in:

formatting link
formatting link

As for my homebrew software that I use for image processing, for individual pixels to be processed by one or more functions of red, green, and blue values of each pixel:

(And I invite anyone who wants to make use of this to get creative with functions, as I have done for specific enhancement applications, while I show below a more general one as an example.)

- Don Klipstein ( snipped-for-privacy@misty.com) - BASIC code follows:

'Pixel color change program using GOSUB and VARSEG/VARPTR 'for 24 bit .BMP files with height and width being mult. of 4 'total time for a 600K file (400MHz MHz PII) is under 1 second 'with easier functions.

OPTION BASE 1

DIM bu AS STRING * 1350 DIM buu AS STRING * 3 DIM bu54 AS STRING * 54 DIM pixin%(1350) DIM pixout%(1350)

'ON ERROR GOTO errtrap

GOTO pastgosub

colorfun: 'gosub to work on color values faster than functions 'This is spaghetti-coded to an earlier location for convenience of editing

'

'AS EXAMPLE OF FUNCTIONS

IF r%

Reply to
Don Klipstein

FWIW, my preferred tool for image processing is Python with numpy (numerical array library) and PIL (Python image library). Does most of what Matlab can, but doesn't cost anything.

Reply to
Nobody

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.