Results 1 to 4 of 4

Thread: Image Verification

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    mumbai
    Posts
    12

    Question Image Verification

    How can i verify two images using VB?

    If any body knows. Please help me

  2. #2
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    First off, if your images are bigger than 32x32 don't expect to get real-time speed. You'll get maybe 5 times in a second, no more if you go to 100x100, and it gets worse after that. That's if you use GetPixel and SetPixelV to do your 'dirty work' >=). If you use pointers instead, you can get real-time framerates up to 400x400 images, at least with my computer's results. So, go to http://rookscape.com/vbgaming, and go to the 'Pointers for Faster Pixel Manipulation' link in the tutorials section. Good luck.

    Now, to the actual method >=). For your images, all you'll need to do is find out if each member in the array is the same (pointer method). For any other method, you have to loop through the width and height of the image and check everything that way. Once again, we use an equal operator. You must consider it to have suceeded until it hits a part of the image that is different. So in pseudo-code: (pointer method)
    VB Code:
    1. Open Image With Pointer Method
    2. Suceeded = True
    3. For I = Lbound(pointer array, 1) to Ubound(pointer array, 1)
    4. For J = Lbound(pointer array, 2) to Ubound(pointer array, 2)
    5. If pointer array(I,J) <> pointerarray2(I,J) then suceeded=false
    6. If not suceeded then
    7. exit for
    8. exit for
    9. end if
    10. next
    11. next
    As you can see, my pseudo-code is very messy, but it will get the job done (once it is real code, that's just the basic algo.
    Last edited by Sastraxi; Aug 13th, 2001 at 09:40 PM.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2001
    Location
    mumbai
    Posts
    12
    But will it be fullproof for Signature Verification?

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    It will have to be the exact same picture in order to pass, if you want to have pictures that are kind of the same, I suggest you do this:

    1. Pixelate the image to maybe 6 pixels = 1 pixel. (average every 6x6 pixels and put that whole colour in the 6x6 square).

    2. Check every 6x6 square against the other 6x6 square. If there is AMT or lower difference, make sure it passes. Otherwise, cancel the function and return false.

    Keep going through some images until you find a suitable number for AMT. (eg. start at 30, if it passes, try setting it to 25, if it doesn't pass, set it higher (eg. 35))
    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