|
-
Aug 13th, 2001, 09:18 PM
#1
Thread Starter
New Member
Image Verification
How can i verify two images using VB?
If any body knows. Please help me
-
Aug 13th, 2001, 09:35 PM
#2
Good Ol' Platypus
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:
Open Image With Pointer Method
Suceeded = True
For I = Lbound(pointer array, 1) to Ubound(pointer array, 1)
For J = Lbound(pointer array, 2) to Ubound(pointer array, 2)
If pointer array(I,J) <> pointerarray2(I,J) then suceeded=false
If not suceeded then
exit for
exit for
end if
next
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)
-
Aug 13th, 2001, 09:50 PM
#3
Thread Starter
New Member
But will it be fullproof for Signature Verification?
-
Aug 14th, 2001, 07:55 AM
#4
Good Ol' Platypus
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|