[BangPypers] Convert to Black and White to an image

Venkatraman S venkat83 at gmail.com
Tue Jan 11 09:58:40 CET 2011

On Tue, Jan 11, 2011 at 1:59 PM, Anand Balachandran Pillai <
abpillai at gmail.com> wrote:

> Correction -  "as moderator of this forum", still you can go and take
>  a hike.


Anywayz, i was planning to post the following reply initially when this
thread started,
but opined that i will first understand how OP is thinking :

Many use thresholds to convert images - esp when doing a color-b/w.
Though this works most of the time, it is not recommended; there are
image processing algorithms which use histograms or kmeans to accomplish
Halftoning is an interesting problem and similar to different algorithms
that exist for
text segmentation/classification, this is a 'classic' one.

Blindly using PIL for images is not a good idea. Image processing algorithms
are *extremely*
expensive, as they process huge quantum of information - hence you have DIP
though there is nothing equivalent like a 'text processor' (IMHO). DIP
libraries provide loads
of functions for developers to use; they abstract the complexities of the
underlying algorithm,
and hence i think the responsibility on the developer increases more now, as
he/she needs to
really understand what he wants to accomplish with the pixel data. Iterating
the pixels
multiple times for simple transformations is not a good idea; especially
when the code is to be
deployed in production servers.

I used to actively work in DIP during my undergrad years(robotic vision),
but  offlate hardly
touch this area. Just hanging around Stackoverflow
<http://stackoverflow.com/questions/tagged/image-processing>to keep a watch
on the Q&As etc is
a great way to learn too; otherwise, Gonzalez and Woods is an amazing book
to start;
especially the edition that came out in 2004 had a chapter on wavelets which
was fun.


More information about the BangPypers mailing list