Search code examples
imagematlabimage-processingdetection

how to detect spiral in an image using matlab


I'm new to matlab, I'm not clear of how to detect the spirality and spiral center in an image using matlab.

For example I need to detect the spiral center of the galaxy. Question: How to model spirality concept in these kind of spiral image for example.... Thank you.

original images taken from here:


Solution

  • Optical flow

    • is moving intensity/color of scene
    • not image of an object !!!
    • this is taken from flying insects vision
    • they use it to:

      • determine flight direction (compensate wind drift)
      • navigation
      • collision avoidance
      • landing

    Spiral image

    • in your case you should look for geometry + density analysis (nothing to do with Optical flow)
    • here are few things that pop up in my head for your case:

      1. make density map

        • find the biggest density
        • or density center
      2. vectorise the whole thing

        • find center mathematically
        • or look for joint of arms
        • or look for eye of the storm
        • also you can vectorise the gaps
        • if they are curved and rotated to each other then you have spiral
      3. make gap occurence map

        • number of gaps per square area
        • the bigger the count is the closer you are to center
        • beware inside center area can be 0 gaps
        • find max gap count positions
        • compute average middle between all of them
        • to improve accuracy you could segmentate gaps before
        • and count only different gaps per area

          gap count

    [Notes]

    • I would go for option 3
    • it is most simple of all of them
    • just few for loops
    • you can also combine more approaches together to improve accuracy
    • use proper filtrations and color reduction/tresholding before detection
      • like sharpening, artifact reduction, smoothing, erosion/corosion ...