Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

That's interesting. But only 1/4 of the information required to tackle the problem.

Only one pair of images, and no reference as to you would rate them--are they 2% similar or 98% similar?

Isolating the pink in the images is relatively simple: cluster1 & cluster8.

One problem is that the graphs have been produced using anti-aliasing. A process that trades accuracy for aesthetic appearance. Which means that if you try to subtract one image from another you get a big blurry streak of color: cluster1 - cluster8

With some more processing it should be possible to retrieve a single, contiguous line from those fat, fuzzy, discontinuous streaks. Albiet that it might take several passes to do so.

But the show stopper as far as achieving your single similarity figure is the lack of any indication of how to rate the two posted images for similarity.

It is obvious that if the two lines, once reduced to continuous, single pixel wide lines, exactly overlaid each other, that would constitute 100% similarity. But how do you rate divergence?

Possibilities:

  1. You might consider any two pixels that do not exactly align a percentage point of divergence.

    That is, in the following 10 pixel wide overlay:

    x o x o x o oxoxox o x o x

    Because X positions 4 through 7 overlap, that would be 40% similarity.

  2. Or, you might consider not only the fact that two pixels diverge, but also by how much they diverge.

    Meaning that this overlay would rate as having a higher similarity than the one above:

    xxx ooo oxoxox oo xx

    Even though they overlap to the same extent.

    Meaning that:

    xxxxxxxxxx oooooooooo

    Would have a much higher simlilarity rating than:

    xxxxxxxxxx oooooooooo

    Despite there being no overlap at all.

So then the problem is, what do you consider to be 0% similarity? (Which is why I asked for two pairs of images and associated ratings in the first place.)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^3: Can i Compare two images in perl ? by BrowserUk
in thread Can i Compare two images in perl ? by deep3101

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [Discipulus]: I hope at least a minimal implementation, in the middle of july i'll have the first introductional course..
    Discipulus nemo profeta in patria..

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (4)
    As of 2017-06-27 09:18 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      How many monitors do you use while coding?















      Results (601 votes). Check out past polls.