<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1960761848283114855</id><updated>2012-02-15T23:42:22.275-08:00</updated><title type='text'>Python Imaging</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-4286757816956771345</id><published>2011-08-30T06:08:00.000-07:00</published><updated>2011-08-30T06:10:28.949-07:00</updated><title type='text'>Another interesting gsoc project</title><content type='html'>Adding cython support to pypy:&lt;br /&gt;http://rguillebert.blogspot.com/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-4286757816956771345?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/4286757816956771345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/08/another-interesting-gsoc-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/4286757816956771345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/4286757816956771345'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/08/another-interesting-gsoc-project.html' title='Another interesting gsoc project'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-2747161922686510984</id><published>2011-08-18T03:04:00.000-07:00</published><updated>2011-08-18T04:18:03.257-07:00</updated><title type='text'>Why Opencv is so fast</title><content type='html'>Convolution is the basis of many computer visions algorithms and straightforward algorithm to implement in C, but in the comparison of various implementations Opencv clearly comes out as the winner.&lt;br /&gt;&lt;br /&gt;For the convolution of a 5x5 kernel with a 1000x1000 image of type float32 (time in ms):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;opencv 5.43189048767&lt;br /&gt;nidimage  36.602973938&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;And this factor of performance is visible in the implementations of other libraries as well, e.g. leptonica, theano.&lt;br /&gt;&lt;br /&gt;It has been a goal of scikits.image to operate without too many explicit dependencies, so pulling in a fast convolution algorithm has been stated as a very desired goal.&lt;br /&gt;&lt;br /&gt;The reason why opencv performs so well, is because of its use of SSE operators. In convolution where we apply the same operation on multiple data items the gains in perfomance are considerable.&lt;br /&gt;&lt;br /&gt;The following command for example,&lt;br /&gt;&lt;code&gt;&lt;br /&gt;__m128 t0 = _mm_loadu_ps(S);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;loads 4 values from the S pointer into the 128 bit register t0, and all operations on on this register operate on these values in parallel.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;s0 = _mm_add_ps(s0, s1);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I have implemented a SSE based float32 convolution routine and though a bit slower than opencv, it diminishes the performance gap considerably. Each type needs some additional work, including support for row and column separable convolutions. With this we will get a good foundation for a fast convolution implementation.&lt;br /&gt;&lt;br /&gt;Benchmark of current results for the test case:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;scikits.image 11.029958725&lt;br /&gt;opencv 5.04112243652&lt;br /&gt;scipy.ndimage 43.2901382446&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-2747161922686510984?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/2747161922686510984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/08/why-opencv-is-so-fast.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/2747161922686510984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/2747161922686510984'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/08/why-opencv-is-so-fast.html' title='Why Opencv is so fast'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-3098674921424918578</id><published>2011-07-20T00:52:00.000-07:00</published><updated>2011-07-20T02:02:27.279-07:00</updated><title type='text'>Video work</title><content type='html'>I've added video reading support with Opencv and GStreamer backends.&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;camera =CvVideo("test.avi")&lt;/div&gt;&lt;div&gt;#or camera = GstVideo("test.avi")&lt;/div&gt;&lt;div&gt;image = camera.get()&lt;/div&gt;&lt;/code&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;Extending the backend system to support switching classes would be great, similar to the way we handle functions but in a Video("test.avi", backend="opencv") kind of way.&lt;/div&gt;&lt;div&gt;The Opencv video duration retrieval methods are currently broken in Linux, but I implemented it anyway for when they fix it in the future. Until then, the functionality is there in GStreamer. Both implementations also play IP camera streams, so between them you are pretty much set to handle most cameras/codecs.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-3098674921424918578?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/3098674921424918578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/07/video-work.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/3098674921424918578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/3098674921424918578'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/07/video-work.html' title='Video work'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-5052781317523520878</id><published>2011-07-04T11:44:00.000-07:00</published><updated>2011-07-04T11:58:43.679-07:00</updated><title type='text'>Backend Testing</title><content type='html'>The following is a code snippet of our testing system for Python Nose tests:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;class TestSobel(BackendTester):&lt;/div&gt;&lt;div&gt;    def test_00_00_zeros(self):&lt;/div&gt;&lt;div&gt;        """Sobel on an array of all zeros"""&lt;/div&gt;&lt;div&gt;        result = F.sobel(np.zeros((10, 10), dtype=np.float32))&lt;/div&gt;&lt;div&gt;        assert (np.all(result == 0))&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When we inherit from BackendTester, tests are generated for all the implemented backends. If you have a missing dependency, the test will be skipped.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-5052781317523520878?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/5052781317523520878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/07/backend-testing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/5052781317523520878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/5052781317523520878'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/07/backend-testing.html' title='Backend Testing'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-8722347553202030609</id><published>2011-06-17T04:29:00.000-07:00</published><updated>2011-06-17T12:59:41.018-07:00</updated><title type='text'>Low barrier to entry</title><content type='html'>An emphasis for our backend system has been to offer a real low barrier to entry for adding new backend functions. Therefore we have tried to avoid unnecessary configuration files, just a module that you drop in each submodules backend directory with naming convention doing all the rest.&lt;br /&gt;&lt;br /&gt;Documentation for each function is updated to indicate what backends are available. To do that though without importing a module, we have resorted to quick parsing of the function definitions of a module.&lt;br /&gt;&lt;br /&gt;At the start of the execution, the source tree is scanned and scikits.image.backends is populated with all found backends. This can be used for backend exploration.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;use_backend("opencv")&lt;br /&gt;use_backend(scikits.image.backends.opencv)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Scikits.image already has a IO plugin system with very similar though slightly more complicated infrastructure, and in the future it may be wise to merge the two systems. This will require two tiers of backends one for visualization and one for processing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-8722347553202030609?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/8722347553202030609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/06/low-barrier-to-entry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/8722347553202030609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/8722347553202030609'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/06/low-barrier-to-entry.html' title='Low barrier to entry'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-1428532158413086891</id><published>2011-06-08T00:46:00.000-07:00</published><updated>2011-06-08T01:51:47.863-07:00</updated><title type='text'>Decorators</title><content type='html'>We have looked at a few variations on the backend decorator theme, one uses the keyword argument style while another uses import techniques (with no resulting overhead). The importing style proved to be a bit unpythonic though, so we are going with a more explicit backend manager.&lt;br /&gt;&lt;br /&gt;How we will handle documentation of a function and its backend is also a topic of discussion. The backend function documentation should be made available if that backend is in use, or at least a good indication that this backend is the one at service.&lt;br /&gt;&lt;br /&gt;I also started with some color conversion backends, and I've found that implementations differ to some extent. HSV for example is handled quite arbitrarily between frameworks and this will hamper comparative testing. Even gray scale conversion offers subtle differences.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-1428532158413086891?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/1428532158413086891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/06/decorators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/1428532158413086891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/1428532158413086891'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/06/decorators.html' title='Decorators'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-8322863128861816403</id><published>2011-05-30T10:29:00.000-07:00</published><updated>2011-05-30T12:10:13.179-07:00</updated><title type='text'>Initial backend work</title><content type='html'>We have started with the backend system. To recap, it will enable us to provide implementation backings for functions from various frameworks.&lt;br /&gt;&lt;br /&gt;I've started with the Sobel operation, and implemented it in both opencv and opencl. At the same time I've reworked the numpy version as well so that identical results can be obtained. With different implementations at your disposable a great benefit is the way that you can test and benchmark different algorithms.&lt;br /&gt;&lt;br /&gt;The working idea for now is to make a decorator that one can add to functions:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;@add_backends&lt;br /&gt;def sobel(image):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# numpy implementation&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will add an optional backend implementation parameter to the function that the function will try to use:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# use the opencv sobel implementation&lt;br /&gt;sobel(image, backend="opencv") &lt;br /&gt;# use the opencl implementation on an available gpu&lt;br /&gt;sobel(image, backend="opencl") &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;If the specified implementation is not found, we fall back to the default numpy backend. For global backend selections we are thinking of something in the following line:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;use_backend("opencl")&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will try to use opencl wherever possible.&lt;br /&gt;&lt;br /&gt;An alternative thought to our current setup is to specify it more explicitly:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;opencv.sobel(image)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The following week we will try to finalize this API and implement a few more functions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-8322863128861816403?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/8322863128861816403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/05/initial-backend-work.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/8322863128861816403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/8322863128861816403'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/05/initial-backend-work.html' title='Initial backend work'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-5324902778513802320</id><published>2011-04-30T07:06:00.000-07:00</published><updated>2011-04-30T07:52:40.643-07:00</updated><title type='text'>Accepted for the Google Summer of Code!</title><content type='html'>Our proposal was accepted for the Google Summer of Code 2011. &lt;br /&gt;Now it is time to tool up and cover some groundwork before we begin!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-5324902778513802320?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/5324902778513802320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/04/accepted-for-google-summer-of-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/5324902778513802320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/5324902778513802320'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/04/accepted-for-google-summer-of-code.html' title='Accepted for the Google Summer of Code!'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-6110552930497009525</id><published>2011-04-17T15:21:00.000-07:00</published><updated>2011-04-19T06:02:22.132-07:00</updated><title type='text'>Edges</title><content type='html'>Edge detection has always played some part in my illumination invariant algorithms, so I thought it would be a good idea to try getting it into the Scikit. The CellProfiler project has released their algorithms, so I've ported it together with its well written tests. It is rudimentary but a good foundation for a start.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Interestingly the Sobel functions of opencv and ndimage gives different results, perhaps a good idea to look a bit into the source to see what differs.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;My branch is hosted at the following location:&lt;/div&gt;&lt;div&gt;&lt;a href="https://github.com/holtzhau/scikits.image"&gt;https://github.com/holtzhau/scikits.image&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Pull request and commit for this patch:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;a href="https://github.com/stefanv/scikits.image/pull/17"&gt;https://github.com/stefanv/scikits.image/pull/17&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="https://github.com/stefanv/scikits.image/commit/18a079a09f3de7e103e7fe3cac2beeb84b27f437"&gt;https://github.com/stefanv/scikits.image/commit/18a079a09f3de7e103e7fe3cac2beeb84b27f437&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-6110552930497009525?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/6110552930497009525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/04/edges.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/6110552930497009525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/6110552930497009525'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/04/edges.html' title='Edges'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1960761848283114855.post-354908061673687846</id><published>2011-04-08T06:20:00.001-07:00</published><updated>2011-04-08T07:07:04.083-07:00</updated><title type='text'>GSOC2011</title><content type='html'>This is my proposal to improve scikits.image for the Google Summer of Code 2011.&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;div style="background-color: transparent; font-family: 'Times New Roman'; font-size: medium; "&gt;&lt;h5 id="internal-source-marker_0.03682616236619651" style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Multiple computational backend support&lt;/span&gt;&lt;/h5&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;While &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;scikits.image&lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt; is currently built on NumPy, leveraging the graphical processing unit (GPU) by using PyOpenCL (&lt;/span&gt;&lt;a href="http://mathema.tician.de/software/pyopencl"&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 153); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap; "&gt;http://mathema.tician.de/software/pyopencl&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;) would provide a significant speed increase for certain parallelizable algorithms.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;  Similarly, other libraries such as CorePy (&lt;/span&gt;&lt;a href="http://www.corepy.org/"&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 153); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap; "&gt;http://www.corepy.org&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;) and Theano (&lt;/span&gt;&lt;a href="http://deeplearning.net/software/theano"&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 153); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap; "&gt;http://deeplearning.net/software/theano&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;) provide benefits over NumPy under certain circumstances.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;  To leverage these libraries, a backend system will be implemented whereby algorithms can easily be run on different libraries or devices.  For example, we could execute a color conversion on the GPU as:&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;/span&gt;&lt;br /&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 13pt; font-family: 'Courier New'; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;from scikits.image import &lt;/span&gt;&lt;span style="font-size: 13pt; font-family: 'Courier New'; color: rgb(82, 81, 81); background-color: rgb(207, 223, 229); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;backend&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 13pt; font-family: 'Courier New'; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;rgb2hsv(x, &lt;/span&gt;&lt;span style="font-size: 13pt; font-family: 'Courier New'; color: rgb(82, 81, 81); background-color: rgb(207, 223, 229); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;backend&lt;/span&gt;&lt;span style="font-size: 13pt; font-family: 'Courier New'; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;=&lt;/span&gt;&lt;span style="font-size: 13pt; font-family: 'Courier New'; color: rgb(82, 81, 81); background-color: rgb(207, 223, 229); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;backend&lt;/span&gt;&lt;span style="font-size: 13pt; font-family: 'Courier New'; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;('opencl'))&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 13pt; font-family: 'Courier New'; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h5 style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Video Input and Output&lt;/span&gt;&lt;/h5&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;The scikit has excellent input/output plugin facilities, but currently does not support video reading, writing or display.  Existing open source video reader libraries will be wrapped using Cython (&lt;/span&gt;&lt;a href="http://cython.org/"&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 153); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap; "&gt;http://cython.org&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;), whereafter the existing &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: 'Courier New'; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;ImageCollection &lt;/span&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;class can be modified to display them.  The possibility of wrapping a camera acquisition library can be investigated.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h5 style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Image Processing Algorithms &lt;/span&gt;&lt;/h5&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;The number of algorithms provided by the library is currently limited.  The addition of certain key algorithms would increase its usefulness dramatically.  I propose adding the following algorithms, implemented in Cython:&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; "&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Feature detection (probabilistic Hough transform, STAR, FAST)&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; "&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Segmentation (graph cuts and watershed)&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;li style="list-style-type: disc; font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; "&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Geometrical transformations (distortion removal)&lt;/span&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;This goal seems ambitious, but for many algorithms existing wrappers exist which may be re-used, for example code from CellProfiler at MIT’s Broad Institute (released under a BSD license).&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;h5 style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: bold; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;Documentation&lt;/span&gt;&lt;/h5&gt;&lt;p style="margin-right: 8pt; margin-top: 0pt; margin-bottom: 0pt; "&gt;&lt;span style="font-size: 11pt; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "&gt;To improve adoption of the project, I’d like to write an introductory tutorial and improve the existing documentation.&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1960761848283114855-354908061673687846?l=pythonimaging.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pythonimaging.blogspot.com/feeds/354908061673687846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://pythonimaging.blogspot.com/2011/04/gsoc2011.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/354908061673687846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1960761848283114855/posts/default/354908061673687846'/><link rel='alternate' type='text/html' href='http://pythonimaging.blogspot.com/2011/04/gsoc2011.html' title='GSOC2011'/><author><name>Pieter Holtzhausen</name><uri>http://www.blogger.com/profile/03326261886751299608</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
