I would like to compare two images. I understand that Structural Similarity Index is one of the method to compare two images. I also understand that the Scikit Module made for python has a SSIM library.
Can anyone please guide me as to how I can use a Scikit Module of python with Xojo or if there is any other way by which I can use the SSIM algorithm in Python.
I would like to clarify that I don’t understand Python and I also don’t know the SSIM algorithm.
I would like to ask @Björn_Eiríksson if the Einhugur Plugin can be used to run the Scikit Module of Python and if so, can you please guide me on it.
Calling Python code from Xojo was discussed a couple of times here in the forum. Without knowing at least a bit of Python you won’t have fun.
You didn’t mention for which platform you need the code. macOS comes with the very old Python 2.7. If Scikit is only available for Python 3 then you need to install Python. Or you need to make an app out of Scikit. Which is not as easy as it sounds. There are several options available.
And then you can use the shell to call the executable of the Python app.
I agree Python has been discussed a couple of times before. In fact I myself had posted a few questions before. Yet somehow I am unable to get over all of the excitement all around that speaks of Python, especially when it comes to AI. Everyone says Python is too easy to understand, but personally I was never able to logically understand it. I was able to grasp the basic working of Xojo to a large extent in like 3 months, but Python scares me.
I shall be using Windows OS for the same. I think publishing a python code from Xojo and then interactively working with it through Shell only seems to be the way.
While it is It is technically possible to load complex external packages when using the Python Plugins for Xojo then its not easy and there is no guaranty that all of them would work.
Users have successfully loaded some scientific packages. But I imagine it requires good Python skills. (And that part I cannot help you with since I got none).
Also there is the practicality to consider of what you are attempting, if you get that library to load somehow, then there is no way you can pass complex Object like Xojo Picture back and forth to Python. So your only chance then of passing it would be file paths to images and temp images on drive.
(It is also possible to load up pre set up Python instance that has the packages pre-installed, like Anaconda Python for example)
Are you allowed to use other mutual information algorithms? R has at least one package to do so, and I believe (but I have never done it myself) running R scritps from the commandline should not be difficult.
Maybe I should have said that R is a free software for statistics, and it can be programmed. There are many additional packages/libraries for R, like the SSIM package. Also, check R’s license before you commit to it: https://www.r-project.org/Licenses/