OT: (sort of) BASIC in a Canon camera

Yesterday night was the first night with few clouds, and did a test run with the Canon A470, and the chdk very long expose (up to 60 seconds), script, with low ASA (to reduce noise).

Not perfect, there was a lot of moon making one area very bright. This should be better when there is no moon, further allowing exposure increase. It takes a few pictures for teh auto exposure to stabilize :-)

Had to scale the images down to 1400 x 1050 pixels so the movie would actually display, further losses in compression: ftp://panteltje.com/pub/ahr.avi (16.7 MB).

Seems I caught a falling star or flying bird? at about 45 seconds... The time lapse was 1 minute, this will play at 1 second per frame.

Not bad for that cheapo camera, it is all in the software :-) The sensor is very good, very little noise, but some compression artefacts.

For the Linux users: This is how the avi was made, from the camera jpegs For each jpg, from a script: convert -resize 1920x1050 nnn.jpg nnn.jpg This processes 1375.jpg to 1417.jpg: jpg_to_mjpegtools_yuv -f 1357 -l 1417 -s 1 > q1.yuv ffmpeg -i q1.yuv -vcodec mjpeg -sameq -r 1 -y ahr.avi

I wrote jpg_to_mjpegtools_yuv, it is available from here:

formatting link
The yuv stream can be manipulated in an easy way with various tools.

Reply to
Jan Panteltje
Loading thread data ...

It crashes; see the appended patch.

Also, given that JPEG images are normally stored as 4:2:0 YUV, you might want to ask libjpeg to give you the raw data rather than having it convert to RGB then manually converting it back to 4:2:0 YUV, e.g.:

cinfo.out_color_space = JCS_YCbCr; cinfo.raw_data_out = TRUE;

--- video.c~ 2009-08-07 19:10:02.000000000 +0100

+++ video.c 2009-08-08 02:32:18.000000000 +0100 @@ -322,7 +322,7 @@ exit(1); }

- for(i = 0; i < width; i++)

+ for(i = 0; i < height; i++) { up[i] = malloc(width * sizeof(double) ); if(! up[i] ) @@ -345,7 +345,7 @@ exit(1); }

- for(i = 0; i < width; i++)

+ for(i = 0; i < height; i++) { vp[i] = malloc(width * sizeof(double) ); if(! vp[i] )
Reply to
Nobody

On a sunny day (Sat, 08 Aug 2009 02:36:46 +0100) it happened Nobody wrote in :

Thanks! That was a stupid mistake, well I never claimed I write bug-free code ;-) Will fix this and release 0.2.2 later today hopefully.

As to JCS_YCbCr output, you are right of course, but I needed the RGB for the X11 display option anyways.

I will probably experiment a bit with JCS_YCbCr, to see if it improves quality, and see what I can do with X11.

Your feedback is appreciated :-)

Reply to
Jan Panteltje

One option is to use Xv. another is OpenGL with either the GL_MESA_ycbcr_texture or GL_APPLE_ycbcr_422 extensions (these expect

4:2:2, i.e. Cb,Y0,Cr,Y1, so you need to duplicate the chroma channels vertically). Example code can be found in mplayer, xine or vlc.

Or you could just decode to RGB for the X display but use the YUV for the output.

Reply to
Nobody

(up to 60 seconds),

increase.

artefacts.

My Linux box plays most media. It won't play yours and i don't know why.

Reply to
JosephKK

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.