Results 1 to 6 of 6

Thread: Compare 2 images

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Posts
    7

    Compare 2 images

    Hi!

    Need 2 know how to compare 2 images.
    Let's say I take a screenshot and puts it in a picturebox named Picture1 using BitBlt.
    Then I take a new screenshot, but this time I've opened the Start-Menu. I place the new screenshot in the same picturebox using the SRCINVERT to get the differens from the 2 screens. Everything that was the same becomes black, and the changes get wierd colors. I want to crop the updated area, and get the X and Y coordinate of the top-left corner where it was before getting cropped.
    I'm sending this image to another computer and want to have the coordinates, so that the other computer can place the picture at it's old place and so, rebuild the screenshot. I only want to send the little piece that is updated to gain speed.

    Anyone who might help me?

  2. #2
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    to me it seems like you got it all figured out. What else do you need?
    Sanity is a full time job

    Puh das war harter Stoff!

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Posts
    7
    I need to crop the result so I only get the piece that changed. I want to get rid of all the black around.

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Find out where all the non black spots are. Then find the smallest X, the largest X, the smallest Y, and the largest Y. Take those and turn them into a RECT descriptor, there you have your region.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    yeah I know, I was thinking about that too, but I guess it would be terribly slow and if you have a round object that changed you will find a wrong place and than you would have to scan backwards the other direction again.
    I think that would be pretty slow unless you could convert your data into 256 color pics and than just use copymem to fill an array with the values of the pic.
    Sanity is a full time job

    Puh das war harter Stoff!

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Why would it have that circle problem? It just finds the extreme left, top, right and bottom of the changed pixels...
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width