cүвεя_נυηкιε 68 Posted February 7, 2015 Report Share Posted February 7, 2015 Hello, I have used the search, and read a s**t load of threads trying to find an answer to a question i have,but looks like im going to have to jump in and ask myself by the way,long time reader, first time poster,there are some legends here, .. ok thats that out of the way I was using the built in miage comparison and was wondering if is possible to compare multiple images in a single process ?what i mean is this, ..If i have a folder that contained lets say 20 png/jpg/gif images, and i want to search a webpage to see if any of those images exist,is there a way to do this without having to do it 1 by 1 via the built in image capture function ? Thanks in advance Quote Link to post Share on other sites
deliter 203 Posted February 7, 2015 Report Share Posted February 7, 2015 I have never used the image recognition,but I didn't know it is actual image recognition,could someone please clarify? 1. if you scrape the document text for SRC if they are from the same link it matches or 2. actual image matching,I would suggest to use shell batch(some free plugin,which I don't know how to use unfortunately) once you get that working(it is only basic command line inputs) install node.js and download the following package https://github.com/HumbleSoftware/js-imagediff I am interested in this myself,I am making a home security system with ubot,and proper facial recognition would be awesome,if I get this node working I might post a tutorial on it 1 Quote Link to post Share on other sites
cүвεя_נυηкιε 68 Posted February 8, 2015 Author Report Share Posted February 8, 2015 I have never used the image recognition,but I didn't know it is actual image recognition,could someone please clarify? 1. if you scrape the document text for SRC if they are from the same link it matches or 2. actual image matching,I would suggest to use shell batch(some free plugin,which I don't know how to use unfortunately) once you get that working(it is only basic command line inputs) install node.js and download the following package https://github.com/HumbleSoftware/js-imagediff I am interested in this myself,I am making a home security system with ubot,and proper facial recognition would be awesome,if I get this node working I might post a tutorial on it Thanks for the reply deliter unfortunately cant do the first option as the image/s im trying to match/compare have encrypted filenames that change every time the said image shows on a page (like 6793y382134y3.gif)as for the second option, not thought of that ... ill be checking that out today, Thanks for the suggestion, Good luck with your node,id love to see the tutorial if you have any joy Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted February 8, 2015 Report Share Posted February 8, 2015 Here is a function I made it will return true if they match and false if image is no match. if($Image Compare($plugin function("File Management.dll", "$open file dialog"), $plugin function("File Management.dll", "$open file dialog"))) { then { alert("they are the same!!!") } else { alert("Nope they are different!!") }}define $Image Compare(#FILE PATH A, #FILE PATH B) { if($comparison($plugin function("MD5.dll", "$MD5 from file", #FILE PATH A),"=",$plugin function("MD5.dll", "$MD5 from file", #FILE PATH B))) { then { set(#image_compare,"true","Global") } else { set(#image_compare,"false","Global") } } return(#image_compare)} You will need md5 plugin from ubotdev.com and Filemanagement PI form here to run this example. http://www.ubotstudio.com/forum/index.php?/topic/13237-free-file-management-plugin-multiple-commands-and-functions/ both are free. As for image recognition in the context of facial recognition I recommend OpenCV in Python CD 1 Quote Link to post Share on other sites
cүвεя_נυηкιε 68 Posted February 8, 2015 Author Report Share Posted February 8, 2015 Here is a function I made it will return true if they match and false if image is no match. if($Image Compare($plugin function("File Management.dll", "$open file dialog"), $plugin function("File Management.dll", "$open file dialog"))) { then { alert("they are the same!!!") } else { alert("Nope they are different!!") }}define $Image Compare(#FILE PATH A, #FILE PATH B) { if($comparison($plugin function("MD5.dll", "$MD5 from file", #FILE PATH A),"=",$plugin function("MD5.dll", "$MD5 from file", #FILE PATH B))) { then { set(#image_compare,"true","Global") } else { set(#image_compare,"false","Global") } } return(#image_compare)} You will need md5 plugin from ubotdev.com and Filemanagement PI form here to run this example. http://www.ubotstudio.com/forum/index.php?/topic/13237-free-file-management-plugin-multiple-commands-and-functions/ both are free. As for image recognition in the context of facial recognition I recommend OpenCV in Python CD now thats what i call quick lolthats awesome Code Docta (TC) ill have a play with this when i get 10 mins to myself,1 question, ..would it be possible to set "#FILE PATH A" to a folder of multiple files (say 20) ?maybe possible to load the image paths to a list and set that way ? although i guess ill find out when i try experimenting is the best part lol sincerely thanks for the help Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted February 8, 2015 Report Share Posted February 8, 2015 HERE YA GO! clear list(%pics FP)add list to list(%pics FP,$get files($special folder("Desktop"),"Yes"),"Delete","Global")loop($list total(%pics FP)) { set(#pic_FP_NLI,$next list item(%pics FP),"Global") if( $Image Compare(#pic_FP_NLI, "SCRAPED IMAGE FILE PATH")) { then { alert("they are the same!!!") } else { alert("Nope they are different!!") } }} CD 1 Quote Link to post Share on other sites
cүвεя_נυηкιε 68 Posted February 8, 2015 Author Report Share Posted February 8, 2015 Well CD, .. Thats just simply epic! Thanks for that,eternally gratefull I cant wait to get back in front of my pc now CJ EDIT : I had to come back here as i got a little excited, ..Early tests here are showing great results, now i just need to test on a few different pc's as thats where my problems start to arise, out of interest is it normal for the ubot built in image recognition to fail on other users machines ?only asking as it always works flawless for me but constantly get reports from users stating it has failed and missed an image. anyway, just thinking out loud really, .. Thanks again for the help guys,sincerely apreciated Quote Link to post Share on other sites
cүвεя_נυηкιε 68 Posted February 12, 2015 Author Report Share Posted February 12, 2015 Figured i would come back and pay dues to the folk that helped me here This image recognition seems to be pretty damn amazing, .. andnot to mention lightening quick, Thanks for the help chapseternally gratefull CJ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.