Hi everybody, I am working on a computer vision problem but I got stuck. I am trying to detect outer points of an binary image (see attached images, points which i need are labeled in red on image points.png). I have tried different approaches (edges, maximas, corner detection) but usually the inner corners will be detected because the outer points I need are rather round. Any idea of an algorithm which might be useful for this problem? Thanks a lot in advance, Stefanie
Hello, I had a similar problem: [image: contour02.png] I tried to resolve the problem this way <https://dip4fish.blogspot.com/2012/10/contour-looking-for-negatively-curved....> using polygonal approximation. The result will depend on the scale of resolution I guess. Jean-Patrick Le mer. 8 mai 2019 à 10:37, Stefanie Lück <luecks@gmail.com> a écrit :
Hi everybody,
I am working on a computer vision problem but I got stuck. I am trying to detect outer points of an binary image (see attached images, points which i need are labeled in red on image points.png).
I have tried different approaches (edges, maximas, corner detection) but usually the inner corners will be detected because the outer points I need are rather round.
Any idea of an algorithm which might be useful for this problem?
Thanks a lot in advance, Stefanie
_______________________________________________ scikit-image mailing list -- scikit-image@python.org To unsubscribe send an email to scikit-image-leave@python.org
-- http://dip4fish.blogspot.fr/ Dedicated to Digital Image Processing for FISH, QFISH and other things about the telomeres.
Hi there, I had a quick idea to try looking at a local balance at each point, because the ones you're looking for have more white surrounding pixels than black ones. It's not perfect and requires to hand-tune threshold, but seems working. Screenshot with code is attached. [image: image.png] On Wed, May 8, 2019 at 11:59 AM Jean-Patrick Pommier < jeanpatrick.pommier@gmail.com> wrote:
Hello, I had a similar problem: [image: contour02.png] I tried to resolve the problem this way <https://dip4fish.blogspot.com/2012/10/contour-looking-for-negatively-curved....> using polygonal approximation. The result will depend on the scale of resolution I guess.
Jean-Patrick
Le mer. 8 mai 2019 à 10:37, Stefanie Lück <luecks@gmail.com> a écrit :
Hi everybody,
I am working on a computer vision problem but I got stuck. I am trying to detect outer points of an binary image (see attached images, points which i need are labeled in red on image points.png).
I have tried different approaches (edges, maximas, corner detection) but usually the inner corners will be detected because the outer points I need are rather round.
Any idea of an algorithm which might be useful for this problem?
Thanks a lot in advance, Stefanie
_______________________________________________ scikit-image mailing list -- scikit-image@python.org To unsubscribe send an email to scikit-image-leave@python.org
-- http://dip4fish.blogspot.fr/ Dedicated to Digital Image Processing for FISH, QFISH and other things about the telomeres. _______________________________________________ scikit-image mailing list -- scikit-image@python.org To unsubscribe send an email to scikit-image-leave@python.org
Wonderful! If either of you would like to contribute this work as a gallery example for scikit-image, we would be very grateful! (Or even just publish it somewhere with a BSD license so that one of us can grab it.) The main challenge is that we don't have a method for including external data in our documentation right now. See https://github.com/scikit-image/scikit-image/issues/3384 for discussion. On Wed, 8 May 2019, at 6:59 PM, Jean-Patrick Pommier wrote:
Hello, I had a similar problem: contour02.png I tried to resolve the problem this way <https://dip4fish.blogspot.com/2012/10/contour-looking-for-negatively-curved....> using polygonal approximation. The result will depend on the scale of resolution I guess.
Jean-Patrick
Le mer. 8 mai 2019 à 10:37, Stefanie Lück <luecks@gmail.com> a écrit :
Hi everybody,
I am working on a computer vision problem but I got stuck. I am trying to detect outer points of an binary image (see attached images, points which i need are labeled in red on image points.png).
I have tried different approaches (edges, maximas, corner detection) but usually the inner corners will be detected because the outer points I need are rather round.
Any idea of an algorithm which might be useful for this problem?
Thanks a lot in advance, Stefanie
_______________________________________________ scikit-image mailing list -- scikit-image@python.org To unsubscribe send an email to scikit-image-leave@python.org
-- http://dip4fish.blogspot.fr/ Dedicated to Digital Image Processing for FISH, QFISH and other things about the telomeres. _______________________________________________ scikit-image mailing list -- scikit-image@python.org To unsubscribe send an email to scikit-image-leave@python.org
*Attachments:* * contour02.png
I'm planning to add a scanned leaf to the gallery that would be useful for this purpose. -- François Boulogne. http://www.sciunto.org GPG: 32D5F22F
Just to add another suggestion: My approach would be to use the contour finding code in skimage to convert the binary boundary into a polygon (https://scikit-image.org/docs/dev/auto_examples/edges/plot_contours.html). After that, I would use the scipy tools to fit a parametric spline to the outline, applying a spatially appropriate bit of smoothing so the outline isn’t as jagged. (Or even better, if you have the original image, find the outline at the same threshold value you would have used to binaries the image and it will start out much less jagged.) Once you have a reasonably smoothed spline, you can calculate its first and second derivatives, and from there the signed plane curvature values at each point. (https://en.m.wikipedia.org/wiki/Curvature) You will be looking for regions of high curvature — and because it is signed you can distinguish inward from outward bends. Alternately, if you represent the binary boundary as the zero level-set of a signed distance image, there are ways to calculate the curvature of that image (as a function of x and y) that could I think give you the same information without needing explicit boundary geometry. Overall though for stuff like this (computations at boundaries) I like having explicit geometry represented as a smooth, differentiable parametric spline. Much simpler than trying to get pixels to do what you want. Zach
On May 8, 2019, at 3:37 AM, Stefanie Lück <luecks@gmail.com> wrote:
Hi everybody,
I am working on a computer vision problem but I got stuck. I am trying to detect outer points of an binary image (see attached images, points which i need are labeled in red on image points.png).
I have tried different approaches (edges, maximas, corner detection) but usually the inner corners will be detected because the outer points I need are rather round.
Any idea of an algorithm which might be useful for this problem?
Thanks a lot in advance, Stefanie
<points.png> <test.png> _______________________________________________ scikit-image mailing list -- scikit-image@python.org To unsubscribe send an email to scikit-image-leave@python.org
Hello, very interesting ideas! Thanks a lot for your replies. I am going to try and compare your suggestions. For the missing data, I could contribute many types of images, microscopic and macroscopic. I am also planning several publications which include also image datasets. I would be happy to help. Cheers Stefanie Am Mi., 8. Mai 2019, 14:55 hat Zach Pincus <zpincus@gmail.com> geschrieben:
Just to add another suggestion:
My approach would be to use the contour finding code in skimage to convert the binary boundary into a polygon ( https://scikit-image.org/docs/dev/auto_examples/edges/plot_contours.html). After that, I would use the scipy tools to fit a parametric spline to the outline, applying a spatially appropriate bit of smoothing so the outline isn’t as jagged. (Or even better, if you have the original image, find the outline at the same threshold value you would have used to binaries the image and it will start out much less jagged.)
Once you have a reasonably smoothed spline, you can calculate its first and second derivatives, and from there the signed plane curvature values at each point. (https://en.m.wikipedia.org/wiki/Curvature) You will be looking for regions of high curvature — and because it is signed you can distinguish inward from outward bends.
Alternately, if you represent the binary boundary as the zero level-set of a signed distance image, there are ways to calculate the curvature of that image (as a function of x and y) that could I think give you the same information without needing explicit boundary geometry.
Overall though for stuff like this (computations at boundaries) I like having explicit geometry represented as a smooth, differentiable parametric spline. Much simpler than trying to get pixels to do what you want.
Zach
On May 8, 2019, at 3:37 AM, Stefanie Lück <luecks@gmail.com> wrote:
Hi everybody,
I am working on a computer vision problem but I got stuck. I am trying to detect outer points of an binary image (see attached images, points which i need are labeled in red on image points.png).
I have tried different approaches (edges, maximas, corner detection) but usually the inner corners will be detected because the outer points I need are rather round.
Any idea of an algorithm which might be useful for this problem?
Thanks a lot in advance, Stefanie
<points.png>
<test.png>
_______________________________________________ scikit-image mailing list -- scikit-image@python.org To unsubscribe send an email to scikit-image-leave@python.org
_______________________________________________ scikit-image mailing list -- scikit-image@python.org To unsubscribe send an email to scikit-image-leave@python.org
participants (6)
-
François Boulogne
-
Jean-Patrick Pommier
-
Juan Nunez-Iglesias
-
Pavel Tyshevskyi
-
Stefanie Lück
-
Zach Pincus