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. About Position Independent of an Image to compare it

About Position Independent of an Image to compare it

Scheduled Pinned Locked Moved C / C++ / MFC
question
12 Posts 8 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.
  • K kaushal kishore sharma

    hello everyone, i want to compare 2 images with position independent in both images, but i cant find anything for it. i was firstly using 2 images in same position and comparing using Getpixel function. So, for position independent what is to be used. Your Sincerely Kaushal Kishore Sharma Kaushal

    L Offline
    L Offline
    led mike
    wrote on last edited by
    #2

    kaushal kishore sharma wrote:

    So, for position independent

    What does that mean? You want to compare random pixels? :confused:

    led mike

    K 1 Reply Last reply
    0
    • K kaushal kishore sharma

      hello everyone, i want to compare 2 images with position independent in both images, but i cant find anything for it. i was firstly using 2 images in same position and comparing using Getpixel function. So, for position independent what is to be used. Your Sincerely Kaushal Kishore Sharma Kaushal

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #3

      Please elaborate. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      In testa che avete, signor di Ceprano?

      K 1 Reply Last reply
      0
      • L led mike

        kaushal kishore sharma wrote:

        So, for position independent

        What does that mean? You want to compare random pixels? :confused:

        led mike

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

        yes for random pixels

        C 1 Reply Last reply
        0
        • K kaushal kishore sharma

          yes for random pixels

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #5

          :confused: How can you compare an image if you compare random pixels? It would be great if you could formulate your query so that it is understandable. This means that you should take a bit of time to think how to formulate your question so that people that are not in front of your computer can understand what you mean. The first step in solving a problem is to formulate it clearly. Sometimes it is already enough to lead you to the solution.

          Cédric Moonen Software developer
          Charting control [v1.5] OpenGL game tutorial in C++

          L I 2 Replies Last reply
          0
          • CPalliniC CPallini

            Please elaborate. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

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

            lets take an example. i have a image named as file1 in which i have written "CAT" and second image named as file2 in which written as "CAT". now i was firstly using getpixel for both the images at same position for comparing them, so using getpixel in fixed position lead to answer that "images are same" Now i want this same images to be in different places and then want to compare them and get the output "Images are same" So i can i do this work? Kindly help me. Your Sincerely Kaushal Kishore Sharma

            M CPalliniC 2 Replies Last reply
            0
            • K kaushal kishore sharma

              lets take an example. i have a image named as file1 in which i have written "CAT" and second image named as file2 in which written as "CAT". now i was firstly using getpixel for both the images at same position for comparing them, so using getpixel in fixed position lead to answer that "images are same" Now i want this same images to be in different places and then want to compare them and get the output "Images are same" So i can i do this work? Kindly help me. Your Sincerely Kaushal Kishore Sharma

              M Offline
              M Offline
              Member 4194593
              wrote on last edited by
              #7

              My suspicion would be that you would have to extract the pixel data for each image, and each line, as if they were strings of binary data (fixed length strings of RGB data), and then pretend to do a file compare (like comparing two text files only you would be doing this with binary fuxed length strings) (this would probably not work if the picture scales were different). You might then be able to find the image of "CAT" in file 1 as a subimage of file 2. Dave.

              Z 1 Reply Last reply
              0
              • C Cedric Moonen

                :confused: How can you compare an image if you compare random pixels? It would be great if you could formulate your query so that it is understandable. This means that you should take a bit of time to think how to formulate your question so that people that are not in front of your computer can understand what you mean. The first step in solving a problem is to formulate it clearly. Sometimes it is already enough to lead you to the solution.

                Cédric Moonen Software developer
                Charting control [v1.5] OpenGL game tutorial in C++

                L Offline
                L Offline
                led mike
                wrote on last edited by
                #8

                Cedric Moonen wrote:

                you should take a bit of time to think

                We don't need no stinkin thinkin! ;)

                led mike

                1 Reply Last reply
                0
                • K kaushal kishore sharma

                  lets take an example. i have a image named as file1 in which i have written "CAT" and second image named as file2 in which written as "CAT". now i was firstly using getpixel for both the images at same position for comparing them, so using getpixel in fixed position lead to answer that "images are same" Now i want this same images to be in different places and then want to compare them and get the output "Images are same" So i can i do this work? Kindly help me. Your Sincerely Kaushal Kishore Sharma

                  CPalliniC Offline
                  CPalliniC Offline
                  CPallini
                  wrote on last edited by
                  #9

                  Let's suppose the first image is at {0, 0} and the second one is at {100, 200} then you may still use some kind of getpixel to compare the images, simply offsetting the arguments, i.e. (pseudocode):

                  getpixel(x,y) == getpixel(100 + x, 200 + y)

                  However I suspect you have no clear idea about what you actually intend to do. :)

                  If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                  This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                  [My articles]

                  In testa che avete, signor di Ceprano?

                  1 Reply Last reply
                  0
                  • M Member 4194593

                    My suspicion would be that you would have to extract the pixel data for each image, and each line, as if they were strings of binary data (fixed length strings of RGB data), and then pretend to do a file compare (like comparing two text files only you would be doing this with binary fuxed length strings) (this would probably not work if the picture scales were different). You might then be able to find the image of "CAT" in file 1 as a subimage of file 2. Dave.

                    Z Offline
                    Z Offline
                    Zergon
                    wrote on last edited by
                    #10

                    Try looking at this. http://www.cs.cornell.edu/Vision/hausdorff/hausmatch.html[^] I'm pritty sure its what you want to do.

                    1 Reply Last reply
                    0
                    • K kaushal kishore sharma

                      hello everyone, i want to compare 2 images with position independent in both images, but i cant find anything for it. i was firstly using 2 images in same position and comparing using Getpixel function. So, for position independent what is to be used. Your Sincerely Kaushal Kishore Sharma Kaushal

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

                      Does this[^] help you?


                      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
                      • C Cedric Moonen

                        :confused: How can you compare an image if you compare random pixels? It would be great if you could formulate your query so that it is understandable. This means that you should take a bit of time to think how to formulate your question so that people that are not in front of your computer can understand what you mean. The first step in solving a problem is to formulate it clearly. Sometimes it is already enough to lead you to the solution.

                        Cédric Moonen Software developer
                        Charting control [v1.5] OpenGL game tutorial in C++

                        I Offline
                        I Offline
                        Iain Clarke Warrior Programmer
                        wrote on last edited by
                        #12

                        There's no time to think! In fairness, he did miss out the magic "urgentz" word... Iain.

                        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