Monday, 30 January 2006

Colour transforms

I found this *really* useful comment in the Python source for the Python Image Library. Guess I should have remembered this from Uni, but never mind!

When translating a colour image to black and white (mode "L"), the library uses the ITU-R 601-2 luma transform:

L = R * 299/1000 + G * 587/1000 + B * 114/1000

technorati tags: , , , , , , ,

Wednesday, 25 January 2006

Pong for the Symbian60


I've spent an evening and a bit writng Pong in Python for my Nokia 7610. Seems weird to have a hobby after all the time we've spent working for the ARC launch, but Pong was fun and it was nice to see how incredibly simple the PySymbian stuff really is. Yay.

technorati tags: , , , , , , , ,

Monday, 23 January 2006

Camera modes for Symbian60 camera phones

I've been messing about with the Python SDKs for Symbian60 phones. If you want to write anything using the camera, it helps to know what modes are available on your phone. So, here's a short Python script to do that and print the relevant information to the interpreter window:




"""
Prints all available information about available cameras:

* Number of cameras
* Maximum zoom
* Available image modes
* Available white balance modes
* Available image sizes
* Available flash modes
* Available exposure modes
"""

from camera import *

__author__ = 'Sarah Mount '

print 'This phone has', cameras_available(), 'camera(s).'
print 'Max zoom is', max_zoom(), '.'

for mode in image_modes():
print 'img_mode:', mode
for mode in white_balance_modes():
print 'wb_mode:', mode
for size in image_sizes():
print 'img_size:', size
for mode in flash_modes():
print 'flash_mode:', mode
for mode in exposure_modes():
print 'exp_mode:', mode

Tuesday, 17 January 2006

PPIG workshop

I've been meaning to blog about the PPIG Unroll Your Ideas workshop that Andree organised at Coventry last week. The meeting was fantastic and the level of debate was probably the best I've seen almost anywhere, perhaps with the exception of some OOPSLA sessions. Definately the highlight was Richard and Saeed's paper on predicting whether or not students will pass a programming course, before they have started learning anything about software at all. Interesting stuff and if the data bears out in longditudinal studies this could be a really big result. There's a little more on Richard's site and no doubt the full paper will be available soon. You heard it here first! (Or maybe second.)

technorati tags: , , , , ,

Sunday, 8 January 2006

Python on my Nokia 7610


This absolutely rules ;-) Go get it here.


technorati tags: ,