Goblin Posted June 8, 2009 Posted June 8, 2009 (edited) Hello Autoit Community, I was using PixelChecksum and found that it sometimes gives different values for the same images. I tried to increase the number of steps, but it sometimes still give 2 different values the same image ! what should i do ? Edited June 8, 2009 by Goblin
trancexx Posted June 8, 2009 Posted June 8, 2009 It depends on how old you are, but general idea is to finish school, college, find a decent job, get merried and have children.There are examples of that out there.But regardles of all that you should always, at least try to, do what pleases you the most. ♡♡♡ . eMyvnE
Goblin Posted June 9, 2009 Author Posted June 9, 2009 It depends on how old you are, but general idea is to finish school, college, find a decent job, get merried and have children.There are examples of that out there.But regardles of all that you should always, at least try to, do what pleases you the most.thx but, what is this has to do with my question ?
trancexx Posted June 9, 2009 Posted June 9, 2009 thx but, what is this has to do with my question ?Sorry, what was your question?Btw, here's something that could be useful: Question marks go at the end of sentences that are questions. As with full stops you do not put a space before a question mark, but you do need at least one space after one. ♡♡♡ . eMyvnE
Goblin Posted June 9, 2009 Author Posted June 9, 2009 Sorry, what was your question?Btw, here's something that could be useful: Question marks go at the end of sentences that are questions. As with full stops you do not put a space before a question mark, but you do need at least one space after one.i am sorry if my question wasn't clear.My question is: PixelChecksum shows 2 different values to 2 similar images (actually two identical images), how to fix this ?P.S: Increasing number of steps isn't a proper solution in my case (tried it before).
Bowmore Posted June 10, 2009 Posted June 10, 2009 i am sorry if my question wasn't clear.My question is: PixelChecksum shows 2 different values to 2 similar images (actually two identical images), how to fix this ?P.S: Increasing number of steps isn't a proper solution in my case (tried it before).If PixelChecksum() returns different values, then the images are definitely NOT identical. Are you sure that the 2 images are in exactly the same position when you run PixelChecksum()? If only one pixel in the images a slightly different shade, PixelChecksum() will return a different value. The purpose of a check sum is to prove that the 2 are identical, not to prove they look the same.As a workaround you could try comparing each pixel in the images using PixelGetColor() in a nested loop and count the number of pixels that match. You could then decided if the number of pixels that match is close enough for you. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
Goblin Posted June 10, 2009 Author Posted June 10, 2009 @Bowmore: Here is the script used for the 2 images:- HotKeySet("{NUMPAD0}","RecognizeName") Sleep(2000) While 1 Sleep(1000) WEnd Func RecognizeName() $countryname = PixelChecksum(334, 211, 532, 248, 1) MsgBox(0,"",$countryname) EndFunc and in the attachments u will find 2 images(almost identical) that gave 2 different values.ExampleImage.rar
Moderators Melba23 Posted June 10, 2009 Moderators Posted June 10, 2009 Goblin,Sorry to butt in, but the 2 images in your download do not even have the same size! (12,966 vs 12,958). So how on earth can you expect them to give the same result? There is no way they are "identical" - so no way PixelCheckSum will give you the same result.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Goblin Posted June 10, 2009 Author Posted June 10, 2009 @Melba23: Use my script, it doesn't checksum the whole image, just a specific region.
Moderators Melba23 Posted June 10, 2009 Moderators Posted June 10, 2009 Goblin,So how do you know the 2 areas you use are "identical"? The fact you get 2 different answers from PixelCheckSum is pretty conclusive evidence that they are not!"Click"M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Goblin Posted June 10, 2009 Author Posted June 10, 2009 (edited) @Melba23: Because i captured the same why. Actually, what i am trying is some kind of simple OCR (limited OCR) for a simple bot for a game (not for a Captcha). Example:- When it see "Brazil", it select it's flag. In the attachments a better image.ExampleImage2.rar Edited June 10, 2009 by Goblin
Goblin Posted June 11, 2009 Author Posted June 11, 2009 Problem Solved, the problem was in the game itself, i made it in Low Quality so the game made some kind of (small random deformation) on the screen that changes every time the game opened, thx u all.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now