From stefanv at berkeley.edu Thu Oct 1 10:59:15 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Thu, 01 Oct 2015 07:59:15 -0700 Subject: Interactive gallery In-Reply-To: <560BC8F5.90503@cadair.com> References: <87k2r8pdua.fsf@berkeley.edu> <87io6spdsl.fsf@berkeley.edu> <560BC8F5.90503@cadair.com> Message-ID: <877fn6prcs.fsf@berkeley.edu> Hi Stuart On 2015-09-30 04:35:17, Stuart Mumford wrote: > I might be able to be persuaded to do this. I am currently looking at > galleries for various SunPy related projects. Fantastic! What kind of persuasion can I offer? > Where are you hosting this at the moment? We have access to ci.scipy.org. It used to be running there (so it may simply be a matter of restarting + cleaning up the system), but it's down at the moment and Rishab doesn't have time to look at it. Thank you! St?fan From stuart at cadair.com Fri Oct 2 05:10:41 2015 From: stuart at cadair.com (Stuart Mumford) Date: Fri, 2 Oct 2015 10:10:41 +0100 Subject: Interactive gallery In-Reply-To: <877fn6prcs.fsf@berkeley.edu> References: <87k2r8pdua.fsf@berkeley.edu> <87io6spdsl.fsf@berkeley.edu> <560BC8F5.90503@cadair.com> <877fn6prcs.fsf@berkeley.edu> Message-ID: <560E4A11.8050003@cadair.com> Hi, >> I might be able to be persuaded to do this. I am currently looking at >> galleries for various SunPy related projects. > Fantastic! What kind of persuasion can I offer? Some way of sharing the infrastructure for SunPy would be rather persuasive. ;) > >> Where are you hosting this at the moment? > We have access to ci.scipy.org. It used to be running there (so it may > simply be a matter of restarting + cleaning up the system), but it's > down at the moment and Rishab doesn't have time to look at it. If you want to contact me off-list and talk about how to login to this thing I can try and take a look over the next week or so. Stuart -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Fri Oct 2 13:51:44 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Fri, 02 Oct 2015 10:51:44 -0700 Subject: Interactive gallery In-Reply-To: <560E4A11.8050003@cadair.com> References: <87k2r8pdua.fsf@berkeley.edu> <87io6spdsl.fsf@berkeley.edu> <560BC8F5.90503@cadair.com> <877fn6prcs.fsf@berkeley.edu> <560E4A11.8050003@cadair.com> Message-ID: <877fn5nopb.fsf@berkeley.edu> On 2015-10-02 02:10:41, Stuart Mumford wrote: >>> I might be able to be persuaded to do this. I am currently looking at >>> galleries for various SunPy related projects. >> Fantastic! What kind of persuasion can I offer? > > Some way of sharing the infrastructure for SunPy would be rather > persuasive. ;) Totally doable. I'll follow up off-list with further detail. St?fan From siqueiraaf at gmail.com Fri Oct 9 17:52:44 2015 From: siqueiraaf at gmail.com (Alexandre Fioravante de Siqueira) Date: Fri, 9 Oct 2015 14:52:44 -0700 (PDT) Subject: Adding Multi-Level Starlet Segmentation on scikit-image (or not) Message-ID: <490bfbb8-9bac-439b-a0eb-7d6a670dbff5@googlegroups.com> Hi guys, this is Alex. How do you do? I told to Stefan, Emmanuelle and Gael earlier about the possibility of incorporating a segmentation technique we developed from an undecimated wavelet. We have three studies using this technique. My Scholar shows how the papers are performing so far (kinda bad): https://scholar.google.com.br/citations?user=B_QXAysAAAAJ&hl=en Also, I'd like to write a book on DIP using scikit-image. What do you guys think about it? Thank you very much. Any help will be really appreciated. See ya! Alex -- Contact me on http://www.programandociencia.com/sobre/. Have a nice one! -------------- next part -------------- An HTML attachment was scrubbed... URL: From kak0iy0kunai at gmail.com Sat Oct 10 01:54:17 2015 From: kak0iy0kunai at gmail.com (Benny Lichtner) Date: Fri, 9 Oct 2015 22:54:17 -0700 (PDT) Subject: scipy.ndimage.morphology.binary_opening performance vs. cv2.morphologyEx Message-ID: <837a4823-b866-4a3f-9fa4-0e7288d6b412@googlegroups.com> Hey, all. I've been using scipy.ndimage.morphology.binary_opening on images around 15000 x 5000 in size (scans of old seismograms!). I did a quick comparison with open cv's cv2.morphologyEx and noticed the cv2 opening was about 10x faster. Is this expected? I don't know much about how scipy and opencv differ under the hood. If unexpected, I'll take a closer look at the two. (I was kindly pointed to this google group by folks replying to my github issue: https://github.com/scipy/scipy/issues/5333.) --Benny -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Sat Oct 10 02:57:35 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Fri, 09 Oct 2015 23:57:35 -0700 Subject: scipy.ndimage.morphology.binary_opening performance vs. cv2.morphologyEx In-Reply-To: <837a4823-b866-4a3f-9fa4-0e7288d6b412@googlegroups.com> References: <837a4823-b866-4a3f-9fa4-0e7288d6b412@googlegroups.com> Message-ID: <878u7bky74.fsf@berkeley.edu> Hi Benny On 2015-10-09 22:54:17, Benny Lichtner wrote: > Hey, all. I've been using scipy.ndimage.morphology.binary_opening on images > around 15000 x 5000 in size (scans of old seismograms!). I did a quick > comparison with open cv's cv2.morphologyEx and noticed the cv2 opening was > about 10x faster. > > Is this expected? I don't know much about how scipy and opencv differ under > the hood. If unexpected, I'll take a closer look at the two. That sounds about right; OpenCV has highly optimized code. In this case, we are simply calling through to scipy's ndimage module. One thing you can try is to parallelize the operation?if you had four cores, then you'd probably get about a 3x speedup. See skimage.util.apply_parallel Another option would be to implement the specific operation you want in numba (fortunately, binary opening is not hard to do). > (I was kindly pointed to this google group by folks replying to my github > issue: https://github.com/scipy/scipy/issues/5333.) I see they already mentioned some of the things I did above?but feel free to ask if you have any further questions! Regards St?fan From stefanv at berkeley.edu Wed Oct 14 13:14:20 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Wed, 14 Oct 2015 10:14:20 -0700 Subject: Help by implementing Haar-like features Message-ID: <877fmptlsj.fsf@berkeley.edu> Hi everyone Jake VanderPlas recently asked me whether we have Haar-like features implemented. We don't, even though there has been an open issue for a while: https://github.com/scikit-image/scikit-image/issues/1431 This is not a hard piece of code to write?someone just needs to spend the time to do it. If you want to help make an impact on the library, this would be an excellent addition. St?fan From stefanv at berkeley.edu Wed Oct 14 13:37:30 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Wed, 14 Oct 2015 10:37:30 -0700 Subject: Help by implementing Haar-like features In-Reply-To: <561E8EFB.6040400@gmail.com> References: <877fmptlsj.fsf@berkeley.edu> <561E8EFB.6040400@gmail.com> Message-ID: <876129tkpx.fsf@berkeley.edu> On 2015-10-14 10:20:59, bricklemacho at gmail.com wrote: > Is this related to: > http://warmspringwinds.github.io/gsoc/face_detection/scikit_image/2015/05/22/google-summer-of-code-patent-free-face-detection-for-scikit-image-in-python.-introduction/ > ? That is work done by Daniil Pakhomov for this year's Google Summer of Code. He implemented Multiblock Local Binary Patterns, another kind of feature. > Anyway, I will have some free time in about a week. If no one else puts > their hand up, I can give it go. Fantastic, thank you Michael! St?fan From stefanv at berkeley.edu Wed Oct 14 17:53:01 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Wed, 14 Oct 2015 14:53:01 -0700 Subject: Adding Multi-Level Starlet Segmentation on scikit-image (or not) In-Reply-To: <490bfbb8-9bac-439b-a0eb-7d6a670dbff5@googlegroups.com> References: <490bfbb8-9bac-439b-a0eb-7d6a670dbff5@googlegroups.com> Message-ID: <87fv1drubm.fsf@berkeley.edu> Hi Alex Sorry for the late reply! On 2015-10-09 14:52:44, Alexandre Fioravante de Siqueira wrote: > I told to Stefan, Emmanuelle and Gael earlier about the possibility of > incorporating a segmentation technique we developed from an undecimated > wavelet. How about putting together an example of what your technique can do, similar to a gallery example? You can also considering publishing it as a blog post. I think this will go a long way to encourage people to try it. > Also, I'd like to write a book on DIP using scikit-image. What do you guys > think about it? I'd be happy to see a book?I wish I had time to write it! Even better would be if some of the book material could make its way into the user guide, but that is not usually a very enticing offer to authors :) Looking forward to working with you, St?fan From bricklemacho at gmail.com Wed Oct 14 13:20:59 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Thu, 15 Oct 2015 01:20:59 +0800 Subject: Help by implementing Haar-like features In-Reply-To: <877fmptlsj.fsf@berkeley.edu> References: <877fmptlsj.fsf@berkeley.edu> Message-ID: <561E8EFB.6040400@gmail.com> Is this related to: http://warmspringwinds.github.io/gsoc/face_detection/scikit_image/2015/05/22/google-summer-of-code-patent-free-face-detection-for-scikit-image-in-python.-introduction/ ? Anyway, I will have some free time in about a week. If no one else puts their hand up, I can give it go. Regards, Michael. -- On 15/10/2015 1:14 am, Stefan van der Walt wrote: > Hi everyone > > Jake VanderPlas recently asked me whether we have Haar-like features > implemented. We don't, even though there has been an open issue for a > while: > > https://github.com/scikit-image/scikit-image/issues/1431 > > This is not a hard piece of code to write?someone just needs to spend > the time to do it. If you want to help make an impact on the library, > this would be an excellent addition. > > St?fan > From siqueiraaf at gmail.com Thu Oct 15 08:09:36 2015 From: siqueiraaf at gmail.com (Alexandre Fioravante de Siqueira) Date: Thu, 15 Oct 2015 05:09:36 -0700 (PDT) Subject: Adding Multi-Level Starlet Segmentation on scikit-image (or not) In-Reply-To: <87fv1drubm.fsf@berkeley.edu> References: <490bfbb8-9bac-439b-a0eb-7d6a670dbff5@googlegroups.com> <87fv1drubm.fsf@berkeley.edu> Message-ID: Hi St?fan, How about putting together an example of what your technique can do, > similar to a gallery example? You can also considering publishing it as > a blog post. I think this will go a long way to encourage people to try > it. > Thanks! Awesome idea, I'll do that. I'd be happy to see a book?I wish I had time to write it! Even better > would be if some of the book material could make its way into the user > guide, but that is not usually a very enticing offer to authors :) > I had a proposal from a publisher, but I'll tell you what: I'm thinking on releasing an open book first (like Allen Downey did on Think Python). I'll start to write it. Could you guys help with some hints during the process? About text, code, that stuff :) Thanks again! Have a nice one! Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Thu Oct 15 14:40:27 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Thu, 15 Oct 2015 11:40:27 -0700 Subject: Adding Multi-Level Starlet Segmentation on scikit-image (or not) In-Reply-To: References: <490bfbb8-9bac-439b-a0eb-7d6a670dbff5@googlegroups.com> <87fv1drubm.fsf@berkeley.edu> Message-ID: <87twpsq8kk.fsf@berkeley.edu> Hi Alex On 2015-10-15 05:09:36, Alexandre Fioravante de Siqueira wrote: > I'd be happy to see a book?I wish I had time to write it! Even better >> would be if some of the book material could make its way into the user >> guide, but that is not usually a very enticing offer to authors :) > > I had a proposal from a publisher, but I'll tell you what: I'm thinking on > releasing an open book first (like Allen Downey did on Think Python). > I'll start to write it. Could you guys help with some hints during the > process? About text, code, that stuff :) If you write an open book, I think we'll all be more than happy to come up with suggestions and ideas. And, of course, you may also borrow freely from our tutorial repository, gallery, etc. St?fan From siqueiraaf at gmail.com Thu Oct 15 17:29:56 2015 From: siqueiraaf at gmail.com (Alexandre Fioravante de Siqueira) Date: Thu, 15 Oct 2015 14:29:56 -0700 (PDT) Subject: Adding Multi-Level Starlet Segmentation on scikit-image (or not) In-Reply-To: <87twpsq8kk.fsf@berkeley.edu> References: <490bfbb8-9bac-439b-a0eb-7d6a670dbff5@googlegroups.com> <87fv1drubm.fsf@berkeley.edu> <87twpsq8kk.fsf@berkeley.edu> Message-ID: <497da66b-22d9-49ec-9460-9a862192fb39@googlegroups.com> Hi St?fan, If you write an open book, I think we'll all be more than happy to come > up with suggestions and ideas. And, of course, you may also borrow > freely from our tutorial repository, gallery, etc. > I couldn't be happier! I'll start at once! I'll keep in touch with you guys during this. Thanks! Talk to you soon! Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.t.wilson.bak at googlemail.com Sun Oct 18 21:09:59 2015 From: r.t.wilson.bak at googlemail.com (Robin Wilson) Date: Sun, 18 Oct 2015 18:09:59 -0700 (PDT) Subject: _intel_fast_memset error - any ideas? Message-ID: Hi, I'm trying to get skimage working on my university supercomputer. I'm sure I've had a previous version working - but unfortunately the supercomputer has been upgraded since then. I've installed via pip, but get the following error when I import threshold_otsu from skimage.filters: ImportError: /home/rtw1v07/.local/lib/python2.7/site-packages/skimage/filters/rank/generic_cy.so: undefined symbol: _intel_fast_memset I've reported this to the supercomputer support people, as I suspect it may be some sort of compiler issue - but they're taking ages to respond so I just wondered if anyone here might have any ideas. Does anyone have an idea as to where I should start looking? Cheers, Robin -------------- next part -------------- An HTML attachment was scrubbed... URL: From silvertrumpet999 at gmail.com Mon Oct 19 19:17:24 2015 From: silvertrumpet999 at gmail.com (Josh Warner) Date: Mon, 19 Oct 2015 16:17:24 -0700 (PDT) Subject: _intel_fast_memset error - any ideas? In-Reply-To: References: Message-ID: <7dddcc46-a61d-4d04-a93c-5dbec1916d77@googlegroups.com> My first question is this: Have you reinstalled or recompiled since the system was upgraded? This kind of error can crop up when you change compilers or the underlying system significantly enough that the previous compilation is no longer understood. If not, that's the first thing to try as it's simple and easy. See also these links for more info about that error and troubleshooting compilers and environments: https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/267846 https://mail.scipy.org/pipermail/numpy-discussion/2011-August/058089.html Let us know how it goes! Josh On Sunday, October 18, 2015 at 8:09:59 PM UTC-5, Robin Wilson wrote: > > Hi, > > I'm trying to get skimage working on my university supercomputer. I'm sure > I've had a previous version working - but unfortunately the supercomputer > has been upgraded since then. I've installed via pip, but get the following > error when I import threshold_otsu from skimage.filters: > > ImportError: > /home/rtw1v07/.local/lib/python2.7/site-packages/skimage/filters/rank/generic_cy.so: > undefined symbol: _intel_fast_memset > > I've reported this to the supercomputer support people, as I suspect it > may be some sort of compiler issue - but they're taking ages to respond so > I just wondered if anyone here might have any ideas. Does anyone have an > idea as to where I should start looking? > > Cheers, > > Robin > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.t.wilson.bak at googlemail.com Thu Oct 22 15:47:11 2015 From: r.t.wilson.bak at googlemail.com (Robin Wilson) Date: Thu, 22 Oct 2015 12:47:11 -0700 (PDT) Subject: _intel_fast_memset error - any ideas? In-Reply-To: <7dddcc46-a61d-4d04-a93c-5dbec1916d77@googlegroups.com> References: <7dddcc46-a61d-4d04-a93c-5dbec1916d77@googlegroups.com> Message-ID: Hi, The supercomputer admin guys got back to me today and we worked out what the problem was. They have a 'module' system where you can load various different libraries (various different versions of the GCC and Intel compiler suites, and various other tools and libraries) and it was configured so that it loaded some strange libraries by default with python, but without loading *all* of the required libraries. Basically, by forcing it to just load a normal GCC compiler, I could reinstall (which recompiled using GCC) and then it worked fine. Thanks, Robin On Tuesday, 20 October 2015 00:17:24 UTC+1, Josh Warner wrote: > > My first question is this: Have you reinstalled or recompiled since the > system was upgraded? This kind of error can crop up when you change > compilers or the underlying system significantly enough that the previous > compilation is no longer understood. > > If not, that's the first thing to try as it's simple and easy. > > See also these links for more info about that error and troubleshooting > compilers and environments: > > https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/267846 > https://mail.scipy.org/pipermail/numpy-discussion/2011-August/058089.html > > Let us know how it goes! > > Josh > > On Sunday, October 18, 2015 at 8:09:59 PM UTC-5, Robin Wilson wrote: >> >> Hi, >> >> I'm trying to get skimage working on my university supercomputer. I'm >> sure I've had a previous version working - but unfortunately the >> supercomputer has been upgraded since then. I've installed via pip, but get >> the following error when I import threshold_otsu from skimage.filters: >> >> ImportError: >> /home/rtw1v07/.local/lib/python2.7/site-packages/skimage/filters/rank/generic_cy.so: >> undefined symbol: _intel_fast_memset >> >> I've reported this to the supercomputer support people, as I suspect it >> may be some sort of compiler issue - but they're taking ages to respond so >> I just wondered if anyone here might have any ideas. Does anyone have an >> idea as to where I should start looking? >> >> Cheers, >> >> Robin >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Thu Oct 22 17:37:10 2015 From: stefanv at berkeley.edu (Stefan van der Walt) Date: Thu, 22 Oct 2015 14:37:10 -0700 Subject: _intel_fast_memset error - any ideas? In-Reply-To: References: <7dddcc46-a61d-4d04-a93c-5dbec1916d77@googlegroups.com> Message-ID: <87oafqmvp5.fsf@berkeley.edu> On 2015-10-22 12:47:11, Robin Wilson wrote: > The supercomputer admin guys got back to me today and we worked out what > the problem was. They have a 'module' system where you can load various > different libraries (various different versions of the GCC and Intel > compiler suites, and various other tools and libraries) and it was > configured so that it loaded some strange libraries by default with python, > but without loading *all* of the required libraries. > > Basically, by forcing it to just load a normal GCC compiler, I could > reinstall (which recompiled using GCC) and then it worked fine. Thanks for letting us know, Robin. It's good to be aware of some of these intricacies?I would never have guessed. St?fan From ashz at walla.co.il Fri Oct 23 03:31:13 2015 From: ashz at walla.co.il (ashz at walla.co.il) Date: Fri, 23 Oct 2015 00:31:13 -0700 (PDT) Subject: Boundary/outline of objects in an Image Message-ID: Hi, I try to focus on scikit-image instead of other non-open source software. Therefore, is there an example how to boundary/outline of objects in an Image? Something like this tutorial: http://www.mathworks.com/help/images/boundary-tracing-in-images.html Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefanv at berkeley.edu Sat Oct 24 10:23:00 2015 From: stefanv at berkeley.edu (=?UTF-8?Q?St=C3=A9fan_van_der_Walt?=) Date: Sat, 24 Oct 2015 07:23:00 -0700 Subject: Help by implementing Haar-like features In-Reply-To: <562B69F3.2060804@gmail.com> References: <877fmptlsj.fsf@berkeley.edu> <561E8EFB.6040400@gmail.com> <876129tkpx.fsf@berkeley.edu> <562B69F3.2060804@gmail.com> Message-ID: On Oct 24, 2015 6:22 AM, "bricklemacho at gmail.com" wrote: > > I will start working on this over the weekend. Thank you, and looking forward to the result! St?fan -------------- next part -------------- An HTML attachment was scrubbed... URL: From bricklemacho at gmail.com Sat Oct 24 07:22:27 2015 From: bricklemacho at gmail.com (bricklemacho at gmail.com) Date: Sat, 24 Oct 2015 19:22:27 +0800 Subject: Help by implementing Haar-like features In-Reply-To: <876129tkpx.fsf@berkeley.edu> References: <877fmptlsj.fsf@berkeley.edu> <561E8EFB.6040400@gmail.com> <876129tkpx.fsf@berkeley.edu> Message-ID: <562B69F3.2060804@gmail.com> Hi, I will start working on this over the weekend. Michael. -- On 15/10/2015 1:37 am, Stefan van der Walt wrote: > On 2015-10-14 10:20:59, bricklemacho at gmail.com wrote: >> Is this related to: >> http://warmspringwinds.github.io/gsoc/face_detection/scikit_image/2015/05/22/google-summer-of-code-patent-free-face-detection-for-scikit-image-in-python.-introduction/ >> ? > That is work done by Daniil Pakhomov for this year's Google Summer of > Code. He implemented Multiblock Local Binary Patterns, another kind of > feature. > >> Anyway, I will have some free time in about a week. If no one else puts >> their hand up, I can give it go. > Fantastic, thank you Michael! > > St?fan > From r.t.wilson.bak at googlemail.com Mon Oct 26 04:25:48 2015 From: r.t.wilson.bak at googlemail.com (Robin Wilson) Date: Mon, 26 Oct 2015 01:25:48 -0700 (PDT) Subject: Pixel-boundary contours for segmentation visualisation Message-ID: <51647632-5b6c-477a-be0b-7eabe5954c50@googlegroups.com> Hi, I'm struggling with a problem that I'm sure has been solved before - and probably by some users of this mailing list! I have a segmentation image and I want to extract the edges of the segments and show them on the original image. This sounds nice and easy, so I had a go using the matplotlib contour function and got the following: >From my perspective, there are two issues with this: one is that the two segments (which are separate by pixels with the value zero) are actually joined, and the other is that the segment outlines don't follow the pixel boundaries: they are offset by around half a pixel, and 'cut the corners'. What I'd really like to produce is the following: (if you look carefully you can see the blue outline around the edge of the segment) Does anyone know how to do this easily (and, ideally, reasonably quickly) in Python? From my investigations it seems that the contour function won't do what I want - but I can't find anything else that will do this, and I'd rather not implement something from scratch. Any thoughts? Robin -------------- next part -------------- An HTML attachment was scrubbed... URL: From jni.soma at gmail.com Mon Oct 26 04:33:28 2015 From: jni.soma at gmail.com (Juan Nunez-Iglesias) Date: Mon, 26 Oct 2015 01:33:28 -0700 (PDT) Subject: Pixel-boundary contours for segmentation visualisation In-Reply-To: <51647632-5b6c-477a-be0b-7eabe5954c50@googlegroups.com> References: <51647632-5b6c-477a-be0b-7eabe5954c50@googlegroups.com> Message-ID: <1445848408733.076193e1@Nodemailer> Hi Robin! Well, the easy workaround is to zoom your image a lot using ndi.zoom or skimage.transform.rescale, and then use mpl's contour. =) The potentially slower way is to use scikit-image.segmentation.mark_boundary with mode=subpixel. =) Juan. On Mon, Oct 26, 2015 at 7:25 PM, Robin Wilson wrote: > Hi, > I'm struggling with a problem that I'm sure has been solved before - and > probably by some users of this mailing list! I have a segmentation image > and I want to extract the edges of the segments and show them on the > original image. This sounds nice and easy, so I had a go using the > matplotlib contour function and got the following: > > From my perspective, there are two issues with this: one is that the two > segments (which are separate by pixels with the value zero) are actually > joined, and the other is that the segment outlines don't follow the pixel > boundaries: they are offset by around half a pixel, and 'cut the corners'. > What I'd really like to produce is the following: > > (if you look carefully you can see the blue outline around the edge of the > segment) > Does anyone know how to do this easily (and, ideally, reasonably quickly) > in Python? From my investigations it seems that the contour function won't > do what I want - but I can't find anything else that will do this, and I'd > rather not implement something from scratch. > Any thoughts? > Robin > -- > 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. > For more options, visit https://groups.google.com/d/optout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.t.wilson.bak at googlemail.com Mon Oct 26 05:02:33 2015 From: r.t.wilson.bak at googlemail.com (Robin Wilson) Date: Mon, 26 Oct 2015 02:02:33 -0700 (PDT) Subject: Pixel-boundary contours for segmentation visualisation In-Reply-To: <1445848408733.076193e1@Nodemailer> References: <51647632-5b6c-477a-be0b-7eabe5954c50@googlegroups.com> <1445848408733.076193e1@Nodemailer> Message-ID: Thanks for the quick reply Juan. I'm going to be picky now...! I've tried the mark_boundary approach, but I hadn't realised that it produced raster boundaries, so they look rather blurry in the output image: I imagine I could probably use the information from find_boundaries to produce lists of vector points that I could then plot with matplotlib - to get a nice vector overlay. Before I implement that, has anyone done that already? Thanks, Robin On Monday, 26 October 2015 08:33:31 UTC, Juan Nunez-Iglesias wrote: > > Hi Robin! > > Well, the easy workaround is to zoom your image a lot using ndi.zoom or > skimage.transform.rescale, and then use mpl's contour. =) > > The potentially slower way is to use > scikit-image.segmentation.mark_boundary with mode=subpixel. =) > > Juan. > > > > > On Mon, Oct 26, 2015 at 7:25 PM, Robin Wilson > wrote: > >> Hi, >> >> I'm struggling with a problem that I'm sure has been solved before - and >> probably by some users of this mailing list! I have a segmentation image >> and I want to extract the edges of the segments and show them on the >> original image. This sounds nice and easy, so I had a go using the >> matplotlib contour function and got the following: >> >> >> >> >> From my perspective, there are two issues with this: one is that the two >> segments (which are separate by pixels with the value zero) are actually >> joined, and the other is that the segment outlines don't follow the pixel >> boundaries: they are offset by around half a pixel, and 'cut the corners'. >> What I'd really like to produce is the following: >> >> >> >> >> (if you look carefully you can see the blue outline around the edge of >> the segment) >> >> Does anyone know how to do this easily (and, ideally, reasonably quickly) >> in Python? From my investigations it seems that the contour function won't >> do what I want - but I can't find anything else that will do this, and I'd >> rather not implement something from scratch. >> >> Any thoughts? >> >> Robin >> >> >> -- >> 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... at googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jni.soma at gmail.com Mon Oct 26 05:22:45 2015 From: jni.soma at gmail.com (Juan Nunez-Iglesias) Date: Mon, 26 Oct 2015 02:22:45 -0700 (PDT) Subject: Pixel-boundary contours for segmentation visualisation In-Reply-To: References: Message-ID: <1445851364842.4e69fcc9@Nodemailer> Erm, maybe try interpolation='nearest' with imshow... =) Not sure about the other approach, though you are right that it would be possible. On Mon, Oct 26, 2015 at 8:02 PM, Robin Wilson wrote: > Thanks for the quick reply Juan. > I'm going to be picky now...! > I've tried the mark_boundary approach, but I hadn't realised that it > produced raster boundaries, so they look rather blurry in the output image: > > I imagine I could probably use the information from find_boundaries to > produce lists of vector points that I could then plot with matplotlib - to > get a nice vector overlay. Before I implement that, has anyone done that > already? > Thanks, > Robin > On Monday, 26 October 2015 08:33:31 UTC, Juan Nunez-Iglesias wrote: >> >> Hi Robin! >> >> Well, the easy workaround is to zoom your image a lot using ndi.zoom or >> skimage.transform.rescale, and then use mpl's contour. =) >> >> The potentially slower way is to use >> scikit-image.segmentation.mark_boundary with mode=subpixel. =) >> >> Juan. >> >> >> >> >> On Mon, Oct 26, 2015 at 7:25 PM, Robin Wilson > > wrote: >> >>> Hi, >>> >>> I'm struggling with a problem that I'm sure has been solved before - and >>> probably by some users of this mailing list! I have a segmentation image >>> and I want to extract the edges of the segments and show them on the >>> original image. This sounds nice and easy, so I had a go using the >>> matplotlib contour function and got the following: >>> >>> >>> >>> >>> From my perspective, there are two issues with this: one is that the two >>> segments (which are separate by pixels with the value zero) are actually >>> joined, and the other is that the segment outlines don't follow the pixel >>> boundaries: they are offset by around half a pixel, and 'cut the corners'. >>> What I'd really like to produce is the following: >>> >>> >>> >>> >>> (if you look carefully you can see the blue outline around the edge of >>> the segment) >>> >>> Does anyone know how to do this easily (and, ideally, reasonably quickly) >>> in Python? From my investigations it seems that the contour function won't >>> do what I want - but I can't find anything else that will do this, and I'd >>> rather not implement something from scratch. >>> >>> Any thoughts? >>> >>> Robin >>> >>> >>> -- >>> 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... at googlegroups.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. > For more options, visit https://groups.google.com/d/optout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.t.wilson.bak at googlemail.com Mon Oct 26 06:05:33 2015 From: r.t.wilson.bak at googlemail.com (Robin Wilson) Date: Mon, 26 Oct 2015 03:05:33 -0700 (PDT) Subject: Pixel-boundary contours for segmentation visualisation In-Reply-To: <1445851364842.4e69fcc9@Nodemailer> References: <1445851364842.4e69fcc9@Nodemailer> Message-ID: Oh duh! Of course, setting the interpolation properly makes it look far more sensible! I might still investigate the vector approach - I'll post here if I succeed. Robin On Monday, 26 October 2015 09:22:47 UTC, Juan Nunez-Iglesias wrote: > > Erm, maybe try interpolation='nearest' with imshow... =) > > Not sure about the other approach, though you are right that it would be > possible. > > > > > On Mon, Oct 26, 2015 at 8:02 PM, Robin Wilson > wrote: > >> Thanks for the quick reply Juan. >> >> I'm going to be picky now...! >> >> I've tried the mark_boundary approach, but I hadn't realised that it >> produced raster boundaries, so they look rather blurry in the output image: >> >> >> >> >> I imagine I could probably use the information from find_boundaries to >> produce lists of vector points that I could then plot with matplotlib - to >> get a nice vector overlay. Before I implement that, has anyone done that >> already? >> >> Thanks, >> >> Robin >> >> On Monday, 26 October 2015 08:33:31 UTC, Juan Nunez-Iglesias wrote: >>> >>> Hi Robin! >>> >>> Well, the easy workaround is to zoom your image a lot using ndi.zoom or >>> skimage.transform.rescale, and then use mpl's contour. =) >>> >>> The potentially slower way is to use >>> scikit-image.segmentation.mark_boundary with mode=subpixel. =) >>> >>> Juan. >>> >>> >>> >>> >>> On Mon, Oct 26, 2015 at 7:25 PM, Robin Wilson >> > wrote: >>> >>>> Hi, >>>> >>>> I'm struggling with a problem that I'm sure has been solved before - >>>> and probably by some users of this mailing list! I have a segmentation >>>> image and I want to extract the edges of the segments and show them on the >>>> original image. This sounds nice and easy, so I had a go using the >>>> matplotlib contour function and got the following: >>>> >>>> >>>> >>>> >>>> From my perspective, there are two issues with this: one is that the >>>> two segments (which are separate by pixels with the value zero) are >>>> actually joined, and the other is that the segment outlines don't follow >>>> the pixel boundaries: they are offset by around half a pixel, and 'cut the >>>> corners'. What I'd really like to produce is the following: >>>> >>>> >>>> >>>> >>>> (if you look carefully you can see the blue outline around the edge of >>>> the segment) >>>> >>>> Does anyone know how to do this easily (and, ideally, reasonably >>>> quickly) in Python? From my investigations it seems that the contour >>>> function won't do what I want - but I can't find anything else that will do >>>> this, and I'd rather not implement something from scratch. >>>> >>>> Any thoughts? >>>> >>>> Robin >>>> >>>> >>>> -- >>>> 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... at googlegroups.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... at googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: