Git Product home page Git Product logo

Comments (7)

hinerm avatar hinerm commented on June 25, 2024

thanks for playing with this @thorstenwagner!

So, for the bottom image (lines 133, 132) I think it is fairly arbitrary - from a slope/straightness perspective - which "top" end to pair with that "bottom" end pointing to the left.

My current implementation does a greedy search for maximizing straightness. We could improve the results by trying to find a globally optimal configuration for all pairings about an overlap point, which would improve the algorithm in some cases.

However, the primary assumption of a slope/straightness heuristic (that intersection is more likely than overlapping, simultaneous curves) falls apart the larger the length of overlap - especially when the length of overlap is large relative to the overall line length.

So I would say the 132, 133 line set is not an ideal candidate for the slope heuristic and would be better served by SVM, manual inspection, etc..

(and I will try to make this clear in my wiki contribution)

from ij-ridgedetection.

hinerm avatar hinerm commented on June 25, 2024

Same explanation for the above two images. The initial segmentation is a poor starting point for a slope/straightness-based heuristic.

I played with the parameters a bit:

screenshot from 2015-11-11 13 29 57
screenshot from 2015-11-11 13 30 04

which looks opposite of what you might expect at first, but I think it's working exact as advertised. The algorithm likely paired the top two sections together because they were processed first (greedy) and they best preserve overall straightness. Then the bottom two sections are simply left over and paired together.

My goal for the wiki is to contrast these examples with images like this one:

c1-soapes

to show when slope overlap detection is, and is not, useful.

from ij-ridgedetection.

hinerm avatar hinerm commented on June 25, 2024

There are, of course, probably still bugs! So let me know if you find more odd behavior 😄

Thanks again!

from ij-ridgedetection.

hinerm avatar hinerm commented on June 25, 2024

screenshot from 2015-11-11 14 51 14

Here is something that should never happen. The wrong ends were merged together.

from ij-ridgedetection.

thorstenwagner avatar thorstenwagner commented on June 25, 2024

@hinerm Yes, but it seems only happen sometimes... If check / uncheck preview multiple times it only occurs sometimes...

from ij-ridgedetection.

hinerm avatar hinerm commented on June 25, 2024

I will investigate!

from ij-ridgedetection.

hinerm avatar hinerm commented on June 25, 2024

So the problem is - unsurprisingly - that I took some short cuts in simplifying the assumptions I was making about intersection structure.

I started a branch to work on making the search more robust - by considering all combinations of "enclosed" segments as possible pairings, which then will necessitate global error minimization as well - but I don't really have the time to finish it right now.

It's fun to work on so I hope to get back to it eventually. Anyone else is welcome to continue its refinement as well. And @thorstenwagner if there's anything you consider a showstopper bug I will try to fix it.

from ij-ridgedetection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.