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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Comparing images.... Visual C++ (MFC)

Comparing images.... Visual C++ (MFC)

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
5 Posts 5 Posters 0 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.
  • C Offline
    C Offline
    cheng85
    wrote on last edited by
    #1

    Can someone help me my problem? How can do i compare two images?? what i need is just a simple comparison... E.g. After both images are being compared, a message will say either "correct" or "wrong" that's all.... :) Thanks, Best Regards....

    C PJ ArendsP H 3 Replies Last reply
    0
    • C cheng85

      Can someone help me my problem? How can do i compare two images?? what i need is just a simple comparison... E.g. After both images are being compared, a message will say either "correct" or "wrong" that's all.... :) Thanks, Best Regards....

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can load them into a DC and use GetPixel, but it's much faster if you can make them a DIBSEction, and then you can access the image data as a byte array and compare it.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      1 Reply Last reply
      0
      • C cheng85

        Can someone help me my problem? How can do i compare two images?? what i need is just a simple comparison... E.g. After both images are being compared, a message will say either "correct" or "wrong" that's all.... :) Thanks, Best Regards....

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

        The easiest way is to use GetDIBits() on each bitmap and do a memcmp() on the image data.


        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!

        K 1 Reply Last reply
        0
        • C cheng85

          Can someone help me my problem? How can do i compare two images?? what i need is just a simple comparison... E.g. After both images are being compared, a message will say either "correct" or "wrong" that's all.... :) Thanks, Best Regards....

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          I think i see an article in http://www.codeguru.com[^] for compare two images,yesterday?i want to send you address this article but i dont know its name.

          _**


          **_

          WhiteSky


          1 Reply Last reply
          0
          • PJ ArendsP PJ Arends

            The easiest way is to use GetDIBits() on each bitmap and do a memcmp() on the image data.


            You may be right
            I may be crazy
            -- Billy Joel --

            Within you lies the power for good, use it!!!

            K Offline
            K Offline
            kaushal kishore sharma
            wrote on last edited by
            #5

            can you send me the code for comparing 2 images

            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