From klonuo at gmail.com Tue Jul 3 20:56:10 2012 From: klonuo at gmail.com (klo uo) Date: Wed, 4 Jul 2012 02:56:10 +0200 Subject: JPEG artifacts detection Message-ID: Hi, I was wondering if it's possible by using scikits-image to detect if arbitrary image suffers from compression artifacts. I mean artifacts in common sense, like saving original image in 80 quality JPEG is fine, but reencoding it over and over again, possibly resizing etc is something I would like to detect - visible color distorsion, edge noise, blockness... Is there efficient method that scikits-image can provide Thanks From klonuo at gmail.com Tue Jul 3 20:58:33 2012 From: klonuo at gmail.com (klo uo) Date: Wed, 4 Jul 2012 02:58:33 +0200 Subject: JPEG artifacts detection In-Reply-To: References: Message-ID: Of course, I mean without looking at the image or intermediate plots, but fully automated detection within some accuracy On Wed, Jul 4, 2012 at 2:56 AM, klo uo wrote: > Hi, > > I was wondering if it's possible by using scikits-image to detect if > arbitrary image suffers from compression artifacts. > I mean artifacts in common sense, like saving original image in 80 > quality JPEG is fine, but reencoding it over and over again, possibly > resizing etc is something I would like to detect - visible color > distorsion, edge noise, blockness... > > Is there efficient method that scikits-image can provide > > Thanks From stefan at sun.ac.za Fri Jul 6 20:09:21 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Fri, 6 Jul 2012 17:09:21 -0700 Subject: bug in radon transform? In-Reply-To: <087441d4-cc9d-4ed0-9a13-aa757a85557f@googlegroups.com> References: <20120404213149.GC7717@phare.normalesup.org> <20120409164158.GA20175@phare.normalesup.org> <087441d4-cc9d-4ed0-9a13-aa757a85557f@googlegroups.com> Message-ID: Hi Casper On Fri, Jul 6, 2012 at 12:19 PM, casper wrote: > I have encountered a similar problem with radon/iradon. > Using an example from the gallery, I have the following error for the line > from the code: > > reconstruction = iradon(projections, theta=angles, output_size=None, > filter='ramp', interpolation='linear') Could you provide us with a self-contained snippet that reproduces the error? Thanks St?fan From klonuo at gmail.com Fri Jul 6 23:37:23 2012 From: klonuo at gmail.com (klo uo) Date: Sat, 7 Jul 2012 05:37:23 +0200 Subject: JPEG artifacts detection In-Reply-To: References: Message-ID: For reference: http://stackoverflow.com/questions/11332590/jpeg-artifacts-detection From stefan at sun.ac.za Sun Jul 8 03:53:46 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Sun, 8 Jul 2012 00:53:46 -0700 Subject: JPEG artifacts detection In-Reply-To: References: Message-ID: On Tue, Jul 3, 2012 at 5:56 PM, klo uo wrote: > I was wondering if it's possible by using scikits-image to detect if > arbitrary image suffers from compression artifacts. The easiest may be to load the image, then save it again as JPG. If the image size remains the same, you probably had a JPG to start with. St?fan From stefan at sun.ac.za Mon Jul 9 04:47:43 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Mon, 9 Jul 2012 01:47:43 -0700 Subject: Stereograms Message-ID: Know how to view stereograms? Then you'd enjoy this! http://mentat.za.net/refer/stereogram_skimage.png Generated with the work-in-progress stereogram branch (test script attached): https://github.com/stefanv/scikits-image/tree/stereogram St?fan -------------- next part -------------- A non-text attachment was scrubbed... Name: stereogram.py Type: application/octet-stream Size: 454 bytes Desc: not available URL: From siggin at gmail.com Mon Jul 9 09:13:58 2012 From: siggin at gmail.com (Sigmund) Date: Mon, 9 Jul 2012 06:13:58 -0700 (PDT) Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> Message-ID: <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> Hallo! As I wrote, the workaround: Am Samstag, 12. Mai 2012 15:47:10 UTC+2 schrieb Zachary Pincus: > > import skimage.io._plugins.freeimage_plugin as fi > fi.write(image, 'whatever.tif', fi.IO_FLAGS.TIFF_NONE) > by Zach worked fine for me. Now I tried the same code on a WIN 7 64 bit system (EPD 7.3.1) and got the following error: Traceback (most recent call last): File "G:\Marwen\Summer.py", line 67, in fi.write(summation, str(datensatz)+"_interval-"+str(interval_length)+"_"+str(count)+'.tif', fi.IO_FLAGS.TIFF_NONE) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 538, in write bitmap, fi_type = _array_to_bitmap(array) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 604, in _array_to_bitmap raise ValueError('Cannot write arrays of given type and shape.') ValueError: Cannot write arrays of given type and shape. I checked the .dtype of the array and compared them to the one on the 32bit and the OS X system but coutn't see any difference. I'm reading several Images with numpy.array(io.imread(bild, plugin="freeimage"),dtype=np.int32) and sum then up one by one to write them out afterwards as one file. Siggi -------------- next part -------------- An HTML attachment was scrubbed... URL: From siggin at gmail.com Mon Jul 9 09:44:34 2012 From: siggin at gmail.com (Sigmund) Date: Mon, 9 Jul 2012 06:44:34 -0700 (PDT) Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> Message-ID: same problem with io.imsave Traceback (most recent call last): File "G:\Marwen\Summer.py", line 61, in io.imsave("test.tif",summation, plugin="freeimage") File "C:\Python27\lib\site-packages\skimage\io\_io.py", line 129, in imsave return call_plugin('imsave', fname, arr, plugin=plugin, **plugin_args) File "C:\Python27\lib\site-packages\skimage\io\_plugins\plugin.py", line 88, in call return func(*args, **kwargs) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 668, in imsave write(img, filename) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 538, in write bitmap, fi_type = _array_to_bitmap(array) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 604, in _array_to_bitmap raise ValueError('Cannot write arrays of given type and shape.') ValueError: Cannot write arrays of given type and shape. siggi -------------- next part -------------- An HTML attachment was scrubbed... URL: From siggin at gmail.com Mon Jul 9 10:01:18 2012 From: siggin at gmail.com (Sigmund) Date: Mon, 9 Jul 2012 07:01:18 -0700 (PDT) Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> Message-ID: <7c828132-079d-44bd-a9a8-830138a373a8@googlegroups.com> without the try: and raise ValueError in the freeimage_plugin.py it returns: Traceback (most recent call last): File "G:\Marwen\Summer.py", line 61, in io.imsave("test.tif",summation, plugin="freeimage") File "C:\Python27\lib\site-packages\skimage\io\_io.py", line 129, in imsave return call_plugin('imsave', fname, arr, plugin=plugin, **plugin_args) File "C:\Python27\lib\site-packages\skimage\io\_plugins\plugin.py", line 88, in call return func(*args, **kwargs) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 669, in imsave write(img, filename) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 538, in write bitmap, fi_type = _array_to_bitmap(array) File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 601, in _array_to_bitmap fi_type = FI_TYPES.fi_types[(dtype.type, n_channels)] KeyError: (, 1) I'm afraid that is all I can do with my limited skills... -------------- next part -------------- An HTML attachment was scrubbed... URL: From siggin at gmail.com Mon Jul 9 10:14:01 2012 From: siggin at gmail.com (Sigmund) Date: Mon, 9 Jul 2012 07:14:01 -0700 (PDT) Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <7c828132-079d-44bd-a9a8-830138a373a8@googlegroups.com> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> <7c828132-079d-44bd-a9a8-830138a373a8@googlegroups.com> Message-ID: <249edbc5-df1c-4628-9df3-c9905910737c@googlegroups.com> I proved myselfe wrong ;-) It is working if I chose numpy.float32 as dtype! uint32 doesn't work either. Leads to KeyError: (, 1) Siggi -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachary.pincus at yale.edu Mon Jul 9 09:25:55 2012 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Mon, 9 Jul 2012 09:25:55 -0400 Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> Message-ID: Can you save via the imsave() command? (E.g. when using compression?) That is, is this error specific to trying to use the TIFF_NONE flag, or general to saving images (or TIFF images) on Win7 64? This may be an issue with the underlying FreeImage library, or a lingering 64-bit bug in the wrappers. So if you could do a bit more sleuthing and figure out the exact trigger for the problem, that would be very helpful in fixing it. Thanks, Zach On Jul 9, 2012, at 9:13 AM, Sigmund wrote: > Hallo! > > As I wrote, the workaround: > > Am Samstag, 12. Mai 2012 15:47:10 UTC+2 schrieb Zachary Pincus: > import skimage.io._plugins.freeimage_plugin as fi > fi.write(image, 'whatever.tif', fi.IO_FLAGS.TIFF_NONE) > > by Zach worked fine for me. Now I tried the same code on a WIN 7 64 bit system (EPD 7.3.1) and got the following error: > > Traceback (most recent call last): > File "G:\Marwen\Summer.py", line 67, in > fi.write(summation, str(datensatz)+"_interval-"+str(interval_length)+"_"+str(count)+'.tif', fi.IO_FLAGS.TIFF_NONE) > File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 538, in write > bitmap, fi_type = _array_to_bitmap(array) > File "C:\Python27\lib\site-packages\skimage\io\_plugins\freeimage_plugin.py", line 604, in _array_to_bitmap > raise ValueError('Cannot write arrays of given type and shape.') > ValueError: Cannot write arrays of given type and shape. > > I checked the .dtype of the array and compared them to the one on the 32bit and the OS X system but coutn't see any difference. > > I'm reading several Images with > numpy.array(io.imread(bild, plugin="freeimage"),dtype=np.int32) > and sum then up one by one to write them out afterwards as one file. > > > Siggi From zachary.pincus at yale.edu Mon Jul 9 10:19:06 2012 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Mon, 9 Jul 2012 10:19:06 -0400 Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <249edbc5-df1c-4628-9df3-c9905910737c@googlegroups.com> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> <7c828132-079d-44bd-a9a8-830138a373a8@googlegroups.com> <249edbc5-df1c-4628-9df3-c9905910737c@googlegroups.com> Message-ID: Hmm, there's clearly something going wrong with int types. (There are also some failing / segfaulting tests on SPARC with int types too... I wonder if these are related?) > It is working if I chose numpy.float32 as dtype! > > uint32 doesn't work either. Leads to KeyError: (, 1) > Could you provide a bit of self-contained test code (starting with creating a new numpy array with known dtype and then trying to save it) that re-creates the above error? And the full backtrace? I'm not sure how saving a uint32 array is causing a KeyError with int64 -- something odd seems to be happening there, maybe. Zach From amueller at ais.uni-bonn.de Mon Jul 9 06:12:29 2012 From: amueller at ais.uni-bonn.de (Andreas Mueller) Date: Mon, 09 Jul 2012 11:12:29 +0100 Subject: Stereograms In-Reply-To: References: Message-ID: <4FFAAE8D.2030906@ais.uni-bonn.de> On 07/09/2012 09:47 AM, St??????fan van der Walt wrote: > Know how to view stereograms? Then you'd enjoy this! > > http://mentat.za.net/refer/stereogram_skimage.png > > Generated with the work-in-progress stereogram branch (test script attached): > > https://github.com/stefanv/scikits-image/tree/stereogram > > St??????fan Sweet! Pretty cool :) From stefan at sun.ac.za Mon Jul 9 14:12:48 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Mon, 9 Jul 2012 11:12:48 -0700 Subject: Stereograms In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 4:26 AM, Jaidev Deshpande wrote: > This is seriously cool... > > Just to make sure - is it a stereogram of the skimage logo? That's it! I think the distance calculation can still be improved; I don't yet get 100% smooth surfaces. Sometimes, conflicting stereo pixel assignments arise, and I'm not sure how to best choose between them. Either way, lots of fun :) St?fan From stefan at sun.ac.za Mon Jul 9 14:31:01 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Mon, 9 Jul 2012 11:31:01 -0700 Subject: bug in radon transform? In-Reply-To: <720c8af2-b51e-4ad7-adb7-4947cb4f331f@googlegroups.com> References: <20120404213149.GC7717@phare.normalesup.org> <20120409164158.GA20175@phare.normalesup.org> <087441d4-cc9d-4ed0-9a13-aa757a85557f@googlegroups.com> <720c8af2-b51e-4ad7-adb7-4947cb4f331f@googlegroups.com> Message-ID: Hi Casper There is a bug in the modified version of the example. You compute "projections" twice, but the second time without specifying the angles. I.e., by default the 180 directions are used. You then try to reconstruct from that, but specifying the incorrect angles. Here's a pull request to raise a better message when this happens: https://github.com/scikits-image/scikits-image/pull/211 St?fan On Mon, Jul 9, 2012 at 9:55 AM, casper wrote: > Here is the code, that I took from the skimage gallery: From dima.osin at gmail.com Mon Jul 9 16:16:08 2012 From: dima.osin at gmail.com (casper) Date: Mon, 9 Jul 2012 13:16:08 -0700 (PDT) Subject: bug in radon transform? In-Reply-To: References: <20120404213149.GC7717@phare.normalesup.org> <20120409164158.GA20175@phare.normalesup.org> <087441d4-cc9d-4ed0-9a13-aa757a85557f@googlegroups.com> <720c8af2-b51e-4ad7-adb7-4947cb4f331f@googlegroups.com> Message-ID: Thanks, Stefan. I changed the code to work with the same angle set - work fine. Thanks a lot. Casper On Monday, July 9, 2012 11:31:01 AM UTC-7, Stefan van der Walt wrote: > > Hi Casper > > There is a bug in the modified version of the example. You compute > "projections" twice, but the second time without specifying the > angles. I.e., by default the 180 directions are used. You then try > to reconstruct from that, but specifying the incorrect angles. > > Here's a pull request to raise a better message when this happens: > > https://github.com/scikits-image/scikits-image/pull/211 > > St?fan > > On Mon, Jul 9, 2012 at 9:55 AM, casper wrote: > > Here is the code, that I took from the skimage gallery: > -------------- next part -------------- An HTML attachment was scrubbed... URL: From deshpande.jaidev at gmail.com Mon Jul 9 07:26:24 2012 From: deshpande.jaidev at gmail.com (Jaidev Deshpande) Date: Mon, 9 Jul 2012 16:56:24 +0530 Subject: Stereograms In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 2:17 PM, St?fan van der Walt wrote: > Know how to view stereograms? Then you'd enjoy this! > > http://mentat.za.net/refer/stereogram_skimage.png > > Generated with the work-in-progress stereogram branch (test script attached): > > https://github.com/stefanv/scikits-image/tree/stereogram > > St?fan Hi, This is seriously cool... Just to make sure - is it a stereogram of the skimage logo? From stefan at sun.ac.za Tue Jul 10 01:20:17 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Mon, 9 Jul 2012 22:20:17 -0700 Subject: Challenge: chessboard corners Message-ID: Our implementation of Canny edge detection and the Hough Transform should help to beat the following challenge: http://stackoverflow.com/questions/10196198/how-to-remove-convexity-defects-in-sudoku-square/11366549#11366549 From siggin at gmail.com Tue Jul 10 09:35:07 2012 From: siggin at gmail.com (Sigmund) Date: Tue, 10 Jul 2012 06:35:07 -0700 (PDT) Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> <7c828132-079d-44bd-a9a8-830138a373a8@googlegroups.com> <249edbc5-df1c-4628-9df3-c9905910737c@googlegroups.com> Message-ID: <4c4b9357-8722-4644-b8f1-0eaf5d0a9fc9@googlegroups.com> Hey! Whil writing the test code I found out that saving the array by itself doesn't cause the error. Only after summing two arrays it fails. import numpy as np import skimage.io as io io.use_plugin("freeimage", "imread") one = np.ones([2048,2048],dtype=np.int32) two = np.zeros([2048,2048],dtype=np.int32) summation = one + two io.imsave("test.tif",summation, plugin="freeimage") not using the freeimage plugin in not failing. Siggi -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Tue Jul 10 09:47:21 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 10 Jul 2012 09:47:21 -0400 Subject: error in skimage.feature.hog In-Reply-To: References: Message-ID: On Tue, Jul 10, 2012 at 9:31 AM, Damian Eads wrote: > Hi, > > I'm very impressed with the progress made on scikits since its > inception in 2009. I checked out the latest skimage from Git and tried > running the HoG code on a non-square image, but it returns an error. > Moreover, if I don't convert from RGB to gray, I get a shape mismatch > error. In the latter case, a more user-friendly error message would > be more informative. Alternatively, you can either convert it to > grayscale or compute a gradient image for each channel and for each > pixel use the largest. > > Here is how to reproduce the error: > > In [1]: import skimage.color > > In [2]: import skimage.data > ** Message: pygobject_register_sinkfunc is deprecated (GstObject) > > In [3]: import skimage.feature > > In [4]: I=skimage.data.imread("motorbikes041.png") # see attached > > In [5]: I2=skimage.color.rgb2gray(I) > > In [6]: print I2.shape, I2.dtype > (150, 200) float64 > > In [7]: skimage.feature.hog(I2) > --------------------------------------------------------------------------- > ValueError Traceback (most recent call last) > > /data/repo/scikits-image/skimage/ in () > > > /usr/local/lib/python2.6/dist-packages/scikits_image-0.7dev-py2.6-linux-i686.egg/skimage/feature/hog.pyc > in hog(image, orientations, pixels_per_cell, cells_per_block, > visualise, normalise) > 121 > 122 orientation_histogram[:, :, i] = uniform_filter(temp_mag, > --> 123 size=(cy, cx))[cy / 2::cy, cx / 2::cx] > 124 > 125 # now for each cell, compute the histogram > > > ValueError: shape mismatch: objects cannot be broadcast to a single shape > > -------------- > > However, if I select a square subarray, it works fine. > > In [8]: x=skimage.feature.hog(I2[:128,:128]) > > Thanks, > > Damian > > Actually, I get a different error: ValueError: could not broadcast input array from shape (19,25) into shape (18,25) In this case, it's not a problem with non-square images, but something to do with how images are sampled. Your 150 x 200 image gives the error above, but a 148 x 200 image works fine. I won't have time to look at this right now, but this behavior might be a clue for someone else who does have time. As for the color/grayscale issue, I've been thinking that it would be good to have an `@grayscale` function decorator that checks whether an image is rgb/rgba and either raises an error or warns & converts. I haven't gotten around to implementing it yet, but it should be fairly simple. Cheers, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.gouillart at nsup.org Tue Jul 10 04:16:28 2012 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Tue, 10 Jul 2012 10:16:28 +0200 Subject: Euroscipy 2012: early bird registration ending soon Message-ID: <20120710081628.GD23990@phare.normalesup.org> Hello, early bird registration for Euroscipy 2012 is soon coming to an end, with the deadline on July 22nd. Don't forget to register soon! Reduced fees are available for academics, students and speakers. Registration takes place online on http://www.euroscipy.org/conference/euroscipy2012. Euroscipy 2012 is the annual European conference for scientists using the Python language. It will be held August 23-27 2012 in Brussels, Belgium. Our program has been online for a few weeks now: we're very excited to have a great selection of tutorials, as well as talks and poster presentations. During the two days of tutorials (August 23 and 24), it will possible to attend either the introduction track, or the advanced track, or to combine both tracks (see http://www.euroscipy.org/track/6538?tab=tracktalkslist and http://www.euroscipy.org/track/6539?tab=tracktalkslist). As for the highlights of the two days of conference (August 25 and 26), we are very happy to have David Beazley (http://www.dabeaz.com) and Eric Jones (http://www.enthought.com/company/support-team.php) as our keynote speakers. The list of talks is available on http://www.euroscipy.org/track/6540?tab=tracktalkslist, with subjects ranging from extension programming to machine learning, or cellular biology. We're looking forward to exciting discussions during the talk sessions or around the posters, as happened during the previous editions of Euroscipy! Sprints may be organized at the conference venue during the days following the conference, from Monday 27th on. Since there is a limited number of rooms booked for the sprints, please contact the organizers by July 22 if you intend to organize one. Two sprints are already planned by the scikit-learn and the scikits-image teams. The EuroSciPy 2012 conference will feature a best talk, a best poster and a jury award. All conference participants will be given the opportunity to cast a vote for the best talk and best poster awards while the jury award is selected by the members of the program committee. Each prize consists of a Commercial Use license for Wing IDE Professional, an integrated development environment designed specifically for Python programmers. The licenses are generously donated by Wingware. Financial support may be granted by Numfocus to a small number of eligible students. See http://www.euroscipy.org/card/euroscipy2012_support_numfocus for more details on how to apply. For information that cannot be found on the conference website, please contact the organizing team at org-team at lists.euroscipy.org Cheers, Emmanuelle, for the organizing team From dre25 at cam.ac.uk Tue Jul 10 09:31:33 2012 From: dre25 at cam.ac.uk (Damian Eads) Date: Tue, 10 Jul 2012 14:31:33 +0100 Subject: error in skimage.feature.hog Message-ID: Hi, I'm very impressed with the progress made on scikits since its inception in 2009. I checked out the latest skimage from Git and tried running the HoG code on a non-square image, but it returns an error. Moreover, if I don't convert from RGB to gray, I get a shape mismatch error. In the latter case, a more user-friendly error message would be more informative. Alternatively, you can either convert it to grayscale or compute a gradient image for each channel and for each pixel use the largest. Here is how to reproduce the error: In [1]: import skimage.color In [2]: import skimage.data ** Message: pygobject_register_sinkfunc is deprecated (GstObject) In [3]: import skimage.feature In [4]: I=skimage.data.imread("motorbikes041.png") # see attached In [5]: I2=skimage.color.rgb2gray(I) In [6]: print I2.shape, I2.dtype (150, 200) float64 In [7]: skimage.feature.hog(I2) --------------------------------------------------------------------------- ValueError Traceback (most recent call last) /data/repo/scikits-image/skimage/ in () /usr/local/lib/python2.6/dist-packages/scikits_image-0.7dev-py2.6-linux-i686.egg/skimage/feature/hog.pyc in hog(image, orientations, pixels_per_cell, cells_per_block, visualise, normalise) 121 122 orientation_histogram[:, :, i] = uniform_filter(temp_mag, --> 123 size=(cy, cx))[cy / 2::cy, cx / 2::cx] 124 125 # now for each cell, compute the histogram ValueError: shape mismatch: objects cannot be broadcast to a single shape -------------- However, if I select a square subarray, it works fine. In [8]: x=skimage.feature.hog(I2[:128,:128]) Thanks, Damian -- Damian Eads, PhD Research Associate, Machine Intelligence Laboratory Engineering Department, University of Cambridge Trumpington Street, Cambridge, CB2 1PZ, ENGLAND Web: http://mi.eng.cam.ac.uk/~dre25 -------------- next part -------------- A non-text attachment was scrubbed... Name: motorbikes041.png Type: image/png Size: 59756 bytes Desc: not available URL: From stefan at sun.ac.za Tue Jul 10 17:38:06 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 10 Jul 2012 14:38:06 -0700 Subject: error in skimage.feature.hog In-Reply-To: References: Message-ID: On Tue, Jul 10, 2012 at 6:47 AM, Tony Yu wrote: >> Here is how to reproduce the error: Damian, I'm also tied up until Thursday, but I'll have a look at it ASAP. > As for the color/grayscale issue, I've been thinking that it would be good > to have an `@grayscale` function decorator that checks whether an image is > rgb/rgba and either raises an error or warns & converts. I haven't gotten > around to implementing it yet, but it should be fairly simple. Great idea... The easier we can make it to build robust pipelines, the better! The conversion routines have already come a long way, but I am very much in favour of more such enhancements. St?fan From bdholt1 at gmail.com Tue Jul 10 17:45:22 2012 From: bdholt1 at gmail.com (Brian Holt) Date: Tue, 10 Jul 2012 22:45:22 +0100 Subject: error in skimage.feature.hog In-Reply-To: References: Message-ID: I've had a quick look and I can reproduce the bug. It seems to be a discrepancy between integer division to compute the number of cells and then subsampling the array which gives a different dimensions. Hopefully I'll have a better idea tomorrow. On Jul 10, 2012 10:38 PM, "St?fan van der Walt" wrote: > > On Tue, Jul 10, 2012 at 6:47 AM, Tony Yu wrote: > >> Here is how to reproduce the error: > > Damian, I'm also tied up until Thursday, but I'll have a look at it ASAP. > > > As for the color/grayscale issue, I've been thinking that it would be good > > to have an `@grayscale` function decorator that checks whether an image is > > rgb/rgba and either raises an error or warns & converts. I haven't gotten > > around to implementing it yet, but it should be fairly simple. > > Great idea... The easier we can make it to build robust pipelines, the > better! The conversion routines have already come a long way, but I > am very much in favour of more such enhancements. > > St?fan -------------- next part -------------- An HTML attachment was scrubbed... URL: From otto.fajardob at gmail.com Wed Jul 11 05:14:40 2012 From: otto.fajardob at gmail.com (Otto) Date: Wed, 11 Jul 2012 02:14:40 -0700 (PDT) Subject: gstreamer Message-ID: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Hi, I would like to try the Video function in skimage.io. I installed gstreamer, toghether with gstreamer sdk providing the python bindings. So, when I say import pygst from python console, it does not complain. However, trying to use the Video function like this: myvideo = skio.Video(source=source,backend='gstreamer') gives this error message: Traceback (most recent call last): File "", line 1, in cuco = skio.Video(source=source,backend='gstreamer') File "C:\Python26\lib\site-packages\skimage\io\video.py", line 264, in __init__ self.video = GstVideo(source, size, sync) File "C:\Python26\lib\site-packages\skimage\io\video.py", line 124, in __init__ raise ImportError("GStreamer Python bindings 0.10+ required") ImportError: GStreamer Python bindings 0.10+ required So: how to install properly these python bindings for gstreamer??? By the way: Is this module appropiate to open a video file, let's say an avi file, that is compressed using for example with XViD, and then retrieve single frames as numpy arrays? thanks! From zachary.pincus at yale.edu Wed Jul 11 08:50:11 2012 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Wed, 11 Jul 2012 08:50:11 -0400 Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <4c4b9357-8722-4644-b8f1-0eaf5d0a9fc9@googlegroups.com> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> <7c828132-079d-44bd-a9a8-830138a373a8@googlegroups.com> <249edbc5-df1c-4628-9df3-c9905910737c@googlegroups.com> <4c4b9357-8722-4644-b8f1-0eaf5d0a9fc9@googlegroups.com> Message-ID: <644E1318-06A2-4F08-AFA8-ACA25004D1EB@yale.edu> I wonder if this has to do with the type-promotion behavior changes in a recent numpy version? What is the dtype of "summation" below? On Jul 10, 2012, at 9:35 AM, Sigmund wrote: > Hey! > > Whil writing the test code I found out that saving the array by itself doesn't cause the error. Only after summing two arrays it fails. > > import numpy as np > import skimage.io as io > io.use_plugin("freeimage", "imread") > one = np.ones([2048,2048],dtype=np.int32) > two = np.zeros([2048,2048],dtype=np.int32) > summation = one + two > io.imsave("test.tif",summation, plugin="freeimage") > > not using the freeimage plugin in not failing. > > Siggi From dre25 at cam.ac.uk Wed Jul 11 10:20:44 2012 From: dre25 at cam.ac.uk (Damian Eads) Date: Wed, 11 Jul 2012 15:20:44 +0100 Subject: error in skimage.feature.hog In-Reply-To: References: Message-ID: Thank you for looking into the bug. On another note, it'd be great if there was an option to turn off the flattening of the histogram. Damian On Tue, Jul 10, 2012 at 10:45 PM, Brian Holt wrote: > I've had a quick look and I can reproduce the bug. It seems to be a > discrepancy between integer division to compute the number of cells and then > subsampling the array which gives a different dimensions. Hopefully I'll > have a better idea tomorrow. > > On Jul 10, 2012 10:38 PM, "St?fan van der Walt" wrote: >> >> On Tue, Jul 10, 2012 at 6:47 AM, Tony Yu wrote: >> >> Here is how to reproduce the error: >> >> Damian, I'm also tied up until Thursday, but I'll have a look at it ASAP. >> >> > As for the color/grayscale issue, I've been thinking that it would be >> > good >> > to have an `@grayscale` function decorator that checks whether an image >> > is >> > rgb/rgba and either raises an error or warns & converts. I haven't >> > gotten >> > around to implementing it yet, but it should be fairly simple. >> >> Great idea... The easier we can make it to build robust pipelines, the >> better! The conversion routines have already come a long way, but I >> am very much in favour of more such enhancements. >> >> St?fan From bdholt1 at gmail.com Wed Jul 11 10:37:12 2012 From: bdholt1 at gmail.com (Brian Holt) Date: Wed, 11 Jul 2012 15:37:12 +0100 Subject: error in skimage.feature.hog In-Reply-To: References: Message-ID: Hi Damian, Here is a link to the pull request I've created to fix the bug https://github.com/scikits-image/scikits-image/pull/213 You make a good point about the form of the resulting vector. I would be quite happy to return a hierarchical (unraveled) ndarray and make it the responsibility of the user to ravel it if they so wish. Comments from others? Brian On 11 July 2012 15:20, Damian Eads wrote: > Thank you for looking into the bug. On another note, it'd be great if > there was an option to turn off the flattening of the histogram. > > Damian > > On Tue, Jul 10, 2012 at 10:45 PM, Brian Holt wrote: > > I've had a quick look and I can reproduce the bug. It seems to be a > > discrepancy between integer division to compute the number of cells and > then > > subsampling the array which gives a different dimensions. Hopefully I'll > > have a better idea tomorrow. > > > > On Jul 10, 2012 10:38 PM, "St?fan van der Walt" > wrote: > >> > >> On Tue, Jul 10, 2012 at 6:47 AM, Tony Yu wrote: > >> >> Here is how to reproduce the error: > >> > >> Damian, I'm also tied up until Thursday, but I'll have a look at it > ASAP. > >> > >> > As for the color/grayscale issue, I've been thinking that it would be > >> > good > >> > to have an `@grayscale` function decorator that checks whether an > image > >> > is > >> > rgb/rgba and either raises an error or warns & converts. I haven't > >> > gotten > >> > around to implementing it yet, but it should be fairly simple. > >> > >> Great idea... The easier we can make it to build robust pipelines, the > >> better! The conversion routines have already come a long way, but I > >> am very much in favour of more such enhancements. > >> > >> St?fan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Thu Jul 12 00:24:10 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Thu, 12 Jul 2012 00:24:10 -0400 Subject: gstreamer In-Reply-To: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> References: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Message-ID: Hi Otto, See response below. On Wed, Jul 11, 2012 at 5:14 AM, Otto wrote: > Hi, > I would like to try the Video function in skimage.io. I installed > gstreamer, toghether with gstreamer sdk providing the python bindings. > So, when I say import pygst from python console, it does not complain. > However, trying to use the Video function like this: > > myvideo = skio.Video(source=source,backend='gstreamer') > > gives this error message: > > > raise ImportError("GStreamer Python bindings 0.10+ required") > ImportError: GStreamer Python bindings 0.10+ required > > So: how to install properly these python bindings for gstreamer??? > What system are you running and how did you install GStreamer? I don't actually have GStreamer installed, so my usefulness here is limited. Looking at the code though, I'm not sure it's actually failing on the version check (which I think raises an Assertion error, but the caught exception is an ImportError). Could you try running the following imports: import gst import gobject from gst.extend.discoverer import Discoverer > > By the way: Is this module appropiate to open a video file, let's say > an avi file, that is compressed using for example with XViD, and then > retrieve single frames as numpy arrays? > > thanks! If GStreamer can read it, then the video plugin should be able to as well. Yes, you can access a frame with the video's `get` method (which returns a numpy array). You can also use the video functionality by using OpenCV as a backend (but that could be difficult to install, depending on your system). Cheers, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From siggin at gmail.com Thu Jul 12 08:41:58 2012 From: siggin at gmail.com (Sigmund) Date: Thu, 12 Jul 2012 05:41:58 -0700 (PDT) Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <644E1318-06A2-4F08-AFA8-ACA25004D1EB@yale.edu> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> <7c828132-079d-44bd-a9a8-830138a373a8@googlegroups.com> <249edbc5-df1c-4628-9df3-c9905910737c@googlegroups.com> <4c4b9357-8722-4644-b8f1-0eaf5d0a9fc9@googlegroups.com> <644E1318-06A2-4F08-AFA8-ACA25004D1EB@yale.edu> Message-ID: <33d32c1f-9310-4319-a256-39f8eb09b2a3@googlegroups.com> On Wednesday, July 11, 2012 2:50:11 PM UTC+2, Zachary Pincus wrote: > > I wonder if this has to do with the type-promotion behavior changes in a > recent numpy version? What is the dtype of "summation" below? > > two.dtype and summation.dtype return "int32" .dtype.type is returning "" in both cases. I just tried it on a diffrent PC. Same problem on a Win32 XP 32bit system with EPD 7.2-2 Python 2.7.2 In summary. It is working on : Python 2.7.1 |EPD 7.0-2 (32-bit)| Win 7 32 Python 2.7.2 |EPD 7.2-2 (64-bit)| Mac OSX And not working on: Python 2.7.3 |EPD 7.3-1 (64-bit)| Win 7 64 Python 2.7.2 IEPD 7.2-2 (32-bit)| Win XP > > On Jul 10, 2012, at 9:35 AM, Sigmund wrote: > > > Hey! > > > > Whil writing the test code I found out that saving the array by itself > doesn't cause the error. Only after summing two arrays it fails. > > > > import numpy as np > > import skimage.io as io > > io.use_plugin("freeimage", "imread") > > one = np.ones([2048,2048],dtype=np.int32) > > two = np.zeros([2048,2048],dtype=np.int32) > > summation = one + two > > io.imsave("test.tif",summation, plugin="freeimage") > > > > not using the freeimage plugin in not failing. > > > > Siggi > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachary.pincus at yale.edu Thu Jul 12 10:09:24 2012 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Thu, 12 Jul 2012 10:09:24 -0400 Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <33d32c1f-9310-4319-a256-39f8eb09b2a3@googlegroups.com> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> <7c828132-079d-44bd-a9a8-830138a373a8@googlegroups.com> <249edbc5-df1c-4628-9df3-c9905910737c@googlegroups.com> <4c4b9357-8722-4644-b8f1-0eaf5d0a9fc9@googlegroups.com> <644E1318-06A2-4F08-AFA8-ACA25004D1EB@yale.edu> <33d32c1f-9310-4319-a256-39f8eb09b2a3@googlegroups.com> Message-ID: <553085EF-017C-4C81-92C0-11D52AB03C91@yale.edu> This is very curious. You have two arrays of identical dtype (that is, "two" and "summation"), and one can be saved via freeimage yet the other cannot? Is this correct? Hopefully someone can try to verify this. Strange, too, that it would fail on XP but work on Win 7 32-bit. Perhaps that's a red herring and it has to do with the EPD version? On Jul 12, 2012, at 8:41 AM, Sigmund wrote: > > > On Wednesday, July 11, 2012 2:50:11 PM UTC+2, Zachary Pincus wrote: > I wonder if this has to do with the type-promotion behavior changes in a recent numpy version? What is the dtype of "summation" below? > > two.dtype and summation.dtype return "int32" .dtype.type is returning "" in both cases. > I just tried it on a diffrent PC. Same problem on a Win32 XP 32bit system with EPD 7.2-2 Python 2.7.2 > > In summary. > It is working on : > Python 2.7.1 |EPD 7.0-2 (32-bit)| Win 7 32 > Python 2.7.2 |EPD 7.2-2 (64-bit)| Mac OSX > And not working on: > Python 2.7.3 |EPD 7.3-1 (64-bit)| Win 7 64 > Python 2.7.2 IEPD 7.2-2 (32-bit)| Win XP > > On Jul 10, 2012, at 9:35 AM, Sigmund wrote: > > > Hey! > > > > Whil writing the test code I found out that saving the array by itself doesn't cause the error. Only after summing two arrays it fails. > > > > import numpy as np > > import skimage.io as io > > io.use_plugin("freeimage", "imread") > > one = np.ones([2048,2048],dtype=np.int32) > > two = np.zeros([2048,2048],dtype=np.int32) > > summation = one + two > > io.imsave("test.tif",summation, plugin="freeimage") > > > > not using the freeimage plugin in not failing. > > > > Siggi > > From cjgohlke at gmail.com Thu Jul 12 13:39:52 2012 From: cjgohlke at gmail.com (Christoph Gohlke) Date: Thu, 12 Jul 2012 10:39:52 -0700 Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <553085EF-017C-4C81-92C0-11D52AB03C91@yale.edu> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> <80177350-2ca8-45a4-94c4-bf43bcad7e44@googlegroups.com> <7c828132-079d-44bd-a9a8-830138a373a8@googlegroups.com> <249edbc5-df1c-4628-9df3-c9905910737c@googlegroups.com> <4c4b9357-8722-4644-b8f1-0eaf5d0a9fc9@googlegroups.com> <644E1318-06A2-4F08-AFA8-ACA25004D1EB@yale.edu> <33d32c1f-9310-4319-a256-39f8eb09b2a3@googlegroups.com> <553085EF-017C-4C81-92C0-11D52AB03C91@yale.edu> Message-ID: <4FFF0BE8.5080409@gmail.com> The freeimage plugin is comparing numpy's dtype.type (not dtype), which apparently does not work in this case: import numpy as np one = np.ones([2048,2048],dtype=np.int32) two = np.zeros([2048,2048],dtype=np.int32) summation = one + two assert repr(summation.dtype) == repr(one.dtype) assert summation.dtype == one.dtype assert hash(summation.dtype) == hash(one.dtype) assert repr(summation.dtype.type) == repr(one.dtype.type) assert summation.dtype.type != one.dtype.type assert hash(summation.dtype.type) != hash(one.dtype.type) I submitted a PR at Christoph On 7/12/2012 7:09 AM, Zachary Pincus wrote: > This is very curious. You have two arrays of identical dtype (that is, "two" and "summation"), and one can be saved via freeimage yet the other cannot? Is this correct? > > Hopefully someone can try to verify this. Strange, too, that it would fail on XP but work on Win 7 32-bit. Perhaps that's a red herring and it has to do with the EPD version? > > > On Jul 12, 2012, at 8:41 AM, Sigmund wrote: > >> >> >> On Wednesday, July 11, 2012 2:50:11 PM UTC+2, Zachary Pincus wrote: >> I wonder if this has to do with the type-promotion behavior changes in a recent numpy version? What is the dtype of "summation" below? >> >> two.dtype and summation.dtype return "int32" .dtype.type is returning "" in both cases. >> I just tried it on a diffrent PC. Same problem on a Win32 XP 32bit system with EPD 7.2-2 Python 2.7.2 >> >> In summary. >> It is working on : >> Python 2.7.1 |EPD 7.0-2 (32-bit)| Win 7 32 >> Python 2.7.2 |EPD 7.2-2 (64-bit)| Mac OSX >> And not working on: >> Python 2.7.3 |EPD 7.3-1 (64-bit)| Win 7 64 >> Python 2.7.2 IEPD 7.2-2 (32-bit)| Win XP >> >> On Jul 10, 2012, at 9:35 AM, Sigmund wrote: >> >>> Hey! >>> >>> Whil writing the test code I found out that saving the array by itself doesn't cause the error. Only after summing two arrays it fails. >>> >>> import numpy as np >>> import skimage.io as io >>> io.use_plugin("freeimage", "imread") >>> one = np.ones([2048,2048],dtype=np.int32) >>> two = np.zeros([2048,2048],dtype=np.int32) >>> summation = one + two >>> io.imsave("test.tif",summation, plugin="freeimage") >>> >>> not using the freeimage plugin in not failing. >>> >>> Siggi >> >> > > > From bdholt1 at gmail.com Thu Jul 12 06:00:40 2012 From: bdholt1 at gmail.com (Brian Holt) Date: Thu, 12 Jul 2012 11:00:40 +0100 Subject: gstreamer In-Reply-To: References: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Message-ID: I've been using Pyglet to do the same job... Here is a gist: gist.github.com/3097115 If its useful, I could put in a PR. Brian On 12 July 2012 10:31, Otto Fajardo wrote: > Hi Tony, > > thanks very much for your reply! I solved the problem and found a couple > of things that can be useful for other users: > > 1- I am using Windows XP. > > 2- I didn't manage to property install gstreamer. I fail to import > critical modules. No idea why. > > 3- Opencv works! The interesting thing is that it needs pygtk module to be > installed. > > In the past I already tried opencv for this purpose and failed. While > trying to install gstreamer I install pygtk, and now it works > fine, both using scikits and opencv itself!!! > Windows binaries for both opencv and pygtk can be obtained from > Christoph Gohlke webpage, so it's quite easy to install. > I think you could mention this in your webpage, could be useful for > future users. > > 4- I found something I think is a but, and I have a suggestion: > > * Bug: the method duration is not working well, it gives strange > results to me. The problem is in video.py line 107. I replace this line by > return cv.GetCaptureProperty(self.capture, > cv.CV_CAP_PROP_FRAME_COUNT)/cv.GetCaptureProperty(self.capture, > cv.CV_CAP_PROP_FPS) > and now works fine. > > * Suggestion: implement a method to directly obtain fps from the video. > It's quite easy, will be 2 minutes: > I added two funtions in video.py, one in classs CvVideo: > def fps(self): > > return cv.GetCaptureProperty(self.capture, cv.CV_CAP_PROP_FPS) > > and another in class Video: > > def fps(self): > > return self.video.fps() > > > > I think this is useful. > > > > Cheers! > > > > > 2012/7/12 Tony Yu > >> Hi Otto, >> >> See response below. >> >> On Wed, Jul 11, 2012 at 5:14 AM, Otto wrote: >> >>> Hi, >>> I would like to try the Video function in skimage.io. I installed >>> gstreamer, toghether with gstreamer sdk providing the python bindings. >>> So, when I say import pygst from python console, it does not complain. >>> However, trying to use the Video function like this: >>> >>> myvideo = skio.Video(source=source,backend='gstreamer') >>> >>> gives this error message: >>> >>> >> >> >> >>> raise ImportError("GStreamer Python bindings 0.10+ required") >>> ImportError: GStreamer Python bindings 0.10+ required >>> >>> So: how to install properly these python bindings for gstreamer??? >>> >> >> What system are you running and how did you install GStreamer? >> >> I don't actually have GStreamer installed, so my usefulness here is >> limited. Looking at the code though, I'm not sure it's actually failing on >> the version check (which I think raises an Assertion error, but the caught >> exception is an ImportError). >> >> Could you try running the following imports: >> >> import gst >> import gobject >> from gst.extend.discoverer import Discoverer >> >> >> >>> >>> By the way: Is this module appropiate to open a video file, let's say >>> an avi file, that is compressed using for example with XViD, and then >>> retrieve single frames as numpy arrays? >>> >>> thanks! >> >> >> If GStreamer can read it, then the video plugin should be able to as >> well. Yes, you can access a frame with the video's `get` method (which >> returns a numpy array). >> >> You can also use the video functionality by using OpenCV as a backend >> (but that could be difficult to install, depending on your system). >> >> Cheers, >> -Tony >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From otto.fajardob at gmail.com Thu Jul 12 05:31:26 2012 From: otto.fajardob at gmail.com (Otto Fajardo) Date: Thu, 12 Jul 2012 11:31:26 +0200 Subject: gstreamer In-Reply-To: References: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Message-ID: Hi Tony, thanks very much for your reply! I solved the problem and found a couple of things that can be useful for other users: 1- I am using Windows XP. 2- I didn't manage to property install gstreamer. I fail to import critical modules. No idea why. 3- Opencv works! The interesting thing is that it needs pygtk module to be installed. In the past I already tried opencv for this purpose and failed. While trying to install gstreamer I install pygtk, and now it works fine, both using scikits and opencv itself!!! Windows binaries for both opencv and pygtk can be obtained from Christoph Gohlke webpage, so it's quite easy to install. I think you could mention this in your webpage, could be useful for future users. 4- I found something I think is a but, and I have a suggestion: * Bug: the method duration is not working well, it gives strange results to me. The problem is in video.py line 107. I replace this line by return cv.GetCaptureProperty(self.capture, cv.CV_CAP_PROP_FRAME_COUNT)/cv.GetCaptureProperty(self.capture, cv.CV_CAP_PROP_FPS) and now works fine. * Suggestion: implement a method to directly obtain fps from the video. It's quite easy, will be 2 minutes: I added two funtions in video.py, one in classs CvVideo: def fps(self): return cv.GetCaptureProperty(self.capture, cv.CV_CAP_PROP_FPS) and another in class Video: def fps(self): return self.video.fps() I think this is useful. Cheers! 2012/7/12 Tony Yu > Hi Otto, > > See response below. > > On Wed, Jul 11, 2012 at 5:14 AM, Otto wrote: > >> Hi, >> I would like to try the Video function in skimage.io. I installed >> gstreamer, toghether with gstreamer sdk providing the python bindings. >> So, when I say import pygst from python console, it does not complain. >> However, trying to use the Video function like this: >> >> myvideo = skio.Video(source=source,backend='gstreamer') >> >> gives this error message: >> >> > > > >> raise ImportError("GStreamer Python bindings 0.10+ required") >> ImportError: GStreamer Python bindings 0.10+ required >> >> So: how to install properly these python bindings for gstreamer??? >> > > What system are you running and how did you install GStreamer? > > I don't actually have GStreamer installed, so my usefulness here is > limited. Looking at the code though, I'm not sure it's actually failing on > the version check (which I think raises an Assertion error, but the caught > exception is an ImportError). > > Could you try running the following imports: > > import gst > import gobject > from gst.extend.discoverer import Discoverer > > > >> >> By the way: Is this module appropiate to open a video file, let's say >> an avi file, that is compressed using for example with XViD, and then >> retrieve single frames as numpy arrays? >> >> thanks! > > > If GStreamer can read it, then the video plugin should be able to as well. > Yes, you can access a frame with the video's `get` method (which returns a > numpy array). > > You can also use the video functionality by using OpenCV as a backend (but > that could be difficult to install, depending on your system). > > Cheers, > -Tony > -------------- next part -------------- An HTML attachment was scrubbed... URL: From otto.fajardob at gmail.com Thu Jul 12 06:38:24 2012 From: otto.fajardob at gmail.com (Otto Fajardo) Date: Thu, 12 Jul 2012 12:38:24 +0200 Subject: gstreamer In-Reply-To: References: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Message-ID: I don't remember very well, but I think that one disadvantage of pyglet could be that it does not allow to seek precisely to a frame number, but it does seeking with time or something like this, that happens to be not very precise. For my application I need to retrieve a frame in the sequence with precision ... By the way, there is also ffms, based in ffmpegsource, and also does the job. This for python 2.7, for 2.6 there is pyffmpeg. 2012/7/12 Brian Holt > I've been using Pyglet to do the same job... Here is a gist: > gist.github.com/3097115 > > If its useful, I could put in a PR. > > Brian > > > On 12 July 2012 10:31, Otto Fajardo wrote: > >> Hi Tony, >> >> thanks very much for your reply! I solved the problem and found a couple >> of things that can be useful for other users: >> >> 1- I am using Windows XP. >> >> 2- I didn't manage to property install gstreamer. I fail to import >> critical modules. No idea why. >> >> 3- Opencv works! The interesting thing is that it needs pygtk module to >> be installed. >> >> In the past I already tried opencv for this purpose and failed. While >> trying to install gstreamer I install pygtk, and now it works >> fine, both using scikits and opencv itself!!! >> Windows binaries for both opencv and pygtk can be obtained from >> Christoph Gohlke webpage, so it's quite easy to install. >> I think you could mention this in your webpage, could be useful for >> future users. >> >> 4- I found something I think is a but, and I have a suggestion: >> >> * Bug: the method duration is not working well, it gives strange >> results to me. The problem is in video.py line 107. I replace this line by >> return cv.GetCaptureProperty(self.capture, >> cv.CV_CAP_PROP_FRAME_COUNT)/cv.GetCaptureProperty(self.capture, >> cv.CV_CAP_PROP_FPS) >> and now works fine. >> >> * Suggestion: implement a method to directly obtain fps from the video. >> It's quite easy, will be 2 minutes: >> I added two funtions in video.py, one in classs CvVideo: >> def fps(self): >> >> return cv.GetCaptureProperty(self.capture, cv.CV_CAP_PROP_FPS) >> >> and another in class Video: >> >> def fps(self): >> >> return self.video.fps() >> >> >> >> I think this is useful. >> >> >> >> Cheers! >> >> >> >> >> 2012/7/12 Tony Yu >> >>> Hi Otto, >>> >>> See response below. >>> >>> On Wed, Jul 11, 2012 at 5:14 AM, Otto wrote: >>> >>>> Hi, >>>> I would like to try the Video function in skimage.io. I installed >>>> gstreamer, toghether with gstreamer sdk providing the python bindings. >>>> So, when I say import pygst from python console, it does not complain. >>>> However, trying to use the Video function like this: >>>> >>>> myvideo = skio.Video(source=source,backend='gstreamer') >>>> >>>> gives this error message: >>>> >>>> >>> >>> >>> >>>> raise ImportError("GStreamer Python bindings 0.10+ required") >>>> ImportError: GStreamer Python bindings 0.10+ required >>>> >>>> So: how to install properly these python bindings for gstreamer??? >>>> >>> >>> What system are you running and how did you install GStreamer? >>> >>> I don't actually have GStreamer installed, so my usefulness here is >>> limited. Looking at the code though, I'm not sure it's actually failing on >>> the version check (which I think raises an Assertion error, but the caught >>> exception is an ImportError). >>> >>> Could you try running the following imports: >>> >>> import gst >>> import gobject >>> from gst.extend.discoverer import Discoverer >>> >>> >>> >>>> >>>> By the way: Is this module appropiate to open a video file, let's say >>>> an avi file, that is compressed using for example with XViD, and then >>>> retrieve single frames as numpy arrays? >>>> >>>> thanks! >>> >>> >>> If GStreamer can read it, then the video plugin should be able to as >>> well. Yes, you can access a frame with the video's `get` method (which >>> returns a numpy array). >>> >>> You can also use the video functionality by using OpenCV as a backend >>> (but that could be difficult to install, depending on your system). >>> >>> Cheers, >>> -Tony >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Thu Jul 12 16:54:01 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Thu, 12 Jul 2012 13:54:01 -0700 Subject: gstreamer In-Reply-To: References: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Message-ID: On Thu, Jul 12, 2012 at 11:37 AM, Tony Yu wrote: > Brian: I think a Pyglet plugin would be useful even if it has the problems Any ideas on how this could slot in to the current plugin API? St?fan From stefan at sun.ac.za Thu Jul 12 16:57:11 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Thu, 12 Jul 2012 13:57:11 -0700 Subject: SciPy2012 Sprint Message-ID: Hi everyone, We will have a scikits-image sprint at SciPy2012 next week in Austin. Since the sprint page has just gone up: http://conference.scipy.org/scipy2012/sprints/index.php Let's discuss some additions that we can work on... Suggestions? St?fan From tsyu80 at gmail.com Thu Jul 12 14:37:00 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Thu, 12 Jul 2012 14:37:00 -0400 Subject: gstreamer In-Reply-To: References: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Message-ID: On Thu, Jul 12, 2012 at 6:38 AM, Otto Fajardo wrote: > I don't remember very well, but I think that one disadvantage of pyglet > could be that it does not allow to seek precisely to a frame number, but it > does seeking with time or something like this, that happens to be not very > precise. For my application I need to retrieve a frame in the sequence with > precision ... > > By the way, there is also ffms, based in ffmpegsource, and also does the > job. This for python 2.7, for 2.6 there is pyffmpeg. > > > > > > 2012/7/12 Brian Holt > >> I've been using Pyglet to do the same job... Here is a gist: >> gist.github.com/3097115 >> >> If its useful, I could put in a PR. >> >> Brian >> > I think it would be great to have enhanced support for videos. Otto: I would definitely like to see ffmpeg support. Do you have any comments about the two wrappers in addition to version support? Brian: I think a Pyglet plugin would be useful even if it has the problems that Otto mentions. These video backends tend to be pretty difficult to install on certain systems, so anything to lower the barrier for entry would be good. -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Thu Jul 12 22:18:57 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Thu, 12 Jul 2012 22:18:57 -0400 Subject: gstreamer In-Reply-To: References: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Message-ID: On Thu, Jul 12, 2012 at 4:54 PM, St?fan van der Walt wrote: > On Thu, Jul 12, 2012 at 11:37 AM, Tony Yu wrote: > > Brian: I think a Pyglet plugin would be useful even if it has the > problems > > Any ideas on how this could slot in to the current plugin API? > > St?fan > Good point! If the number of video backends grows we should definitely be reusing the plugin infrastructure. I've only scanned the source for video support. Do you foresee any sticking points with adding video to the plugin framework? -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Thu Jul 12 22:47:00 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Thu, 12 Jul 2012 22:47:00 -0400 Subject: SciPy2012 Sprint In-Reply-To: <20120712214916.GB15076@phare.normalesup.org> References: <20120712214916.GB15076@phare.normalesup.org> Message-ID: On Thu, Jul 12, 2012 at 5:49 PM, Emmanuelle Gouillart < emmanuelle.gouillart at nsup.org> wrote: > Hi St?fan, > > on which day will the sprint take place? > > I could work (from Paris) on some improvements of random walker > segmentation (I have a PR almost ready), as well as on incorporating the > morphological reconstruction of cellprofiler. > > Cheers, > Emmanuelle > > > On Thu, Jul 12, 2012 at 01:57:11PM -0700, St?fan van der Walt wrote: > > Hi everyone, > > > We will have a scikits-image sprint at SciPy2012 next week in Austin. > > Since the sprint page has just gone up: > > > http://conference.scipy.org/scipy2012/sprints/index.php > > > Let's discuss some additions that we can work on... Suggestions? > > > St?fan > Emmanuelle: I have an *old* PR for morphological reconstruction (based on cellprofiler) if you want it. This is from before the scikits-image -> skimage rename, so it might not be that useful. As for ideas (some of these might not be feasible): * Updating the PR to add backends for different toolkits (OpenCL, OpenCV, etc) PR: https://github.com/scikits-image/scikits-image/pull/14 discussion: https://groups.google.com/forum/?fromgroups#!topic/scikits-image/DapafiVCJoU * Integrate video support into plugin framework (related: I think Stefan mentioned cleaning up the plugin framework as we were closing some bugs for the 0.6 release). * Additions to the User Guide (ideas for topics?) * Finally, I'd really like to see some tutorial-style examples, similar to the segmentation example: http://scikits-image.org/docs/dev/auto_examples/applications/plot_coins_segmentation.html Cheers! -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.gouillart at nsup.org Thu Jul 12 17:49:16 2012 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Thu, 12 Jul 2012 23:49:16 +0200 Subject: SciPy2012 Sprint In-Reply-To: References: Message-ID: <20120712214916.GB15076@phare.normalesup.org> Hi St??????fan, on which day will the sprint take place? I could work (from Paris) on some improvements of random walker segmentation (I have a PR almost ready), as well as on incorporating the morphological reconstruction of cellprofiler. Cheers, Emmanuelle On Thu, Jul 12, 2012 at 01:57:11PM -0700, St??????fan van der Walt wrote: > Hi everyone, > We will have a scikits-image sprint at SciPy2012 next week in Austin. > Since the sprint page has just gone up: > http://conference.scipy.org/scipy2012/sprints/index.php > Let's discuss some additions that we can work on... Suggestions? > St??????fan From tsyu80 at gmail.com Fri Jul 13 01:04:27 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Fri, 13 Jul 2012 01:04:27 -0400 Subject: SciPy2012 Sprint In-Reply-To: References: <20120712214916.GB15076@phare.normalesup.org> Message-ID: On Thu, Jul 12, 2012 at 10:47 PM, Tony Yu wrote: > > > On Thu, Jul 12, 2012 at 5:49 PM, Emmanuelle Gouillart < > emmanuelle.gouillart at nsup.org> wrote: > >> Hi St?fan, >> >> on which day will the sprint take place? >> >> I could work (from Paris) on some improvements of random walker >> segmentation (I have a PR almost ready), as well as on incorporating the >> morphological reconstruction of cellprofiler. >> >> Cheers, >> Emmanuelle >> >> >> On Thu, Jul 12, 2012 at 01:57:11PM -0700, St?fan van der Walt wrote: >> > Hi everyone, >> >> > We will have a scikits-image sprint at SciPy2012 next week in Austin. >> > Since the sprint page has just gone up: >> >> > http://conference.scipy.org/scipy2012/sprints/index.php >> >> > Let's discuss some additions that we can work on... Suggestions? >> >> > St?fan >> > > > Emmanuelle: I have an *old* PR for morphological reconstruction (based on > cellprofiler) if you want it. This is from before the scikits-image -> > skimage rename, so it might not be that useful. > > As for ideas (some of these might not be feasible): > > * Updating the PR to add backends for different toolkits (OpenCL, OpenCV, > etc) > PR: https://github.com/scikits-image/scikits-image/pull/14 > discussion: > https://groups.google.com/forum/?fromgroups#!topic/scikits-image/DapafiVCJoU > > * Integrate video support into plugin framework (related: I think Stefan > mentioned cleaning up the plugin framework as we were closing some bugs for > the 0.6 release). > > * Additions to the User Guide (ideas for topics?) > > * Finally, I'd really like to see some tutorial-style examples, similar to > the segmentation example: > > http://scikits-image.org/docs/dev/auto_examples/applications/plot_coins_segmentation.html > > Cheers! > -Tony > > Emmanuelle: I realized that the old PR was not that hard to adapt, so I updated it and submitted it as a new PR. I hope you don't mind. https://github.com/scikits-image/scikits-image/pull/215 As I note in the PR, I doubt I spent much time reviewing the CellProfiler code, so it probably needs a good read through. -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From otto.fajardob at gmail.com Fri Jul 13 04:12:43 2012 From: otto.fajardob at gmail.com (Otto Fajardo) Date: Fri, 13 Jul 2012 10:12:43 +0200 Subject: gstreamer In-Reply-To: References: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Message-ID: Pyffmpeg works well. In windows is very difficult to compile (therefore you have to rely on the binary, and the webpage only provides it for python 2.6), in linux I think it was better, can't recall. Ffms is quite new apparently, looks nice, color space is a bit messy, I have only tested the binary for 2.7, they have also for 3.2. These both support precise frame seeking. Yet another one based on ffmpeg is pymedia. This also works fine, the seeking function is not so good though. Binaries for windows are avaiable from Gohlke's webpage. Compiling with py2exe or cx_freeze: works for pyffmpeg, but not for ffms. I think all these support decoding but not encoding. If you need more details let me know. Otto 2012/7/13 Tony Yu > > > On Thu, Jul 12, 2012 at 4:54 PM, St?fan van der Walt wrote: > >> On Thu, Jul 12, 2012 at 11:37 AM, Tony Yu wrote: >> > Brian: I think a Pyglet plugin would be useful even if it has the >> problems >> >> Any ideas on how this could slot in to the current plugin API? >> >> St?fan >> > > Good point! If the number of video backends grows we should definitely be > reusing the plugin infrastructure. > > I've only scanned the source for video support. Do you foresee any > sticking points with adding video to the plugin framework? > > -Tony > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Fri Jul 13 20:22:15 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Fri, 13 Jul 2012 17:22:15 -0700 Subject: gstreamer In-Reply-To: References: <5cfb517d-1725-4bb6-8fd5-dfcd78c7cb3b@l5g2000vbo.googlegroups.com> Message-ID: On Thu, Jul 12, 2012 at 7:18 PM, Tony Yu wrote: > I've only scanned the source for video support. Do you foresee any sticking > points with adding video to the plugin framework? No, I think it would work well if we return a standard Video object, then we implement once class for each video reader (similar to the ImageCollection). Perhaps a specialized ImageCollection? St?fan From stefan at sun.ac.za Mon Jul 16 10:34:16 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Mon, 16 Jul 2012 10:34:16 -0400 Subject: SciPy2012 Sprint In-Reply-To: <20120712214916.GB15076@phare.normalesup.org> References: <20120712214916.GB15076@phare.normalesup.org> Message-ID: On Thu, Jul 12, 2012 at 5:49 PM, Emmanuelle Gouillart wrote: > on which day will the sprint take place? The sprints are on Friday and Saturday. > I could work (from Paris) on some improvements of random walker > segmentation (I have a PR almost ready), as well as on incorporating the > morphological reconstruction of cellprofiler. Thanks, it would be great if you and Tony could collaborate on those PRs. Here are some other possible topics: - Complete geometric transformation - Integrate Tony's visualization tools - Add binary features (BRIEF, BRISK, FREAK) - User guide - Video loading - Hough transform Outstanding challenges: - Blurring kernel estimation: http://bit.ly/Nril3u - http://stackoverflow.com/questions/10196198/how-to-remove-convexity-defects-in-sudoku-square/11366549#11366549 St?fan From stefan at sun.ac.za Mon Jul 16 16:50:53 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Mon, 16 Jul 2012 16:50:53 -0400 Subject: Cython & memory views Message-ID: Hi everyone, It would be great if all devs could familiarize themselves with the Cython interface to memoryviews: http://docs.cython.org/src/userguide/memoryviews.html I think we should head in this direction with any new code. If that was too long, here's the gist of it: cdef cnp.ndarray[cnp.double_t, 2] x = ... -> double[:, :] x = ... St?fan From amueller at ais.uni-bonn.de Tue Jul 17 10:38:19 2012 From: amueller at ais.uni-bonn.de (Andreas =?utf-8?Q?M=C3=BCller?=) Date: Tue, 17 Jul 2012 16:38:19 +0200 (CEST) Subject: Filterbank code In-Reply-To: <5ff124f6-1177-4bb7-acb6-0e414967023f@mail.ais.uni-bonn.de> Message-ID: Hey everybody. I put together some simple filterbank code here: http://peekaboo-vision.blogspot.co.uk/2012/07/filterbank-for-low-level-vision.html Do you think that would be interesting for skimage? Cheers, Andy From stefan at sun.ac.za Tue Jul 17 16:44:38 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 17 Jul 2012 16:44:38 -0400 Subject: Filterbank code In-Reply-To: References: <5ff124f6-1177-4bb7-acb6-0e414967023f@mail.ais.uni-bonn.de> Message-ID: Hey Andy On Tue, Jul 17, 2012 at 10:38 AM, Andreas M?ller wrote: > I put together some simple filterbank code here: > http://peekaboo-vision.blogspot.co.uk/2012/07/filterbank-for-low-level-vision.html Interesting! How do those compare with wavelet filter banks? (I happened to have dabbled in texture recognition before: http://mentat.za.net/msc_thesis.html . I didn't know that Zisserman's lab worked on that--interesting because they also did a lot of super-resolution, the topic of my PhD). St?fan P.S. Small typo: Andres -> Andrew Zisserman From yager.neil at gmail.com Wed Jul 18 03:18:03 2012 From: yager.neil at gmail.com (Neil Yager) Date: Wed, 18 Jul 2012 00:18:03 -0700 (PDT) Subject: Filterbank code In-Reply-To: References: <5ff124f6-1177-4bb7-acb6-0e414967023f@mail.ais.uni-bonn.de> Message-ID: <489d1bc8-717b-4960-9210-c2e92392252b@googlegroups.com> Good stuff! I use Gabor filterbanks extensively, and think they would be a great addition to skimage. Neil On Tuesday, July 17, 2012 3:38:19 PM UTC+1, amue... at ais.uni-bonn.de wrote: > > Hey everybody. > > I put together some simple filterbank code here: > > http://peekaboo-vision.blogspot.co.uk/2012/07/filterbank-for-low-level-vision.html > Do you think that would be interesting for skimage? > > Cheers, > Andy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amueller at ais.uni-bonn.de Wed Jul 18 02:28:13 2012 From: amueller at ais.uni-bonn.de (Andreas Mueller) Date: Wed, 18 Jul 2012 07:28:13 +0100 Subject: Filterbank code In-Reply-To: References: <5ff124f6-1177-4bb7-acb6-0e414967023f@mail.ais.uni-bonn.de> Message-ID: <5006577D.601@ais.uni-bonn.de> Hey Stefan. Actually I don't know how these kind of filter banks compare with wavelets. They just seem kind of popular with computer vision people. There is no wavelet filter bank in skimage, is there? I guess it would be easy enough to do with scipy, though. By the way, you mentioned you are interested in matting. I'm working on the alphamatting.com dataset this week :) OT: Sorry for not finishing up my segmentation PR. It is quite mature but I wanted to compare it to the standard implementations. But for that I need Lab color space conversions, which I didn't get around doing yet. Cheers, Andy On 07/17/2012 09:44 PM, St??????fan van der Walt wrote: > Hey Andy > > On Tue, Jul 17, 2012 at 10:38 AM, Andreas M??????ller > wrote: >> I put together some simple filterbank code here: >> http://peekaboo-vision.blogspot.co.uk/2012/07/filterbank-for-low-level-vision.html > Interesting! How do those compare with wavelet filter banks? > > (I happened to have dabbled in texture recognition before: > http://mentat.za.net/msc_thesis.html . I didn't know that Zisserman's > lab worked on that--interesting because they also did a lot of > super-resolution, the topic of my PhD). > > St??????fan > > P.S. Small typo: Andres -> Andrew Zisserman From stefan at sun.ac.za Wed Jul 18 18:27:36 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Wed, 18 Jul 2012 18:27:36 -0400 Subject: Filterbank code In-Reply-To: <5006577D.601@ais.uni-bonn.de> References: <5ff124f6-1177-4bb7-acb6-0e414967023f@mail.ais.uni-bonn.de> <5006577D.601@ais.uni-bonn.de> Message-ID: Hey Andy On Wed, Jul 18, 2012 at 2:28 AM, Andreas Mueller wrote: > There is no wavelet filter bank in skimage, is there? > I guess it would be easy enough to do with scipy, though. No, but I recently saw some activity at: https://github.com/nigma/pywt http://www.pybytes.com/pywavelets/ > By the way, you mentioned you are interested in matting. > I'm working on the alphamatting.com dataset this week :) Ah, fantastic! Are you implementing their paper? > OT: Sorry for not finishing up my segmentation PR. > It is quite mature but I wanted to compare it to the standard > implementations. But for that I need Lab color space conversions, > which I didn't get around doing yet. I'll add Lab color space conversion to the todo list for Friday's SciPy sprint. St?fan From amueller at ais.uni-bonn.de Thu Jul 19 03:22:56 2012 From: amueller at ais.uni-bonn.de (Andreas Mueller) Date: Thu, 19 Jul 2012 08:22:56 +0100 Subject: Filterbank code In-Reply-To: References: <5ff124f6-1177-4bb7-acb6-0e414967023f@mail.ais.uni-bonn.de> <5006577D.601@ais.uni-bonn.de> Message-ID: <5007B5D0.6070904@ais.uni-bonn.de> Hey Stefan. > No, but I recently saw some activity at: > > https://github.com/nigma/pywt > http://www.pybytes.com/pywavelets/ > > > > Cool, thanks. > >>> By the way, you mentioned you are interested in matting. >>> I'm working on the alphamatting.com dataset this week :) >> Ah, fantastic! Are you implementing their paper? > I'm working with Carsten Rother and we are doing super fancy super > secret things ;) Cool, thanks. >> By the way, you mentioned you are interested in matting. >> I'm working on the alphamatting.com dataset this week :) > Ah, fantastic! Are you implementing their paper? The paper compare a lot of methods, right? Which one do you mean? I'm working with Carsten Rother and we are doing super fancy super secret things ;) Basically it's an extension of an upcoming ECCV paper on Decision Tree Fields. > >> OT: Sorry for not finishing up my segmentation PR. >> It is quite mature but I wanted to compare it to the standard >> implementations. But for that I need Lab color space conversions, >> which I didn't get around doing yet. > I'll add Lab color space conversion to the todo list for Friday's SciPy sprint. Thanks, that would be great. I'll try to do it myself but I'm pretty swamped with work atm. Cheers, Andy From amueller at ais.uni-bonn.de Sat Jul 21 09:11:16 2012 From: amueller at ais.uni-bonn.de (Andreas Mueller) Date: Sat, 21 Jul 2012 14:11:16 +0100 Subject: Colorspace conversions RGB, XYZ, Lab Message-ID: <500AAA74.8010802@ais.uni-bonn.de> Hi everybody. I wanted to look into doing a RGB2Lab conversion in skimage but I got a bit confused with the different color spaces. The standard method to go from RGB to Lab seems to be via XYZ. I compared the way that RGB2XYZ is done in scikits-image, vl_feat and the SLIC code, and they seem to be three different ways. As I want to use Lab for the segmentation methods by the vl_feat authors and SLIC, I feel this is a bit unfortunate. The difference between wikipedia, skimage and vl_feat seems to be that vl_feat does a gamma-correction of 2.2. SLIC does something else that I don't really understand. Could someone help me understand the differences so that I can try and reproduce other peoples' results? Cheers, Andy From bdholt1 at gmail.com Mon Jul 23 06:24:27 2012 From: bdholt1 at gmail.com (Brian Holt) Date: Mon, 23 Jul 2012 11:24:27 +0100 Subject: error in skimage.feature.hog In-Reply-To: References: Message-ID: Any other comments on this PR? I think its ready to merge. Brian From amueller at ais.uni-bonn.de Tue Jul 24 17:47:20 2012 From: amueller at ais.uni-bonn.de (Andreas Mueller) Date: Tue, 24 Jul 2012 22:47:20 +0100 Subject: Relation with computer vision and machine learning In-Reply-To: References: Message-ID: <500F17E8.4000200@ais.uni-bonn.de> Hi Wei. While I'm not so active in skimage at the moment, I am very interested in how to connect sklearn and skimage. I think at the moment the best approach would be to leave the two packages independent but try not to reimplement to much. Many of the ML methods applied to images can be made much more efficient for images, so reimplementing these is definitely worth it. For example image segmentation algorithms often build on clustering algorithms (like the one you mentioned) but they can be made much faster by only considering local neighborhoods. (which is why I work on #206 ) In most cases that I am interested in the "higher level" ML sort of "wraps around" the CV, as for example with descriptors and classification. I would place all descriptors in skimage but skimage doesn't need sklearn as a dependence for me to be able to use an SVM on them. Do you have more examples where sklearn and skimage might overlap? I was actually wondering about doing a grab-cut implementation which needs Gaussian mixture models. But before I get there, we need graph cuts in skimage ;) Cheers, Andy On 07/24/2012 08:09 AM, LI, Wei wrote: > Dear ALL: > > I am new to scikits-image and I am not sure the intended coverage of > this package. Seems digital image processing using a signal processing > view is quite mature but there are also trends where methods from > statistical learning theory and computer vision are adpated into > solving standard digial image processing tasks just like using > learning method to do super resolution, image denoising. There are > also some discussion in this forum that are related to computer vision > like the object detection. As far as I know, there is one scikits > package as the scikits-learn implementing many machine learning > algorithm. When we need some functions to perform some tasks whether > we need to reimplement some functions or just to use another package > as a denepdence? > > As I am a computer vision researcher I find this package by searching > for available implementation for hog features in python. Just > wondering whether some modules I can help to implement for this as I > have already gotten help from package :-). But I have some questions > when picturing whether I can take the tasks in the wiki page > http://scikits-image.org/docs/dev/contribute.html . For example the > graph-cut based segmentation. As we know, the graph cut base algorithm > based mainly on graph-based clustering method. Such method is > implemented in various packages and is in scikits-learn > http://scikit-learn.org/dev/modules/generated/sklearn.cluster.SpectralClustering.html. > > Then we have two choices, > 1. Write one JUST for image clustering in this package (Pros: self > contained package, Cons: cannot get updated when clustering methods > are updated) > 2. Include the sklearn as a dependence, adapt the mehtods in that > package, and write a routine that just build the graph from the image > ,throw it to sklearn to solve the learning problem and convert the > result back? > > As more and more papers in standard image processing conference like > ICIP, using the statistical learning method, furthuer implementations > may have more functions need the machine learning as subroutines. So > what is the indented choice from the founders of this package? > > Best, > Wei -------------- next part -------------- An HTML attachment was scrubbed... URL: From liwei at ee.cuhk.edu.hk Tue Jul 24 23:07:06 2012 From: liwei at ee.cuhk.edu.hk (LI Wei) Date: Wed, 25 Jul 2012 11:07:06 +0800 Subject: Relation with computer vision and machine learning In-Reply-To: <500F17E8.4000200@ais.uni-bonn.de> References: <500F17E8.4000200@ais.uni-bonn.de> Message-ID: Hi, Andy Thanks for your reply! I see your great work in scikits-learn and your comments are quite useful. Many will overlap, I think we can maintain a list. As a quick example in the following: 1. Image denoising: for modeling texture, many use mixture model to model the texture density and denoise. Using MRF to denoise. Using matrix-factorization methods(sparse coding etc) to denoise. I think for denosing using machine learning related methods is quite common and yield quite good result reported in their papers. 2. Image completion: Using generative model to do image completion: restricted boltzmann machine 3. 3-D reconstruction/Stereo/Image Registration: MRF is needed. 4. Nearest Neighbor Search: ANN and the approximation methods like hashing etc. 5. General functions like the PCA will be needed as preprocessing. Here scikits learn and scikits image will overlap and more will be contained as the ICIP and CVPR may have more papers published. But one further question is: is there a clear outline of topics covered in image processing? Or, should there be one. As we can see, computer vision seems to contain anything about image analysis actually, but it is far beyond traditionally image processing. It somehow want to "learn" the semantic meaning of image but traditional image processing like filtering and convolution seems not to consider the "content" of the image but only to do the task in low level. As you say, maybe we can leave the image specific thing like the features in sciktis-image and make some useful wrappers in skimage. But to give it a chance to choose the meta-algorithms like "which algorithm to use to do clustering". Then make scikits-learn as a dependence. Just like scikits-image with different backened(like using different blas?). Then user can choose which algorithm from which packages to use. I am not sure whether it is a good idea. I can help to first implement the graph cut methods as the normalized cuts routine with different discreting methods. Best, Wei On Wed, Jul 25, 2012 at 5:47 AM, Andreas Mueller wrote: > Hi Wei. > While I'm not so active in skimage at the moment, I am very interested in > how to connect sklearn and skimage. > I think at the moment the best approach would be to leave the two packages > independent but try > not to reimplement to much. > > Many of the ML methods applied to images can be made much more efficient > for images, so reimplementing these is > definitely worth it. For example image segmentation algorithms often build > on clustering algorithms (like the one you > mentioned) but they can be made much faster by only considering local > neighborhoods. > (which is why I work on #206 > ) > > In most cases that I am interested in the "higher level" ML sort of "wraps > around" the CV, as for example with descriptors > and classification. I would place all descriptors in skimage but skimage > doesn't need sklearn as a dependence for me to > be able to use an SVM on them. > > Do you have more examples where sklearn and skimage might overlap? > > I was actually wondering about doing a grab-cut implementation which needs > Gaussian mixture models. > But before I get there, we need graph cuts in skimage ;) > > Cheers, > Andy > > > > On 07/24/2012 08:09 AM, LI, Wei wrote: > > Dear ALL: > > I am new to scikits-image and I am not sure the intended coverage of > this package. Seems digital image processing using a signal processing view > is quite mature but there are also trends where methods from statistical > learning theory and computer vision are adpated into solving standard > digial image processing tasks just like using learning method to do super > resolution, image denoising. There are also some discussion in this forum > that are related to computer vision like the object detection. As far as I > know, there is one scikits package as the scikits-learn implementing many > machine learning algorithm. When we need some functions to perform some > tasks whether we need to reimplement some functions or just to use another > package as a denepdence? > > As I am a computer vision researcher I find this package by searching > for available implementation for hog features in python. Just wondering > whether some modules I can help to implement for this as I have already > gotten help from package :-). But I have some questions when picturing > whether I can take the tasks in the wiki page > http://scikits-image.org/docs/dev/contribute.html . For example the > graph-cut based segmentation. As we know, the graph cut base algorithm > based mainly on graph-based clustering method. Such method is implemented > in various packages and is in scikits-learn > http://scikit-learn.org/dev/modules/generated/sklearn.cluster.SpectralClustering.html > . > Then we have two choices, > 1. Write one JUST for image clustering in this package (Pros: self > contained package, Cons: cannot get updated when clustering methods are > updated) > 2. Include the sklearn as a dependence, adapt the mehtods in that package, > and write a routine that just build the graph from the image ,throw it to > sklearn to solve the learning problem and convert the result back? > > As more and more papers in standard image processing conference like > ICIP, using the statistical learning method, furthuer implementations may > have more functions need the machine learning as subroutines. So what is > the indented choice from the founders of this package? > > Best, > Wei > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From amueller at ais.uni-bonn.de Thu Jul 26 18:02:39 2012 From: amueller at ais.uni-bonn.de (Andreas Mueller) Date: Thu, 26 Jul 2012 23:02:39 +0100 Subject: Relation with computer vision and machine learning In-Reply-To: References: <500F17E8.4000200@ais.uni-bonn.de> Message-ID: <5011BE7F.4070007@ais.uni-bonn.de> Hi Wei. > Thanks for your reply! I see your great work in scikits-learn and your > comments are quite useful. > Thanks :) > Many will overlap, I think we can maintain a list. As a quick example > in the following: There is no discussion that machine learning methods are helpful for vision problems and that vision problems are an important application domain for machine learning tools. The question is if there is something you would like in skimage that would require the use of something from sklearn. I.e. what algorithm you want in skimage is only useful together with something from sklearn? I don't think any of your examples are in this category. Which is well enough, since this means it should be easy to keep the two things separate ;) Btw, MRFs in vision are often not learned, so this is no ML, just optimization. And I would rather place that in skimage, as it is quite image specific. When I talked about graph-cuts, that's what I meant. Normalized cuts are of limited use in low level vision since they are very slow for superpixels. I was rather thinking of Boykov-Kolmogorov push-relabel - which is my next project when I get my superpixels done. (Stefan actually mentioned he'd like to have it :) Abour RBMs: I am no stranger to them but I would rather not include them in sklearn and definitely not in skimage. Cheers, Andy -------------- next part -------------- An HTML attachment was scrubbed... URL: From liwei at ee.cuhk.edu.hk Thu Jul 26 23:38:35 2012 From: liwei at ee.cuhk.edu.hk (LI Wei) Date: Fri, 27 Jul 2012 11:38:35 +0800 Subject: Relation with computer vision and machine learning In-Reply-To: <5011BE7F.4070007@ais.uni-bonn.de> References: <500F17E8.4000200@ais.uni-bonn.de> <5011BE7F.4070007@ais.uni-bonn.de> Message-ID: Hi Andy: Thanks for your comments. Seems I am not quite clear about the scope of skimage and scikits-learn currently. I will get myself more familiar with both packages to find anything currently in skimage requires the overlap with scikits-learn's methods. For MRF, I think your comments are correct. It is just related to some specific forms(if not one) of MRFs and to solve it is the main problem. Maybe a complete functioning MRF package is not quite necessary and not suitable/efficient enough to do the image tasks. Could I ask why rbm will not be in both packages? I see you release a RBM on your blog, and why not make it into scikits-learn. Seems it is a big-package itself and some python libarary like theano has been relaesed, maybe this is the concern? Best, Wei On Fri, Jul 27, 2012 at 6:02 AM, Andreas Mueller wrote: > Hi Wei. > > Thanks for your reply! I see your great work in scikits-learn and your > comments are quite useful. > > Thanks :) > > Many will overlap, I think we can maintain a list. As a quick example in > the following: > > There is no discussion that machine learning methods are helpful for > vision problems and that vision problems > are an important application domain for machine learning tools. > > The question is if there is something you would like in skimage that would > require the use of something from sklearn. > I.e. what algorithm you want in skimage is only useful together with > something from sklearn? > I don't think any of your examples are in this category. Which is well > enough, since this means > it should be easy to keep the two things separate ;) > > Btw, MRFs in vision are often not learned, so this is no ML, just > optimization. And I would rather place > that in skimage, as it is quite image specific. When I talked about > graph-cuts, that's what I meant. > Normalized cuts are of limited use in low level vision since they are very > slow for superpixels. > I was rather thinking of Boykov-Kolmogorov push-relabel - which is my next > project when I get > my superpixels done. (Stefan actually mentioned he'd like to have it :) > > Abour RBMs: I am > no > strangerto > thembut I would rather not include them in sklearn and definitely not in > skimage. > > Cheers, > Andy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Sat Jul 28 10:08:55 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Sat, 28 Jul 2012 10:08:55 -0400 Subject: Qt-MPL image viewer Message-ID: So I've been hacking on a new implementation of an image-viewer/interactive-image-processor. See PR 229: https://github.com/scikits-image/scikits-image/pull/229 The previous implementation was written purely in Matplotlib, partly for portability. Unfortunately, I found this implementation a bit limiting because Matplotlib doesn't provide quite-enough widget support. In addition, there was no way to add custom toolbars or menus without getting toolkit-specific. So, I've added a new implementation that requires PyQt but also uses Matplotlib because of the wealth of plotting functionality that it provides. There's a lot that I added in my original implementation that needs to be updated for this implementation (an image collection viewer, and Guillaume Gay's contrast setter and line-profile plugins). I'm of the opinion, however, that these should be implemented later in order to reduce the work to review this PR (that's actually why I moved the line profile pluginto a separate branch). Overall, I'm pretty happy with the current implementation. The basic idea is that there's a viewer class (to view images, of course). You can then connect plugins to the viewer, which typically calls some sort of filter function, but that's in no way a requirement (for example, the line-profile plugin measures values in the image). Also, there are widgets that get attached to these plugins (currently, just a slider and a combo box) to adjust filtering or plugin parameters. There are two ways to implement a plugin: The first is by subclassing the base `Plugin` class. The second (which I shamelessly stole from Bokeh) instantiates a plugin and just adds widgets(using the addition operator) to control filter parameters. The first is probably more flexible, while the second is convenient for people who may not be as comfortable with object-oriented programming (plus I think it reads really well). It's a big PR, but I'd really appreciate comments and suggestions. Cheers, -Tony P.S. Stefan: In a separate branch, I've added the Hough Transform plugin you so desired. Right now it's a little hacky, partly because I haven't yet built the infrastructure to support this type of plot (not only does it plot an overlay but also Matplotlib lines; in addition, parameters have to be delegated to two different functions). Nevertheless, the implementation is surprisingly short, despite not adding anything else to support this use case. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Tue Jul 31 04:42:44 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 31 Jul 2012 04:42:44 -0400 Subject: Bug in regionprops In-Reply-To: <8484359e-e413-47cd-a3ba-90a02e19a75e@googlegroups.com> References: <8484359e-e413-47cd-a3ba-90a02e19a75e@googlegroups.com> Message-ID: Hi Jeff On Jul 31, 2012 9:07 AM, "jeff witz" wrote: > > I must use regionprops in order to identify a lot of el > > Hello, > > I must use regionprops in order to identify a lot of ellipse in a picture. > I have constated a mistake in the implementation of the 'Orientation' > identification. > in skimage/measure/_regionprops.py at line 298 the function atan is used > to recover the angle. In my case I constate that a lot of the ellipse are > correctly identified using atan, but in some cases the 'MinorAxisLength' > and the 'MajorAxisLength' are swapped. You can solve this issue using the > atan2 function that take into account the trigonometric quadrant. > > Best Regards, > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Tue Jul 31 04:43:12 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 31 Jul 2012 04:43:12 -0400 Subject: Bundling scikits-image using pyinstaller In-Reply-To: <3dfeb136-ad04-4de2-93b2-be5210808d4e@googlegroups.com> References: <3dfeb136-ad04-4de2-93b2-be5210808d4e@googlegroups.com> Message-ID: Hi Nicklas On Jul 31, 2012 9:30 AM, "Nicklas Nordenmark" wrote: > > Heya, I'm trying to bundle an application that's using scikits-image and other libraries but I'm running into problems (see this Stackoverflow thread for a more detailed description of the problem: http://stackoverflow.com/questions/11719292/error-when-bundling-application-using-pyinstaller-windows ). Is there any way of locating files in such a distribution? If so, we can incorporate it in the plugin loader. Regards St?fan -------------- next part -------------- An HTML attachment was scrubbed... URL: