Jump to content
UBot Underground

Image Comparison - But With Image Files


Recommended Posts

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

 

 

Link to post
Share on other sites

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

  • Like 1
Link to post
Share on other sites

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

Link to post
Share on other sites

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

  • Like 1
Link to post
Share on other sites

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 lol

thats 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 :)

Link to post
Share on other sites

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

  • Like 1
Link to post
Share on other sites

Well CD, ..

 

Thats just simply epic!

 

Thanks for that,

eternally gratefull :)

 

I cant wait to get back in front of my pc now :lol:

 

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 :)

Link to post
Share on other sites

Figured i would come back and pay dues to the folk that helped me here :)

 

This image recognition seems to be pretty damn amazing, .. and

not to mention lightening quick,

 

Thanks for the help chaps

eternally gratefull :)

 

CJ

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...