From joefutrelle at gmail.com Tue Jan 5 12:20:35 2016 From: joefutrelle at gmail.com (Joe Futrelle) Date: Tue, 5 Jan 2016 09:20:35 -0800 (PST) Subject: I've implemented MATLABs bwmorph('thin',...): any interest? Message-ID: Hello, I have developed an efficient Python implementation of the algorithm used by MATLAB's bwmorph('thin', ...). I believe this differs from the skeletonization algorithm provided by skimage and could be useful for people porting MATLAB code. https://gist.github.com/joefutrelle/562f25bbcf20691217b8 is this of interest? If so I could take the time to bring the coding style up to PEP8 and make a proper PR out of it. - JF -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Wed Jan 6 06:14:31 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Wed, 6 Jan 2016 03:14:31 -0800 Subject: I've implemented MATLABs bwmorph('thin',...): any interest? In-Reply-To: References: Message-ID: Hi Joe On Tue, Jan 5, 2016 at 9:20 AM, Joe Futrelle wrote: > I have developed an efficient Python implementation of the algorithm used by > MATLAB's bwmorph('thin', ...). I believe this differs from the > skeletonization algorithm provided by skimage and could be useful for people > porting MATLAB code. Have you also had a look at medial_axis? If it is different from both, then it may be useful, especially if there is a clearly specified paper on its implementation. St?fan From joefutrelle at gmail.com Wed Jan 6 10:32:50 2016 From: joefutrelle at gmail.com (Joe Futrelle) Date: Wed, 6 Jan 2016 07:32:50 -0800 (PST) Subject: I've implemented MATLABs bwmorph('thin',...): any interest? In-Reply-To: References: Message-ID: <1a62af36-97c6-4c1e-b66c-5456ab189426@googlegroups.com> Reading the code for medial_axis, that looks like a very different algorithm. MATLAB's docs reference the following paper section: Lam, L., Seong-Whan Lee, and Ching Y. Suen, "Thinning Methodologies-A Comprehensive Survey," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol 14, No. 9, September 1992, page 879, bottom of first column through top of second column Another open source implementation of this algorithm that I'm aware of is Octave's, which is here: http://sourceforge.net/p/octave/image/ci/default/tree/inst/bwmorph.m#l499 same impl strategy as my version. On Wednesday, January 6, 2016 at 6:14:56 AM UTC-5, stefanv wrote: > > Hi Joe > > On Tue, Jan 5, 2016 at 9:20 AM, Joe Futrelle > wrote: > > I have developed an efficient Python implementation of the algorithm > used by > > MATLAB's bwmorph('thin', ...). I believe this differs from the > > skeletonization algorithm provided by skimage and could be useful for > people > > porting MATLAB code. > > Have you also had a look at medial_axis? If it is different from > both, then it may be useful, especially if there is a clearly > specified paper on its implementation. > > St?fan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joefutrelle at gmail.com Thu Jan 7 13:45:58 2016 From: joefutrelle at gmail.com (Joe Futrelle) Date: Thu, 7 Jan 2016 10:45:58 -0800 (PST) Subject: I've implemented MATLABs bwmorph('thin',...): any interest? In-Reply-To: <1a62af36-97c6-4c1e-b66c-5456ab189426@googlegroups.com> References: <1a62af36-97c6-4c1e-b66c-5456ab189426@googlegroups.com> Message-ID: I made a PR: https://github.com/scikit-image/scikit-image/pull/1858 Travis builds for Python >2.7 are failing because of a warning about a duplicate citation in my inline docs--how can I fix this? WARNING: duplicate citation R311, other instance in /home/travis/build/scikit-image/scikit-image/doc/source/api/skimage.restoration.txt -------------- next part -------------- An HTML attachment was scrubbed... URL: From anurag.phadke at gmail.com Fri Jan 8 00:04:48 2016 From: anurag.phadke at gmail.com (Anurag Phadke) Date: Thu, 7 Jan 2016 21:04:48 -0800 (PST) Subject: image segmentation error (tuple index out of range) Message-ID: <6805958b-9936-49e8-bee0-2b70933fb6c4@googlegroups.com> Hello, I am trying to run "image segmentation" on the attached image. Code at: https://gist.github.com/anuragphadke/7eb0e4398ef005632c6d However, on running the above script, i get the following error: Traceback (most recent call last): File "a.py", line 21, in bw = closing(image > thresh, square(3)) File "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", line 37, in func_out return func(image, selem=selem, *args, **kwargs) File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", line 122, in func_out out_temp = func(image, selem, out=out_temp, *args, **kwargs) File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", line 349, in closing dilated = dilation(image, selem) File "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", line 37, in func_out return func(image, selem=selem, *args, **kwargs) File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", line 251, in dilation nd.grey_dilation(image, footprint=selem, output=out) File "/usr/local/lib/python2.7/site-packages/scipy/ndimage/morphology.py", line 1295, in grey_dilation sz = footprint.shape[ii] IndexError: tuple index out of range Any idea what might be wrong here? I tried multiple images and multiple file formats (jpg / png etc.) -anurag -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: c.png Type: image/png Size: 1834905 bytes Desc: not available URL: From stefanv at berkeley.edu Fri Jan 8 02:47:14 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Thu, 7 Jan 2016 23:47:14 -0800 Subject: image segmentation error (tuple index out of range) In-Reply-To: <20160108074452.GA3070033@phare.normalesup.org> References: <6805958b-9936-49e8-bee0-2b70933fb6c4@googlegroups.com> <20160108074452.GA3070033@phare.normalesup.org> Message-ID: Hi, Emmanuelle Please file a ticket so that we don't forget about this missing feature. Thanks! St?fan On Jan 8, 2016 09:44, "Emmanuelle Gouillart" wrote: > Hello Anurag, > > my guess is that your image is an RGB image, so that its shape is > (n_rows, n_cols, 3). I could reproduce your problem using the RGB > astronaut image from scikit-image (data.astronaut()). ``threshold_otsu`` > is not very well adapted to RGB images because it mixes together the > color channels by first raveling all pixels. [Note for dev team: this > should be better documented, and we should look for a thresholding > algorithm compatible with RGB images] > > Therefore ``image > thresh`` is a 3-D array (or 2-D color, you can try > imshow on this array). You can try determining the threshold value on a > grayscale image if it's possible for you, using the as_grey keyword > argument in io.imread. Or you can determine a threshold for each color > channel. > > Cheers, > Emma > > > On Thu, Jan 07, 2016 at 09:04:48PM -0800, Anurag Phadke wrote: > > Hello, > > I am trying to run "image segmentation" on the attached image. Code at: > > https://gist.github.com/anuragphadke/7eb0e4398ef005632c6d > > > However, on running the above script, i get the following error: > > > Traceback (most recent call last): > > File "a.py", line 21, in > > bw = closing(image > thresh, square(3)) > > File "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", > line 37, > > in func_out > > return func(image, selem=selem, *args, **kwargs) > > File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", > line > > 122, in func_out > > out_temp = func(image, selem, out=out_temp, *args, **kwargs) > > File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", > line > > 349, in closing > > dilated = dilation(image, selem) > > File "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", > line 37, > > in func_out > > return func(image, selem=selem, *args, **kwargs) > > File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", > line > > 251, in dilation > > nd.grey_dilation(image, footprint=selem, output=out) > > File > "/usr/local/lib/python2.7/site-packages/scipy/ndimage/morphology.py", > > line 1295, in grey_dilation > > sz = footprint.shape[ii] > > IndexError: tuple index out of range > > > Any idea what might be wrong here? I tried multiple images and multiple > file > > formats (jpg / png etc.) > > > -anurag > > -- > You received this message because you are subscribed to the Google Groups > "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to scikit-image+unsubscribe at googlegroups.com. > To post to this group, send an email to scikit-image at googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/scikit-image/20160108074452.GA3070033%40phare.normalesup.org > . > For more options, visit https://groups.google.com/d/optout. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.gouillart at nsup.org Fri Jan 8 02:44:52 2016 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Fri, 8 Jan 2016 08:44:52 +0100 Subject: image segmentation error (tuple index out of range) In-Reply-To: <6805958b-9936-49e8-bee0-2b70933fb6c4@googlegroups.com> References: <6805958b-9936-49e8-bee0-2b70933fb6c4@googlegroups.com> Message-ID: <20160108074452.GA3070033@phare.normalesup.org> Hello Anurag, my guess is that your image is an RGB image, so that its shape is (n_rows, n_cols, 3). I could reproduce your problem using the RGB astronaut image from scikit-image (data.astronaut()). ``threshold_otsu`` is not very well adapted to RGB images because it mixes together the color channels by first raveling all pixels. [Note for dev team: this should be better documented, and we should look for a thresholding algorithm compatible with RGB images] Therefore ``image > thresh`` is a 3-D array (or 2-D color, you can try imshow on this array). You can try determining the threshold value on a grayscale image if it's possible for you, using the as_grey keyword argument in io.imread. Or you can determine a threshold for each color channel. Cheers, Emma On Thu, Jan 07, 2016 at 09:04:48PM -0800, Anurag Phadke wrote: > Hello, > I am trying to run "image segmentation" on the attached image. Code at: > https://gist.github.com/anuragphadke/7eb0e4398ef005632c6d > However, on running the above script, i get the following error: > Traceback (most recent call last): > ?? File "a.py", line 21, in > ?????? bw = closing(image > thresh, square(3)) > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", line 37, > in func_out > ?????? return func(image, selem=selem, *args, **kwargs) > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", line > 122, in func_out > ?????? out_temp = func(image, selem, out=out_temp, *args, **kwargs) > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", line > 349, in closing > ?????? dilated = dilation(image, selem) > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", line 37, > in func_out > ?????? return func(image, selem=selem, *args, **kwargs) > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", line > 251, in dilation > ?????? nd.grey_dilation(image, footprint=selem, output=out) > ?? File "/usr/local/lib/python2.7/site-packages/scipy/ndimage/morphology.py", > line 1295, in grey_dilation > ?????? sz = footprint.shape[ii] > IndexError: tuple index out of range > Any idea what might be wrong here? I tried multiple images and multiple file > formats (jpg / png etc.) > -anurag From emmanuelle.gouillart at nsup.org Fri Jan 8 02:59:23 2016 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Fri, 8 Jan 2016 08:59:23 +0100 Subject: image segmentation error (tuple index out of range) In-Reply-To: References: <6805958b-9936-49e8-bee0-2b70933fb6c4@googlegroups.com> <20160108074452.GA3070033@phare.normalesup.org> Message-ID: <20160108075923.GB3070033@phare.normalesup.org> Done! https://github.com/scikit-image/scikit-image/issues/1867 On Thu, Jan 07, 2016 at 11:47:14PM -0800, St??fan van der Walt wrote: > Hi, Emmanuelle > Please file a ticket so that we don't forget about this missing feature. > Thanks! > St??fan > On Jan 8, 2016 09:44, "Emmanuelle Gouillart" > wrote: > Hello Anurag, > my guess is that your image is an RGB image, so that its shape is > (n_rows, n_cols, 3). I could reproduce your problem using the RGB > astronaut image from scikit-image (data.astronaut()). ``threshold_otsu`` > is not very well adapted to RGB images because it mixes together the > color channels by first raveling all pixels. [Note for dev team: this > should be better documented, and we should look for a thresholding > algorithm compatible with RGB images] > Therefore ``image > thresh`` is a 3-D array (or 2-D color, you can try > imshow on this array). You can try determining the threshold value on a > grayscale image if it's possible for you, using the as_grey keyword > argument in io.imread. Or you can determine a threshold for each color > channel. > Cheers, > Emma > On Thu, Jan 07, 2016 at 09:04:48PM -0800, Anurag Phadke wrote: > > Hello, > > I am trying to run "image segmentation" on the attached image. Code at: > > https://gist.github.com/anuragphadke/7eb0e4398ef005632c6d > > However, on running the above script, i get the following error: > > Traceback (most recent call last): > > ?? File "a.py", line 21, in > > ?????? bw = closing(image > thresh, square(3)) > > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", > line 37, > > in func_out > > ?????? return func(image, selem=selem, *args, **kwargs) > > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", > line > > 122, in func_out > > ?????? out_temp = func(image, selem, out=out_temp, *args, **kwargs) > > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", > line > > 349, in closing > > ?????? dilated = dilation(image, selem) > > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", > line 37, > > in func_out > > ?????? return func(image, selem=selem, *args, **kwargs) > > ?? File "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", > line > > 251, in dilation > > ?????? nd.grey_dilation(image, footprint=selem, output=out) > > ?? File "/usr/local/lib/python2.7/site-packages/scipy/ndimage/ > morphology.py", > > line 1295, in grey_dilation > > ?????? sz = footprint.shape[ii] > > IndexError: tuple index out of range > > Any idea what might be wrong here? I tried multiple images and multiple > file > > formats (jpg / png etc.) > > -anurag From anurag.phadke at gmail.com Fri Jan 8 13:23:53 2016 From: anurag.phadke at gmail.com (Anurag) Date: Fri, 8 Jan 2016 10:23:53 -0800 Subject: image segmentation error (tuple index out of range) In-Reply-To: <20160108075923.GB3070033@phare.normalesup.org> References: <6805958b-9936-49e8-bee0-2b70933fb6c4@googlegroups.com> <20160108074452.GA3070033@phare.normalesup.org> <20160108075923.GB3070033@phare.normalesup.org> Message-ID: thx emma + Stefan. Here's my temporary work-around: Convert to Grayscale, save as JPG, run the code. -anurag On Thu, Jan 7, 2016 at 11:59 PM, Emmanuelle Gouillart < emmanuelle.gouillart at nsup.org> wrote: > Done! > https://github.com/scikit-image/scikit-image/issues/1867 > > On Thu, Jan 07, 2016 at 11:47:14PM -0800, St?fan van der Walt wrote: > > Hi, Emmanuelle > > > Please file a ticket so that we don't forget about this missing feature. > > > Thanks! > > St?fan > > > On Jan 8, 2016 09:44, "Emmanuelle Gouillart" < > emmanuelle.gouillart at nsup.org> > > wrote: > > > Hello Anurag, > > > my guess is that your image is an RGB image, so that its shape is > > (n_rows, n_cols, 3). I could reproduce your problem using the RGB > > astronaut image from scikit-image (data.astronaut()). > ``threshold_otsu`` > > is not very well adapted to RGB images because it mixes together the > > color channels by first raveling all pixels. [Note for dev team: this > > should be better documented, and we should look for a thresholding > > algorithm compatible with RGB images] > > > Therefore ``image > thresh`` is a 3-D array (or 2-D color, you can > try > > imshow on this array). You can try determining the threshold value > on a > > grayscale image if it's possible for you, using the as_grey keyword > > argument in io.imread. Or you can determine a threshold for each > color > > channel. > > > Cheers, > > Emma > > > > On Thu, Jan 07, 2016 at 09:04:48PM -0800, Anurag Phadke wrote: > > > Hello, > > > I am trying to run "image segmentation" on the attached image. > Code at: > > > https://gist.github.com/anuragphadke/7eb0e4398ef005632c6d > > > > However, on running the above script, i get the following error: > > > > Traceback (most recent call last): > > > File "a.py", line 21, in > > > bw = closing(image > thresh, square(3)) > > > File > "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", > > line 37, > > > in func_out > > > return func(image, selem=selem, *args, **kwargs) > > > File > "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", > > line > > > 122, in func_out > > > out_temp = func(image, selem, out=out_temp, *args, **kwargs) > > > File > "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", > > line > > > 349, in closing > > > dilated = dilation(image, selem) > > > File > "/Library/Python/2.7/site-packages/skimage/morphology/misc.py", > > line 37, > > > in func_out > > > return func(image, selem=selem, *args, **kwargs) > > > File > "/Library/Python/2.7/site-packages/skimage/morphology/grey.py", > > line > > > 251, in dilation > > > nd.grey_dilation(image, footprint=selem, output=out) > > > File "/usr/local/lib/python2.7/site-packages/scipy/ndimage/ > > morphology.py", > > > line 1295, in grey_dilation > > > sz = footprint.shape[ii] > > > IndexError: tuple index out of range > > > > Any idea what might be wrong here? I tried multiple images and > multiple > > file > > > formats (jpg / png etc.) > > > > -anurag > > -- > You received this message because you are subscribed to a topic in the > Google Groups "scikit-image" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/scikit-image/QP6sHolCVgs/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > scikit-image+unsubscribe at googlegroups.com. > To post to this group, send an email to scikit-image at googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/scikit-image/20160108075923.GB3070033%40phare.normalesup.org > . > For more options, visit https://groups.google.com/d/optout. > -- Twitter: @anuragphadke (https://twitter.com/#!/anuragphadke) -------------- next part -------------- An HTML attachment was scrubbed... URL: From saraf.parang at gmail.com Mon Jan 11 21:37:00 2016 From: saraf.parang at gmail.com (PS) Date: Mon, 11 Jan 2016 18:37:00 -0800 (PST) Subject: Image Classification/Recognition Message-ID: <2f153533-1320-4356-a0ff-4d07ef4ea42a@googlegroups.com> Hi, To begin with, thank you for working on scikit-image. I am a beginner in image processing and want to perform the following classification/recognition task: I have a set of 10,000 images (4k labeled and 6k unlabeled). It contains images of people, animals, nature, etc. From this set, I want to recognize all the images that have people in them. Can someone please point me to some resource/example showing how to perform such type of classification? Just in case, if you think scikit-image is not a good library to perform such type of task, can you please guide me to other python based library? Much thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From himanshu2014iit at gmail.com Fri Jan 15 02:25:52 2016 From: himanshu2014iit at gmail.com (Himanshu Mishra) Date: Thu, 14 Jan 2016 23:25:52 -0800 (PST) Subject: Update of Requested features wiki Message-ID: <2bedc732-8733-4787-966b-2757a337cd23@googlegroups.com> Hey everyone ! I was going through the wiki page of the requested features : https://github.com/scikit-image/scikit-image/wiki/Requested-features and I found it very rich. But I believe it has not been updated for quite many months. So, I kindly request people from the core team to give it a look and at least strike-through the features that have already been implemented. Further, on the issue tracker, I like the idea of having a label of 'New Feature'. We can triage issues requesting new implementation with this (not 'enhancement'). This will further help sorting out those issues/PRs which are to be seen for updating the wiki and this saves everyone a lot of time. Waiting for an update. Thank you, Himanshu Mishra Github : OrkoHunter -------------- next part -------------- An HTML attachment was scrubbed... URL: From utkarshgautam247 at gmail.com Fri Jan 15 03:00:23 2016 From: utkarshgautam247 at gmail.com (utkarsh gautam) Date: Fri, 15 Jan 2016 00:00:23 -0800 (PST) Subject: Some advice on where to start and how to start. Message-ID: <3c9838fd-1c1e-468e-9933-bfb0cb37e678@googlegroups.com> Hey Everyone , I am Utkarsh Gautam, A second year undergrad at IITB .I have interest in machine learning and image processing hence would like to learn and contribute to scikit image. Some starting tips would be really helpful. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsch at demuc.de Wed Jan 20 16:18:22 2016 From: jsch at demuc.de (=?utf-8?Q?Johannes_Sch=C3=B6nberger?=) Date: Wed, 20 Jan 2016 22:18:22 +0100 Subject: 0.12 release Message-ID: <4D387154-865D-4846-B9B6-DFCA10F8C334@demuc.de> Hi everyone, Seems like we are close to clearing the 0.12 milestone: https://github.com/scikit-image/scikit-image/pulls?q=is%3Aopen+is%3Apr+milestone%3A0.12 It's been a while since we had a release and lots of great stuff has been merged in the mean time. I suggest to freeze any other PRs until we release 0.12. Maybe we can aim to release 0.12 in the next days? Cheers, Johannes From abder.rahman.ali at gmail.com Thu Jan 21 06:46:10 2016 From: abder.rahman.ali at gmail.com (Abder-Rahman Ali) Date: Thu, 21 Jan 2016 03:46:10 -0800 (PST) Subject: Converted image not displaying Message-ID: <2e444147-2d96-4100-87fd-e375fd737494@googlegroups.com> I'm trying to convert a color image to a grayscale image, as follows: from skimage import iofrom skimage.color import rgb2gray img = io.imread('baboon.png') img_grayscale = rgb2gray(img) io.imshow(img_grayscale) The code works fine, but the image does not get displayed, why is that? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From abder.rahman.ali at gmail.com Thu Jan 21 13:07:25 2016 From: abder.rahman.ali at gmail.com (Abder-Rahman Ali) Date: Thu, 21 Jan 2016 10:07:25 -0800 (PST) Subject: Converted image not displaying In-Reply-To: <2e444147-2d96-4100-87fd-e375fd737494@googlegroups.com> References: <2e444147-2d96-4100-87fd-e375fd737494@googlegroups.com> Message-ID: Thanks a lot for your replies. The code that works for me looks as follows: import skimage.io as io from skimage.color import rgb2gray img = io.imread('baboon.png') img_grayscale = rgb2gray(img) show_grayscale = io.imshow(img_grayscale) io.show() On Thursday, January 21, 2016 at 12:46:10 PM UTC+1, Abder-Rahman Ali wrote: > > I'm trying to convert a color image to a grayscale image, as follows: > > > from skimage import iofrom skimage.color import rgb2gray > img = io.imread('baboon.png') > img_grayscale = rgb2gray(img) > io.imshow(img_grayscale) > > > The code works fine, but the image does not get displayed, why is that? > > > Thanks. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.gouillart at nsup.org Thu Jan 21 06:55:03 2016 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Thu, 21 Jan 2016 12:55:03 +0100 Subject: Converted image not displaying In-Reply-To: <2e444147-2d96-4100-87fd-e375fd737494@googlegroups.com> References: <2e444147-2d96-4100-87fd-e375fd737494@googlegroups.com> Message-ID: <20160121115503.GA615986@phare.normalesup.org> Did you try addind io.show() at the end of your script? Cheers, Emmanuelle On Thu, Jan 21, 2016 at 03:46:10AM -0800, Abder-Rahman Ali wrote: > I'm trying to convert a color image to a grayscale image, as follows: > from skimage import io > from skimage.color import rgb2gray > img = io.imread('baboon.png') > img_grayscale = rgb2gray(img) > io.imshow(img_grayscale) > The code works fine, but the image does not get displayed, why is that? > Thanks. From himanshu2014iit at gmail.com Thu Jan 21 06:54:33 2016 From: himanshu2014iit at gmail.com (Himanshu Mishra) Date: Thu, 21 Jan 2016 17:24:33 +0530 Subject: Converted image not displaying In-Reply-To: <2e444147-2d96-4100-87fd-e375fd737494@googlegroups.com> References: <2e444147-2d96-4100-87fd-e375fd737494@googlegroups.com> Message-ID: Do io.show() for the image to pop up. It's similar to the matplotlib drawing where you first draw and then show. You can also use skimage.viewer.ImageViewer to view the image. Although, I actually don't know why simply imshow did not pop out the image in the viewer. On Thu, Jan 21, 2016 at 5:16 PM, Abder-Rahman Ali < abder.rahman.ali at gmail.com> wrote: > I'm trying to convert a color image to a grayscale image, as follows: > > > from skimage import iofrom skimage.color import rgb2gray > img = io.imread('baboon.png') > img_grayscale = rgb2gray(img) > io.imshow(img_grayscale) > > > The code works fine, but the image does not get displayed, why is that? > > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to scikit-image+unsubscribe at googlegroups.com. > To post to this group, send email to scikit-image at googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/scikit-image/2e444147-2d96-4100-87fd-e375fd737494%40googlegroups.com > > . > For more options, visit https://groups.google.com/d/optout. > -- Himanshu Mishra -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Thu Jan 21 21:04:11 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Thu, 21 Jan 2016 18:04:11 -0800 Subject: 0.12 release In-Reply-To: <4D387154-865D-4846-B9B6-DFCA10F8C334@demuc.de> References: <4D387154-865D-4846-B9B6-DFCA10F8C334@demuc.de> Message-ID: On Wed, Jan 20, 2016 at 1:18 PM, Johannes Sch?nberger wrote: > It's been a while since we had a release and lots of great stuff has been merged in the mean time. I suggest to freeze any other PRs until we release 0.12. Maybe we can aim to release 0.12 in the next days? Yes, we're very close now! We're starting to see the effect of the package & userbase growing: in the past, we'd release, and people would come back with a few bug reports. Now, simply planning a release triggers new bug reports, making the milestone grow and grow! But the list is now shrinking rapidly. Thanks all for your hard work! St?fan From jni.soma at gmail.com Thu Jan 21 18:59:05 2016 From: jni.soma at gmail.com (Juan Nunez-Iglesias) Date: Fri, 22 Jan 2016 10:59:05 +1100 Subject: Some advice on where to start and how to start. In-Reply-To: <3c9838fd-1c1e-468e-9933-bfb0cb37e678@googlegroups.com> References: <3c9838fd-1c1e-468e-9933-bfb0cb37e678@googlegroups.com> Message-ID: Hi Utkarsh, Sorry for the slow response. The team is busy trying to release version 0.12. We have this document to explain how to contribute: http://scikit-image.org/docs/dev/contribute.html And we also have a list of "easy" issues that you could work on: https://github.com/scikit-image/scikit-image/issues?q=is%3Aopen+label%3Aeasy Please feel free to ask for more specific guidance when you get started on something! Juan. On Fri, Jan 15, 2016 at 7:00 PM, utkarsh gautam wrote: > Hey Everyone , > I am Utkarsh Gautam, > A second year undergrad at IITB .I have interest in machine learning and > image processing hence > would like to learn and contribute to scikit image. > Some starting tips would be really helpful. > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to scikit-image+unsubscribe at googlegroups.com. > To post to this group, send email to scikit-image at googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/scikit-image/3c9838fd-1c1e-468e-9933-bfb0cb37e678%40googlegroups.com > > . > For more options, visit https://groups.google.com/d/optout. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pradyumnanpk at gmail.com Fri Jan 22 14:39:14 2016 From: pradyumnanpk at gmail.com (Pradyumna Kumar N) Date: Fri, 22 Jan 2016 11:39:14 -0800 (PST) Subject: New Contributor - Want to work on #1875 - Walker fails if a seed is surrounded by masked pixels Message-ID: <9a4820a9-87d1-4bde-a05a-49b8d2579e36@googlegroups.com> Hi all, I am Pradyumna, pursuing my PhD at Colorado State University in the field of Computer Vision. I would like to contribute to scikit-image project. I already forked the project and I would like to work on #1875. I am in the process of reading the random walk paper. In the mean time, any pointers or help on #1875 would be appreciated. In the long run I would like to implement DTW routine if it is not already implemented. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Fri Jan 22 14:42:54 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Fri, 22 Jan 2016 11:42:54 -0800 Subject: New Contributor - Want to work on #1875 - Walker fails if a seed is surrounded by masked pixels In-Reply-To: <9a4820a9-87d1-4bde-a05a-49b8d2579e36@googlegroups.com> References: <9a4820a9-87d1-4bde-a05a-49b8d2579e36@googlegroups.com> Message-ID: Hi Pradyumna On Fri, Jan 22, 2016 at 11:39 AM, Pradyumna Kumar N wrote: > I am Pradyumna, pursuing my PhD at Colorado State University in the field of > Computer Vision. I would like to contribute to scikit-image project. I > already forked the project and I would like to work on #1875. I am in the > process of reading the random walk paper. In the mean time, any pointers or > help on #1875 would be appreciated. > > In the long run I would like to implement DTW routine if it is not already > implemented. Welcome, and thanks for working on these issues! At the moment we're in release mode, but if all goes well that should be done soon and have a bit more bandwidth to spend on mentoring. Regards St?fan From anurag.phadke at gmail.com Sat Jan 23 20:06:37 2016 From: anurag.phadke at gmail.com (Anurag) Date: Sat, 23 Jan 2016 17:06:37 -0800 Subject: template matching - ValueError: image must be 2d / 3d array Message-ID: Hello, I am trying to run Template Matching code as mentioned in http://scikit-image.org/docs/dev/auto_examples/plot_template.html, however, on trying to read an image from file, it returns the following error: ValueError: The parameter `image` must be a 2-or-3-dimensional array full gist and Traceback at: https://gist.github.com/anuragphadke/48b8565a6bcaa477daa5 Any tips on what I might be doing wrong here? tried converting image to grayscale etc. -- Twitter: @anuragphadke (https://twitter.com/#!/anuragphadke) -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Sat Jan 23 20:15:41 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Sat, 23 Jan 2016 17:15:41 -0800 Subject: template matching - ValueError: image must be 2d / 3d array In-Reply-To: References: Message-ID: Hi Anurag On Sat, Jan 23, 2016 at 5:06 PM, Anurag wrote: > full gist and Traceback at: > https://gist.github.com/anuragphadke/48b8565a6bcaa477daa5 Please provide your input images as well. Thanks St?fan From anurag.phadke at gmail.com Sat Jan 23 20:22:34 2016 From: anurag.phadke at gmail.com (Anurag) Date: Sat, 23 Jan 2016 17:22:34 -0800 Subject: template matching - ValueError: image must be 2d / 3d array In-Reply-To: References: Message-ID: turns out, it was bug in my code, the following snippet works: https://gist.github.com/anuragphadke/56a3be21128852f69031 -anurag On Sat, Jan 23, 2016 at 5:06 PM, Anurag wrote: > Hello, > I am trying to run Template Matching code as mentioned in > http://scikit-image.org/docs/dev/auto_examples/plot_template.html, > however, on trying to read an image from file, it returns the following > error: > ValueError: The parameter `image` must be a 2-or-3-dimensional array > > full gist and Traceback at: > https://gist.github.com/anuragphadke/48b8565a6bcaa477daa5 > > Any tips on what I might be doing wrong here? tried converting image to > grayscale etc. > > > -- > Twitter: @anuragphadke (https://twitter.com/#!/anuragphadke) > -- Twitter: @anuragphadke (https://twitter.com/#!/anuragphadke) -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Wed Jan 27 13:37:37 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Wed, 27 Jan 2016 10:37:37 -0800 Subject: Fwd: [Numpy-discussion] Bump warning stacklevel In-Reply-To: <1453919177.19979.5.camel@sipsolutions.net> References: <1453919177.19979.5.camel@sipsolutions.net> Message-ID: Devs, please note the thread below. ---------- Forwarded message ---------- From: Sebastian Berg Date: Wed, Jan 27, 2016 at 10:26 AM Subject: [Numpy-discussion] Bump warning stacklevel To: Discussion of Numerical Python Hi all, in my PR about warnings suppression, I currently also have a commit which bumps the warning stacklevel to two (or three), i.e. use: warnings.warn(..., stacklevel=2) (almost) everywhere. This means that for example (take only the empty warning): np.mean([]) would not print: /usr/lib/python2.7/dist-packages/numpy/core/_methods.py:55: RuntimeWarning: Mean of empty slice. warnings.warn("Mean of empty slice.", RuntimeWarning) but instead print the actual `np.mean([])` code line (the repetition of the warning command is always a bit funny). The advantage is nicer printing for the user. The disadvantage would probably mostly be that existing warning filters that use the `module` keyword argument, will fail. Any objections/thoughts about doing this change to try to better report the offending code line? Frankly, I am not sure whether there might be a python standard about this, but I would expect that for a library such as numpy, it makes sense to change. But, if downstream uses warning filters with modules, we might want to reconsider for example. - Sebastian _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion at scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From matteo.niccoli at gmail.com Thu Jan 28 11:14:32 2016 From: matteo.niccoli at gmail.com (Matteo) Date: Thu, 28 Jan 2016 08:14:32 -0800 (PST) Subject: How to apply/attach a colormap from an image to another image Message-ID: <85862102-36c9-4f08-8476-88d37e0fca40@googlegroups.com> Can something like this (which by the way I can't get to work) be done using scikit-image? http://stackoverflow.com/questions/3114925/pil-convert-rgb-image-to-a-specific-8-bit-palette I've done similar things in Matlab before: https://mycarta.wordpress.com/2012/04/05/visualization-tips-for-geoscientists-matlab-part-ii/ but I'd really like to be able to do it in Python. What I would like to do currently is: 1) Import an RGB image, which would have its own colormap - say this one for example: https://upload.wikimedia.org/wikipedia/commons/b/b3/Jupiter_new_hubble_view_above_pole.png 2) convert it to intensity, say like this: intnst = 0.2989 * rgb[:,0] + 0.5870 * rgb[:,1] + 0.1140 * rgb[:,2] # get the intensityintensity = np.rint(intnst) # rounds up to nearest integer 3) display the intensity color-mapped to the same colours the original RGB had. Any tips, ideally withrcode or pseudocode would be greatly appreciated. Thanks, Matteo -------------- next part -------------- An HTML attachment was scrubbed... URL: From matteo.niccoli at gmail.com Thu Jan 28 11:39:28 2016 From: matteo.niccoli at gmail.com (Matteo) Date: Thu, 28 Jan 2016 08:39:28 -0800 (PST) Subject: How to apply/attach a colormap from an image to another image In-Reply-To: <85862102-36c9-4f08-8476-88d37e0fca40@googlegroups.com> References: <85862102-36c9-4f08-8476-88d37e0fca40@googlegroups.com> Message-ID: <2eb8f5cd-639f-4195-9fe1-d9bbfeefbedd@googlegroups.com> I've added a quick example to show where I am at. I would like to display the second image with the colors of the first one. Matteo On Thursday, January 28, 2016 at 9:14:32 AM UTC-7, Matteo wrote: > > Can something like this (which by the way I can't get to work) be done > using scikit-image? > > http://stackoverflow.com/questions/3114925/pil-convert-rgb-image-to-a-specific-8-bit-palette > > > I've done similar things in Matlab before: > > https://mycarta.wordpress.com/2012/04/05/visualization-tips-for-geoscientists-matlab-part-ii/ > but I'd really like to be able to do it in Python. > > > What I would like to do currently is: > 1) Import an RGB image, which would have its own colormap - say this one > for example: > > https://upload.wikimedia.org/wikipedia/commons/b/b3/Jupiter_new_hubble_view_above_pole.png > > 2) convert it to intensity, say like this: > > intnst = 0.2989 * rgb[:,0] + 0.5870 * rgb[:,1] + 0.1140 * rgb[:,2] # get the intensityintensity = np.rint(intnst) # rounds up to nearest integer > > > > 3) display the intensity color-mapped to the same colours the original > RGB had. > > Any tips, ideally withrcode or pseudocode would be greatly appreciated. > > Thanks, > Matteo > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: example.PNG Type: image/png Size: 441062 bytes Desc: not available URL: From bussonniermatthias at gmail.com Thu Jan 28 14:35:44 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 28 Jan 2016 11:35:44 -0800 (PST) Subject: How to apply/attach a colormap from an image to another image In-Reply-To: <2eb8f5cd-639f-4195-9fe1-d9bbfeefbedd@googlegroups.com> References: <85862102-36c9-4f08-8476-88d37e0fca40@googlegroups.com> <2eb8f5cd-639f-4195-9fe1-d9bbfeefbedd@googlegroups.com> Message-ID: <2b2875a5-11d1-468c-87ad-e723fa30405a@googlegroups.com> Well as was planning on writing a blog post about that, but if you ask. I've been playing with converting images from Jet to Viridis, as you can see here: https://gist.github.com/Carreau/7218a6b97fe71f698b0b It's crude, but the basic idea is to use SciPy find the closest point of a colormap from a given pixel. This can be done efficiently using KDTree of scipy (thanks Nathaniel Smith for hint), which give you a 1-255 value, that you can display again using your desired colormap. it of course sample the original colormap,so for a more precise result you might want to interpolate the value using the 2/3 closes points of the cmap, and to avoid extra pixel from the main area to be modified, you might want to use skimage connected component and pick the bigger blob. This woudl avoid artifact in the example I linked to, that you can see on the brush icon in the toolbar (the original brush color is red), and the close/minimize/maximise buttons that are also partially picked up. Is that what you like to do ? -- M Le jeudi 28 janvier 2016 08:39:28 UTC-8, Matteo a ?crit : > > > I've added a quick example to show where I am at. I would like to display > the second image with the colors of the first one. > Matteo > > On Thursday, January 28, 2016 at 9:14:32 AM UTC-7, Matteo wrote: >> >> Can something like this (which by the way I can't get to work) be done >> using scikit-image? >> >> http://stackoverflow.com/questions/3114925/pil-convert-rgb-image-to-a-specific-8-bit-palette >> >> >> I've done similar things in Matlab before: >> >> https://mycarta.wordpress.com/2012/04/05/visualization-tips-for-geoscientists-matlab-part-ii/ >> but I'd really like to be able to do it in Python. >> >> >> What I would like to do currently is: >> 1) Import an RGB image, which would have its own colormap - say this one >> for example: >> >> https://upload.wikimedia.org/wikipedia/commons/b/b3/Jupiter_new_hubble_view_above_pole.png >> >> 2) convert it to intensity, say like this: >> >> intnst = 0.2989 * rgb[:,0] + 0.5870 * rgb[:,1] + 0.1140 * rgb[:,2] # get the intensityintensity = np.rint(intnst) # rounds up to nearest integer >> >> >> >> 3) display the intensity color-mapped to the same colours the original >> RGB had. >> >> Any tips, ideally withrcode or pseudocode would be greatly appreciated. >> >> Thanks, >> Matteo >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matteo.niccoli at gmail.com Thu Jan 28 15:57:38 2016 From: matteo.niccoli at gmail.com (Matteo) Date: Thu, 28 Jan 2016 12:57:38 -0800 (PST) Subject: How to apply/attach a colormap from an image to another image In-Reply-To: <2b2875a5-11d1-468c-87ad-e723fa30405a@googlegroups.com> References: <85862102-36c9-4f08-8476-88d37e0fca40@googlegroups.com> <2eb8f5cd-639f-4195-9fe1-d9bbfeefbedd@googlegroups.com> <2b2875a5-11d1-468c-87ad-e723fa30405a@googlegroups.com> Message-ID: <3e13986c-e57c-4295-8045-f99998caa72b@googlegroups.com> Hi Matthias AWESOME!! This is a great example, thank you, it will come handy pretty soon, if you are going to share it officially, so I'd love to see the blog post about it. In my current particular case, the problem is that I do not know the colormap of the original img to begin with. Someone from a slack group suggested to convert it to a paletted image format (PNG or GIF) using PIL, then grab the palette shared a solution involving quantization. I asked for their permission to share it in here, I'll keep you posted. Back on your example of converting a bad colormap to a good one, I was working on adapting a Matlab tool by Peter Kovesi http://peterkovesi.com/projects/colourmaps/index.html My idea would be to make it into a web app called 'rainbowbot' which would automatically detect bad colormaps either form online images or user uploaded images, and then provide them with tools to either equalize the colormaps or replace with a perceptual version with same hue range, or..... It is in here https://github.com/mycarta/rainbowbot I am open to suggestions, and offers to collaborate. Matteo On Thursday, January 28, 2016 at 12:35:44 PM UTC-7, Matthias Bussonnier wrote: > > Well as was planning on writing a blog post about that, but if you ask. > > I've been playing with converting images from Jet to Viridis, as you can > see here: > > https://gist.github.com/Carreau/7218a6b97fe71f698b0b > > It's crude, but the basic idea is to use SciPy find the closest point of a > colormap from a given pixel. > This can be done efficiently using KDTree of scipy (thanks Nathaniel Smith > for hint), which give you a 1-255 value, > that you can display again using your desired colormap. > > it of course sample the original colormap,so for a more precise result you > might want to interpolate the value using the 2/3 closes points of the > cmap, and to avoid extra pixel from the main area to be modified, you might > want to use skimage connected component and pick the bigger blob. > This woudl avoid artifact in the example I linked to, that you can see on > the brush icon in the toolbar (the original brush color is red), and the > close/minimize/maximise buttons that are also partially picked up. > > Is that what you like to do ? > > -- > M > > > > Le jeudi 28 janvier 2016 08:39:28 UTC-8, Matteo a ?crit : >> >> >> I've added a quick example to show where I am at. I would like to display >> the second image with the colors of the first one. >> Matteo >> >> On Thursday, January 28, 2016 at 9:14:32 AM UTC-7, Matteo wrote: >>> >>> Can something like this (which by the way I can't get to work) be done >>> using scikit-image? >>> >>> http://stackoverflow.com/questions/3114925/pil-convert-rgb-image-to-a-specific-8-bit-palette >>> >>> >>> I've done similar things in Matlab before: >>> >>> https://mycarta.wordpress.com/2012/04/05/visualization-tips-for-geoscientists-matlab-part-ii/ >>> but I'd really like to be able to do it in Python. >>> >>> >>> What I would like to do currently is: >>> 1) Import an RGB image, which would have its own colormap - say this one >>> for example: >>> >>> https://upload.wikimedia.org/wikipedia/commons/b/b3/Jupiter_new_hubble_view_above_pole.png >>> >>> 2) convert it to intensity, say like this: >>> >>> intnst = 0.2989 * rgb[:,0] + 0.5870 * rgb[:,1] + 0.1140 * rgb[:,2] # get the intensityintensity = np.rint(intnst) # rounds up to nearest integer >>> >>> >>> >>> 3) display the intensity color-mapped to the same colours the original >>> RGB had. >>> >>> Any tips, ideally withrcode or pseudocode would be greatly appreciated. >>> >>> Thanks, >>> Matteo >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From joferkington at gmail.com Thu Jan 28 16:29:38 2016 From: joferkington at gmail.com (Joe Kington) Date: Thu, 28 Jan 2016 13:29:38 -0800 (PST) Subject: How to apply/attach a colormap from an image to another image In-Reply-To: <3e13986c-e57c-4295-8045-f99998caa72b@googlegroups.com> References: <85862102-36c9-4f08-8476-88d37e0fca40@googlegroups.com> <2eb8f5cd-639f-4195-9fe1-d9bbfeefbedd@googlegroups.com> <2b2875a5-11d1-468c-87ad-e723fa30405a@googlegroups.com> <3e13986c-e57c-4295-8045-f99998caa72b@googlegroups.com> Message-ID: Hi Folks, Matteo, I hope it's alright that I'm chiming in. I was the one Matteo mentioned on the slack group. At first I thought Matteo was referring to exactly what you described: Take a colormapped single-band image and unmap/remap the color palette. However, after farther discussion, it turns out the problem was dealing with "full" 3-band imagery (i.e. true color). Essentially an image quantization problem. For that particular use case, it's easier to use/abuse pre-existing image quantization methods in PIL or Pillow. Of course, you can also roll your own, as well: http://scikit-learn.org/stable/auto_examples/cluster/plot_color_quantization.html import Image import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as mcolors im = Image.open('Jupiter_new_hubble_view_above_pole.png') imnew = im.convert("P", palette=Image.ADAPTIVE)#, dither=Image.NONE) data = np.asarray(imnew) palette = imnew.getpalette() colors = np.array(palette).reshape(-1, 3) / 255.0 cmap = mcolors.ListedColormap(colors) fig, axes = plt.subplots(nrows=3, figsize=(8, 15)) axes[0].imshow(im) for cm, ax in zip(['gray_r', cmap], axes[1:]): cax = ax.imshow(data, cmap=cm) fig.colorbar(cax, ax=ax) fig.tight_layout() plt.show() Which produces: Cheers, -Joe On Thursday, January 28, 2016 at 2:57:39 PM UTC-6, Matteo wrote: > > Hi Matthias > > > > AWESOME!! > > This is a great example, thank you, it will come handy pretty soon, if you > are going to share it officially, so I'd love to see the blog post about > it. > > In my current particular case, the problem is that I do not know the > colormap of the original img to begin with. Someone from a slack group > suggested to convert it to a paletted image format (PNG or GIF) using PIL, > then grab the palette shared a solution involving quantization. I asked for > their permission to share it in here, I'll keep you posted. > > > > > > Back on your example of converting a bad colormap to a good one, I was > working on adapting a Matlab tool by Peter Kovesi > > http://peterkovesi.com/projects/colourmaps/index.html > > > My idea would be to make it into a web app called 'rainbowbot' which would > automatically detect bad colormaps either form online images or user > uploaded images, and then provide them with tools to either equalize the > colormaps or replace with a perceptual version with same hue range, or..... > > It is in here > > https://github.com/mycarta/rainbowbot > > I am open to suggestions, and offers to collaborate. > > Matteo > > On Thursday, January 28, 2016 at 12:35:44 PM UTC-7, Matthias Bussonnier > wrote: >> >> Well as was planning on writing a blog post about that, but if you ask. >> >> I've been playing with converting images from Jet to Viridis, as you can >> see here: >> >> https://gist.github.com/Carreau/7218a6b97fe71f698b0b >> >> It's crude, but the basic idea is to use SciPy find the closest point of >> a colormap from a given pixel. >> This can be done efficiently using KDTree of scipy (thanks Nathaniel >> Smith for hint), which give you a 1-255 value, >> that you can display again using your desired colormap. >> >> it of course sample the original colormap,so for a more precise result >> you might want to interpolate the value using the 2/3 closes points of the >> cmap, and to avoid extra pixel from the main area to be modified, you might >> want to use skimage connected component and pick the bigger blob. >> This woudl avoid artifact in the example I linked to, that you can see on >> the brush icon in the toolbar (the original brush color is red), and the >> close/minimize/maximise buttons that are also partially picked up. >> >> Is that what you like to do ? >> >> -- >> M >> >> >> >> Le jeudi 28 janvier 2016 08:39:28 UTC-8, Matteo a ?crit : >>> >>> >>> I've added a quick example to show where I am at. I would like to >>> display the second image with the colors of the first one. >>> Matteo >>> >>> On Thursday, January 28, 2016 at 9:14:32 AM UTC-7, Matteo wrote: >>>> >>>> Can something like this (which by the way I can't get to work) be done >>>> using scikit-image? >>>> >>>> http://stackoverflow.com/questions/3114925/pil-convert-rgb-image-to-a-specific-8-bit-palette >>>> >>>> >>>> I've done similar things in Matlab before: >>>> >>>> https://mycarta.wordpress.com/2012/04/05/visualization-tips-for-geoscientists-matlab-part-ii/ >>>> but I'd really like to be able to do it in Python. >>>> >>>> >>>> What I would like to do currently is: >>>> 1) Import an RGB image, which would have its own colormap - say this one >>>> for example: >>>> >>>> https://upload.wikimedia.org/wikipedia/commons/b/b3/Jupiter_new_hubble_view_above_pole.png >>>> >>>> 2) convert it to intensity, say like this: >>>> >>>> intnst = 0.2989 * rgb[:,0] + 0.5870 * rgb[:,1] + 0.1140 * rgb[:,2] # get the intensityintensity = np.rint(intnst) # rounds up to nearest integer >>>> >>>> >>>> >>>> 3) display the intensity color-mapped to the same colours the original >>>> RGB had. >>>> >>>> Any tips, ideally withrcode or pseudocode would be greatly appreciated. >>>> >>>> Thanks, >>>> Matteo >>>> >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Thu Jan 28 17:33:19 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Thu, 28 Jan 2016 14:33:19 -0800 Subject: How to apply/attach a colormap from an image to another image In-Reply-To: References: <85862102-36c9-4f08-8476-88d37e0fca40@googlegroups.com> <2eb8f5cd-639f-4195-9fe1-d9bbfeefbedd@googlegroups.com> <2b2875a5-11d1-468c-87ad-e723fa30405a@googlegroups.com> <3e13986c-e57c-4295-8045-f99998caa72b@googlegroups.com> Message-ID: On Thu, Jan 28, 2016 at 1:29 PM, Joe Kington wrote: > I was the one Matteo mentioned on the slack group. At first I thought > Matteo was referring to exactly what you described: Take a colormapped > single-band image and unmap/remap the color palette. > In one of the threads here, I read """ My idea would be to make it into a web app called 'rainbowbot' which would automatically detect bad colormaps either form online images or user uploaded images, and then provide them with tools to either equalize the colormaps or replace with a perceptual version with same hue range, or..... It is in here https://github.com/mycarta/rainbowbot I am open to suggestions, and offers to collaborate. """ Otherwise, I guess the problem is as simple as: image = color.rgb2gray(io.imread('image.jpg')) plt.imshow(image, cmap='viridis') If it is about turning false color maps into true color maps, that would be hard, given the many mappings out there. St?fan -------------- next part -------------- An HTML attachment was scrubbed... URL: From vighneshbirodkar at gmail.com Thu Jan 28 20:31:11 2016 From: vighneshbirodkar at gmail.com (Vighnesh Birodkar) Date: Thu, 28 Jan 2016 17:31:11 -0800 (PST) Subject: MSER implementation Message-ID: Hello guys I wanted to start on the implementation of the MSER[1] blob detection algorithm. I am leaning towards implementing the approach of the original paper[2], which has a linear time complexity for all practical images. The alternative is a guaranteed linear time implementation[2], but the paper does not have as many citations. Any thoughts are welcome. [1] : https://en.wikipedia.org/wiki/Maximally_stable_extremal_regions [2] : https://www.robots.ox.ac.uk/~vgg/research/affine/det_eval_files/matas_bmvc2002.pdf [3] : http://link.springer.com/chapter/10.1007%2F978-3-540-88688-4_14 Thanks Vighnesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Thu Jan 28 20:53:50 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Thu, 28 Jan 2016 17:53:50 -0800 Subject: MSER implementation In-Reply-To: References: Message-ID: Hi Vighnesh On Thu, Jan 28, 2016 at 5:31 PM, Vighnesh Birodkar wrote: > I wanted to start on the implementation of the MSER[1] blob detection > algorithm. I am leaning towards implementing the approach of the original > paper[2], which has a linear time > complexity for all practical images. The alternative is a guaranteed linear > time implementation[2], but the paper does not have as many citations. I'd say: go with the original first, especially if it is easier to implement. St?fan From bussonniermatthias at gmail.com Thu Jan 28 21:57:01 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 28 Jan 2016 18:57:01 -0800 (PST) Subject: How to apply/attach a colormap from an image to another image In-Reply-To: <3e13986c-e57c-4295-8045-f99998caa72b@googlegroups.com> References: <85862102-36c9-4f08-8476-88d37e0fca40@googlegroups.com> <2eb8f5cd-639f-4195-9fe1-d9bbfeefbedd@googlegroups.com> <2b2875a5-11d1-468c-87ad-e723fa30405a@googlegroups.com> <3e13986c-e57c-4295-8045-f99998caa72b@googlegroups.com> Message-ID: <39020469-ebf1-435e-89c0-1a9f8583cf59@googlegroups.com> Le jeudi 28 janvier 2016 12:57:39 UTC-8, Matteo a ?crit : > > Hi Matthias > > > > AWESOME!! > > This is a great example, thank you, it will come handy pretty soon, if you > are going to share it officially, so I'd love to see the blog post about > it. > > In my current particular case, the problem is that I do not know the > colormap of the original img to begin with. Someone from a slack group > suggested to convert it to a paletted image format (PNG or GIF) using PIL, > then grab the palette shared a solution involving quantization. I asked for > their permission to share it in here, I'll keep you posted. > Well, knowing the colormap is hard. In particular in the case of your Jupyter image, it is not a colormap, it is an actual many channel image, as the set of pixel is not a line on the RGB space: (cf not-cmap attached file) So "finding" the cmap and reversing it is not possible. One possibility would be to do a multidimentional regression on the RGB->luminosity dataset, and to project on this line. Basically "reconstructing" a colormap. But will inherently loose data. That should not even need scikit image, just scikit-learn. X = subset(image()) y = luminosity(subset(image)) Pca.fit(..).inverse_transform(luminosity(image)) I'm not familiar enough with scikit learn to do a non-linear fit. > > Back on your example of converting a bad colormap to a good one, I was > working on adapting a Matlab tool by Peter Kovesi > > http://peterkovesi.com/projects/colourmaps/index.html > > > My idea would be to make it into a web app called 'rainbowbot' which would > automatically detect bad colormaps either form online images or user > uploaded images, and then provide them with tools to either equalize the > colormaps or replace with a perceptual version with same hue range, or..... > > It is in here > > https://github.com/mycarta/rainbowbot > > I am open to suggestions, and offers to collaborate. > That was exactly my idea too, but to do a twitter bot you can mention. I think the "detecting" from "remapping" should be separate. Also personally I think it would be a nice communication stunt to do at the same time matplotlib 2.0 gets out, to start to "viridize" people pictures on twitter by mentioning a bot. -- M -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not-cmap.png Type: image/png Size: 26074 bytes Desc: not available URL: From stefanv at berkeley.edu Thu Jan 28 21:59:32 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Thu, 28 Jan 2016 18:59:32 -0800 Subject: How to apply/attach a colormap from an image to another image In-Reply-To: <39020469-ebf1-435e-89c0-1a9f8583cf59@googlegroups.com> References: <85862102-36c9-4f08-8476-88d37e0fca40@googlegroups.com> <2eb8f5cd-639f-4195-9fe1-d9bbfeefbedd@googlegroups.com> <2b2875a5-11d1-468c-87ad-e723fa30405a@googlegroups.com> <3e13986c-e57c-4295-8045-f99998caa72b@googlegroups.com> <39020469-ebf1-435e-89c0-1a9f8583cf59@googlegroups.com> Message-ID: On 28 January 2016 at 18:57, Matthias Bussonnier wrote: > Also personally I think it would be a nice communication stunt to do at the > same time matplotlib 2.0 gets out, to start to "viridize" people pictures on > twitter by mentioning a bot. I look forward to the "I guess you meant to use viridis" posts! St?fan From matteo.niccoli at gmail.com Fri Jan 29 09:17:03 2016 From: matteo.niccoli at gmail.com (Matteo Niccoli) Date: Fri, 29 Jan 2016 07:17:03 -0700 Subject: How to apply/attach a colormap from an image to another image Message-ID: First off, thanks Joe Your code is what I was looking for - AND, it sounds like - the thing to do, unless one wanted to embark in the kind of regression Matthias suggests. Second, St?fan, sorry for the confusion about the rainbowbot, that was an aside, I happened to post on both of them at the same time, but really the Jupiter idea was more because I was playing with image size reduction via conversion to intensity and component reduction via PCA, and was wondering how one could compare the quality of the result with the input image, but in color as opposed to in grayscale. Matthias, I think it would be fun to work together on the rainbowbot idea, and then to send those 'viridize' tweets. I'll send you an email with some ideas. Cheers, Matteo On Thu, Jan 28, 2016 at 3:33 PM, St?fan van der Walt wrote: > > On Thu, Jan 28, 2016 at 1:29 PM, Joe Kington > wrote: > > >> I was the one Matteo mentioned on the slack group. At first I thought >> Matteo was referring to exactly what you described: Take a colormapped >> single-band image and unmap/remap the color palette. >> > > In one of the threads here, I read > > """ > > My idea would be to make it into a web app called 'rainbowbot' which would > automatically detect bad colormaps either form online images or user > uploaded images, and then provide them with tools to either equalize the > colormaps or replace with a perceptual version with same hue range, or..... > > It is in here > > https://github.com/mycarta/rainbowbot > I am open to suggestions, and offers to collaborate. > """ > > Otherwise, I guess the problem is as simple as: > > image = color.rgb2gray(io.imread('image.jpg')) > plt.imshow(image, cmap='viridis') > > If it is about turning false color maps into true color maps, that would > be hard, given the many mappings out there. > > St?fan > > -- > You received this message because you are subscribed to a topic in the > Google Groups "scikit-image" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/scikit-image/jxD0GTK_8B4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > scikit-image+unsubscribe at googlegroups.com. > To post to this group, send email to scikit-image at googlegroups.com. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/scikit-image/CABDkGQm59%2BHikycM3uxJpEw_kcbQF8bCxozivT6Ujm%3DQ57Ke4g%40mail.gmail.com > > . > > For more options, visit https://groups.google.com/d/optout. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Sun Jan 31 11:53:54 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Sun, 31 Jan 2016 08:53:54 -0800 Subject: 0.12 release In-Reply-To: <20160131155247.GB819538@phare.normalesup.org> References: <4D387154-865D-4846-B9B6-DFCA10F8C334@demuc.de> <20160131155247.GB819538@phare.normalesup.org> Message-ID: Hi Emma On 31 January 2016 at 07:52, Emmanuelle Gouillart wrote: > St?fan, do you want these PRs to be merged for 0.12? Can you estimate > when they should be ready? I'll make the last changes to those PRs now. If, after that, they are not ready to merge, let us not hold up the whole release. > I can take care of the release process as described in our RELEASE.txt, > but it would be the first time for me so I'll probably need some help > along the process! That is very kind of you! I am happy to lend a hand as and where needed. St?fan From stefanv at berkeley.edu Sun Jan 31 12:52:25 2016 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Sun, 31 Jan 2016 09:52:25 -0800 Subject: 0.12 release In-Reply-To: <20160131165818.GC819538@phare.normalesup.org> References: <4D387154-865D-4846-B9B6-DFCA10F8C334@demuc.de> <20160131155247.GB819538@phare.normalesup.org> <20160131165818.GC819538@phare.normalesup.org> Message-ID: On 31 January 2016 at 08:58, Emmanuelle Gouillart wrote: >> > St?fan, do you want these PRs to be merged for 0.12? Can you estimate >> > when they should be ready? > >> I'll make the last changes to those PRs now. If, after that, they are >> not ready to merge, let us not hold up the whole release. I've made updates to those PRs. Unfortunately, I will be out for most of the rest of the day, but feel free to update those PRs--I've added Emma, Johannes, Josh and Juan as collaborators on my fork. Thanks again! St?fan From simone at codeluppi.org Sun Jan 31 19:52:09 2016 From: simone at codeluppi.org (Simone Codeluppi) Date: Sun, 31 Jan 2016 16:52:09 -0800 (PST) Subject: dev version installation Message-ID: <25621627-8a66-44c8-bac2-47df2b6895ae@googlegroups.com> Hi I tried to install the dev version (0.12x) on anaconda using the command posted on the website : git clone https://github.com/scikit-image/scikit-image.git followed by git pull and compiling of the modified extensions I still get: 0.11.dev0 Any idea on what i can be doing wrong? Thanks a lot for the help! Simone -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuelle.gouillart at nsup.org Sun Jan 31 10:52:47 2016 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Sun, 31 Jan 2016 16:52:47 +0100 Subject: 0.12 release In-Reply-To: References: <4D387154-865D-4846-B9B6-DFCA10F8C334@demuc.de> Message-ID: <20160131155247.GB819538@phare.normalesup.org> We only have 3 PRs started by St??fan marked for 0.12, so we're indeed very close! Out of these 3, 2 are almost ready to merge, and the last one (about the novice module) could be postponed to 0.13 without much damage (if I'm not mistaken; St??fan, you might have a different opinion). St??fan, do you want these PRs to be merged for 0.12? Can you estimate when they should be ready? I can take care of the release process as described in our RELEASE.txt, but it would be the first time for me so I'll probably need some help along the process! Best, Emma On Thu, Jan 21, 2016 at 06:04:11PM -0800, St??fan van der Walt wrote: > On Wed, Jan 20, 2016 at 1:18 PM, Johannes Sch??nberger wrote: > > It's been a while since we had a release and lots of great stuff has been merged in the mean time. I suggest to freeze any other PRs until we release 0.12. Maybe we can aim to release 0.12 in the next days? > Yes, we're very close now! We're starting to see the effect of the > package & userbase growing: in the past, we'd release, and people > would come back with a few bug reports. Now, simply planning a > release triggers new bug reports, making the milestone grow and grow! > But the list is now shrinking rapidly. > Thanks all for your hard work! > St??fan From emmanuelle.gouillart at nsup.org Sun Jan 31 11:58:18 2016 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Sun, 31 Jan 2016 17:58:18 +0100 Subject: 0.12 release In-Reply-To: References: <4D387154-865D-4846-B9B6-DFCA10F8C334@demuc.de> <20160131155247.GB819538@phare.normalesup.org> Message-ID: <20160131165818.GC819538@phare.normalesup.org> > > St??fan, do you want these PRs to be merged for 0.12? Can you estimate > > when they should be ready? > I'll make the last changes to those PRs now. If, after that, they are > not ready to merge, let us not hold up the whole release. Awesome! From GitHub's activity there are several devs around today, so we should be able to review and hopefully merge today. > > I can take care of the release process as described in our RELEASE.txt, > > but it would be the first time for me so I'll probably need some help > > along the process! > That is very kind of you! I am happy to lend a hand as and where needed. Thanks! Emma From emmanuelle.gouillart at nsup.org Sun Jan 31 14:58:15 2016 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Sun, 31 Jan 2016 20:58:15 +0100 Subject: 0.12 release In-Reply-To: References: <4D387154-865D-4846-B9B6-DFCA10F8C334@demuc.de> <20160131155247.GB819538@phare.normalesup.org> <20160131165818.GC819538@phare.normalesup.org> Message-ID: <20160131195815.GD819538@phare.normalesup.org> One more request, especially to the core team: could we restrain ourselves from adding new PRs to the 0.12 milestone, except for bad bug fixes? We need to converge at some point :-). Emma On Sun, Jan 31, 2016 at 09:52:25AM -0800, St??fan van der Walt wrote: > On 31 January 2016 at 08:58, Emmanuelle Gouillart > wrote: > >> > St??fan, do you want these PRs to be merged for 0.12? Can you estimate > >> > when they should be ready? > > > >> I'll make the last changes to those PRs now. If, after that, they are > >> not ready to merge, let us not hold up the whole release. > > I've made updates to those PRs. Unfortunately, I will be out for most > of the rest of the day, but feel free to update those PRs--I've added > Emma, Johannes, Josh and Juan as collaborators on my fork. > > Thanks again! > > St??fan > > -- > You received this message because you are subscribed to the Google Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe at googlegroups.com. > To post to this group, send an email to scikit-image at googlegroups.com. > To view this discussion on the web, visit https://groups.google.com/d/msgid/scikit-image/CABDkGQk7emQRwk9W5-sRZ0nq8gS%2Bj5TLJ3GBC7RTcnQ7umzTDQ%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. From jsch at demuc.de Sun Jan 31 15:35:45 2016 From: jsch at demuc.de (=?UTF-8?Q?Johannes_Sch=C3=B6nberger?=) Date: Sun, 31 Jan 2016 21:35:45 +0100 Subject: 0.12 release In-Reply-To: <20160131195815.GD819538@phare.normalesup.org> References: <4D387154-865D-4846-B9B6-DFCA10F8C334@demuc.de> <20160131155247.GB819538@phare.normalesup.org> <20160131165818.GC819538@phare.normalesup.org> <20160131195815.GD819538@phare.normalesup.org> Message-ID: <-6724546148968632515@unknownmsgid> Agreed and apologies :-) No more PRs from my side. > On Jan 31, 2016, at 20:58, Emmanuelle Gouillart wrote: > > One more request, especially to the core team: could we restrain > ourselves from adding new PRs to the 0.12 milestone, except for bad bug > fixes? We need to converge at some point :-). > > Emma > >> On Sun, Jan 31, 2016 at 09:52:25AM -0800, St?fan van der Walt wrote: >> On 31 January 2016 at 08:58, Emmanuelle Gouillart >> wrote: >>>>> St?fan, do you want these PRs to be merged for 0.12? Can you estimate >>>>> when they should be ready? >>> >>>> I'll make the last changes to those PRs now. If, after that, they are >>>> not ready to merge, let us not hold up the whole release. >> >> I've made updates to those PRs. Unfortunately, I will be out for most >> of the rest of the day, but feel free to update those PRs--I've added >> Emma, Johannes, Josh and Juan as collaborators on my fork. >> >> Thanks again! >> >> St?fan >> >> -- >> You received this message because you are subscribed to the Google Groups "scikit-image" group. >> To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe at googlegroups.com. >> To post to this group, send an email to scikit-image at googlegroups.com. >> To view this discussion on the web, visit https://groups.google.com/d/msgid/scikit-image/CABDkGQk7emQRwk9W5-sRZ0nq8gS%2Bj5TLJ3GBC7RTcnQ7umzTDQ%40mail.gmail.com. >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups "scikit-image" group. > To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe at googlegroups.com. > To post to this group, send an email to scikit-image at googlegroups.com. > To view this discussion on the web, visit https://groups.google.com/d/msgid/scikit-image/20160131195815.GD819538%40phare.normalesup.org. > For more options, visit https://groups.google.com/d/optout.