[p900] about "overscan" and "testcameraapp"
- From: Alfonso Martone <a.martone@xxxxxxxxxxx>
- To: p900@xxxxxxxxxxxxx
- Date: Sun, 16 Oct 2005 09:53:31 +0200
Someone asked me about writing a software to take photos on the P910
and converting them to B/W (or grayscale).
I don't know if my "overscan" demo runs correctly on the P910 (surely
it will display rubbish on the P990, because of the larger screen
size of the P990). Also, I already noticed that the original ECam
library has some serious bugs. In my experience, it seems that one
has to use the "show eyefinder window on screen" method, and handle
it accordingly via Symbian classes and structures (and it's a rather
hard thing, as you can see in the hyper-simplified TestCameraApp
sources).
Converting any image to gray-scale is a very simple task: for every
pixel, take its R-G-B values, and create a gray pixel having X =
(R*0.3 + G*0.59 + B*0.11).
(that is: 30% red, 59% green, 11% blue). These values are somewhat
"standard" because they are calculated on statistical basis on the
human eye. Since the formula is fixed, you may set up three pre-
calculated arrays of results, to speed up the process.
To reduce to strict black/white, choose an "intermediate" value (for
example X*0.6) and consider the upper values as white and lower
values as black.
alf
Other related posts:
- » [p900] about "overscan" and "testcameraapp"