Popular recipes tagged "image_processing"http://code.activestate.com/recipes/tags/image_processing/2016-07-31T22:50:28-07:00ActiveState Code RecipesImage Projection Onto Sphere (Python)
2016-07-31T22:50:28-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/580695-image-projection-onto-sphere/
<p style="color: grey">
Python
recipe 580695
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/image_processing/">image_processing</a>, <a href="/recipes/tags/imaging/">imaging</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/pil/">pil</a>).
</p>
<p>Image projection onto sphere using Equirectangular map projection.</p>
<p>Download the test image from the Wikipedia page!</p>
2D Discrete Fourier Transform (Python)
2015-01-03T03:39:34-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/578997-2d-discrete-fourier-transform/
<p style="color: grey">
Python
recipe 578997
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/image/">image</a>, <a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/image_processing/">image_processing</a>, <a href="/recipes/tags/math/">math</a>, <a href="/recipes/tags/mathematics/">mathematics</a>, <a href="/recipes/tags/signal_processing/">signal_processing</a>).
</p>
<p>2D Discrete Fourier Transform (DFT) and its inverse.</p>
<p>Calculates 2D DFT of an image and recreates the image using inverse 2D DFT.</p>
<p>Computation is slow so only suitable for thumbnail size images.</p>
Gimp Paperwhite Scriptfu (Python)
2014-03-25T10:17:07-07:00Alfehttp://code.activestate.com/recipes/users/4182236/http://code.activestate.com/recipes/578857-gimp-paperwhite-scriptfu/
<p style="color: grey">
Python
recipe 578857
by <a href="/recipes/users/4182236/">Alfe</a>
(<a href="/recipes/tags/gimp/">gimp</a>, <a href="/recipes/tags/image_processing/">image_processing</a>, <a href="/recipes/tags/paperwhite/">paperwhite</a>, <a href="/recipes/tags/plugin/">plugin</a>, <a href="/recipes/tags/script/">script</a>, <a href="/recipes/tags/scriptfu/">scriptfu</a>).
</p>
<p>This Gimp-plugin (written in Python) changes a photograph of a paper document so that the paper background appears white again without overly lighting the text.</p>
Using pngcanvas, a pure Python PNG library (Python)
2014-01-15T22:45:11-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/578811-using-pngcanvas-a-pure-python-png-library/
<p style="color: grey">
Python
recipe 578811
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/image_processing/">image_processing</a>, <a href="/recipes/tags/imaging/">imaging</a>, <a href="/recipes/tags/png/">png</a>, <a href="/recipes/tags/pngcanvas/">pngcanvas</a>, <a href="/recipes/tags/python/">python</a>).
</p>
<p>This recipe shows a simple example of how to use pngcanvas, a pure Python library for PNG image creation.</p>
Mass image resizing (with progress bar and details in console) (Python)
2010-04-13T07:06:09-07:00Rahul Anandhttp://code.activestate.com/recipes/users/4173646/http://code.activestate.com/recipes/577189-mass-image-resizing-with-progress-bar-and-details-/
<p style="color: grey">
Python
recipe 577189
by <a href="/recipes/users/4173646/">Rahul Anand</a>
(<a href="/recipes/tags/images/">images</a>, <a href="/recipes/tags/image_processing/">image_processing</a>, <a href="/recipes/tags/python/">python</a>).
Revision 2.
</p>
<p>This script uses the Python Imaging libraries to resize images in a folder and its sub-folders iteratively. The details like the directory hierarchy, current progress etc are displayed dynamically. We can optionally specify more image formats, required size etc.(See command-line argument --help).
This is meant for processing large collections of images, which justifies the display of many details.</p>
Putting watermark to images in batch (Python)
2009-06-20T18:05:08-07:00hasanatkazmihttp://code.activestate.com/recipes/users/4168973/http://code.activestate.com/recipes/576818-putting-watermark-to-images-in-batch/
<p style="color: grey">
Python
recipe 576818
by <a href="/recipes/users/4168973/">hasanatkazmi</a>
(<a href="/recipes/tags/batch/">batch</a>, <a href="/recipes/tags/image_processing/">image_processing</a>, <a href="/recipes/tags/pil/">pil</a>, <a href="/recipes/tags/watermark/">watermark</a>).
</p>
<p>Being a novice photographer, I usually have many pictures - sometimes in hundreds. While posting on Flickr or other online sources, it is very important to put watermark on all of them, like signature or email.
This is a small self explanatory snippet which will place watermark image on right bottom corner. You just provide source folder and it will scan all photos in that folder (not sub folders) and will produce watermarked photos in the destination folder.
It worked for me with jpg, it should work for all those formats which PIL can work with.</p>