Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Compare Images.

Compare Images.

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FISH786
    wrote on last edited by
    #1

    Can someone help. I am not sure but I think i read about this before. I can't find it when I need it. I am looking for anything that will help me compare 2 images of diferent sizes using VC++. The following only tell me the sizes are different. However I already know that they are different.

    BYTE image1[ImageSize];
    BYTE image2[ImageSize];
    // load the images not shown

    if( memcmp(image1,image2,sizeof(image1)) == 0)
    // they are the same
    else
    // they are different

    Thanks a million

    L PJ ArendsP 2 Replies Last reply
    0
    • F FISH786

      Can someone help. I am not sure but I think i read about this before. I can't find it when I need it. I am looking for anything that will help me compare 2 images of diferent sizes using VC++. The following only tell me the sizes are different. However I already know that they are different.

      BYTE image1[ImageSize];
      BYTE image2[ImageSize];
      // load the images not shown

      if( memcmp(image1,image2,sizeof(image1)) == 0)
      // they are the same
      else
      // they are different

      Thanks a million

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hi Fish, The real question is how much accuracy do you require. If I wanted a quick and dirty image compare I would probably create a histogram of the colors[^] in both images. If you need greater accuracy then maybe you could use a library specifically designed for computer vision. Integrating Vision Toolkit[^] VLFeat[^] Best Wishes, -David Delaune

      1 Reply Last reply
      0
      • F FISH786

        Can someone help. I am not sure but I think i read about this before. I can't find it when I need it. I am looking for anything that will help me compare 2 images of diferent sizes using VC++. The following only tell me the sizes are different. However I already know that they are different.

        BYTE image1[ImageSize];
        BYTE image2[ImageSize];
        // load the images not shown

        if( memcmp(image1,image2,sizeof(image1)) == 0)
        // they are the same
        else
        // they are different

        Thanks a million

        PJ ArendsP Offline
        PJ ArendsP Offline
        PJ Arends
        wrote on last edited by
        #3

        Like Randor said, it depends on what you are looking for, but http://www.codeproject.com/Messages/1957223/Re-Extending-this-Idea.aspx[^] may be of some help.


        You may be right I may be crazy -- Billy Joel -- Within you lies the power for good - Use it!

        Within you lies the power for good; Use it!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups