none
Image comparison c#

    Question

  • Hello. I am currently making a movement prediction application.
    In a timer I take a screenshot, oh lets say every 50ms.

    As soon as two screenshots have been made I want code to be able to compare the two images, and draw ontop of the changed pixels. After the pixels have been drawn on I want to be able to find chunks of the pixels that have been drawn that are 10x10 pixels. Find the location(center) of that chunk and store it as a string. After two strings have been stored I want to find the difference in location between those two strings, after the distance has been calculated I want to move the mouse to the second chunk + the difference in chunk location.

    Monday, December 17, 2012 6:17 AM

Answers

All replies

  • As soon as two screenshots have been made I want code to be able to compare the two images ...

    Hi,

    take both images, lock the bits, loop over the pixels, check the pointers values, do something when your condition is met, unlock the bits.

    Regards,

      Thorsten

    Monday, December 17, 2012 7:58 AM
  • ... see

    http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/01fd6a61-6426-47ef-b99f-ee49801c6635

    and

    http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/5ee43bff-ea88-4f22-a88e-9cf01e47e606

    Regards,

      Thorsten

    Monday, December 17, 2012 8:00 AM