plantcv
plantcv copied to clipboard
Unity 3D Support | C# Iron python with Iron clad.
Currently, I am using your software to help build software tools for precision ag students at my university. I am currently working on bringing over all the files and getting them to embedd in c# using Iron Python and Iron clad. The reason I want to do this is to make a front end UI in unity and be able to use Augmented Reality tools with it as well.
Has anyone done this before ? Am I miss using this tool or is their a way to systematically install and run this software when my unity program is built into an exe?
I have linked stackoverflow question as well. https://stackoverflow.com/questions/63542439/implementing-opencv-in-iron-python-using-ironclad
Hi @danammeansbear, that's cool! I'm not familiar with Unity or Iron Python/Ironclad, but happy to help troubleshoot if we can. As you updated at Stack Overflow, it looks like Iron Python's current version is in line with Python 2.7, but I think Iron Clad is at 2.6. It also looks like Iron Clad has stated issues with Matplotlib, which would cause a major issue when trying to use PlantCV. While we officially stopped supporting Python 2 in December, I don't think we have made too many changes that are backwards incompatible (I started using F-strings, which is a Python 3 feature, in a few places). So while not ideal, it might be possible to have a slightly modified version of PlantCV working in Python 2.7. Alternatively, I could look back at the testing logs and let you know when we last passed Python 2 tests and you could at least check out an older version to see if it works at least.
For OpenCV, not sure if you did, but I wonder if you need to install it from source? Since you ran into a cv2 not found issue my first thought is that the way we typically install the OpenCV Python package might not have the right linked libraries for something like you are trying to do.
Currently, I am about to reinstall windows so I can have a cleaner file system. I think this will give me the opportunity to install OpenCV from the source. I would greatly appreciate you going through any test logs for me so I can start from your last working version. I also was looking into docker though im sure not how it works. Could I say download docker on my fresh build machine and create the functionality in python I need dynamically to correspond with a unity exe. then on a fresh host machine, download docker and get the docker files needed to run it and it systematically downloads and installs everything needed to run the software of the exe.
https://stackoverflow.com/questions/39589800/unity-5-webgl-communicating-with-external-javascript-from-c-sharp
I was reading into this and thought about since unity can convert to webgl I can communicate with python this way.