Choosing the Right Software for Embedded Vision
Welcome to the next instalment of machine vision blogs from ClearView Imaging. This week we will be wrapping up embedded vision by weighing up software options for embedded vision systems. Make sure you read through to the end, as we weigh up many factors and reach a verdict on our discussion points.
Whether you’re interested in building powerful embedded vision systems, compact embedded vision devices, or are just interested in learning more about the topic, this blog post is for you. Ultimately, embedded vision is the future of many machine vision applications in robotics, industrial automation, medicine, life sciences, and the automotive industry, just to name a few. We hope you enjoy reading.
Opensource vs Licensed Machine Vision Software for Embedded Vision
When it comes to choosing software for embedded vision systems, the first question to answer is this: do I use opensource software, or licensed machine vision software, such as a paid SDK? Even the best specialists are occasionally faced with this very dilemma. Making a selection between the two might sound easy, but it often isn’t. Let’s weigh up the pros and cons of opensource machine vision software for embedded vision.
Advantages of Opensource Embedded Vision Software
Even though this is an obvious advantage, it’s important to reiterate that opensource software is, by definition, free and open. It also doesn’t carry any ongoing perpetual licence costs, so when you ship any embedded system using your software, you do not pay recurring software licence costs, making this type of approach feasible for high volume system deployments with constrained budgets.
Opensource platforms encourage sharing of ideas, allowing the developers and the users to collaborate on key performance topics and issues that might arise, especially since the software produced is not regulated. OpenCV is a great place to share ideas and pose questions to the community of OpenCV developers.
Opensource software complies with opensource models far more reliably than managed professional machine vision software. Should you be continually interacting with other industries and users, and don’t wish to be restricted by established data arrangements, then opensource is the way to go.
While this may all sound very appealing, before you hop onto OpenCV and rush into a decision, it’s essential to consider the following potential drawbacks.
OpenCV is a widely popular opensource computer vision software library
Drawbacks of Opensource Embedded Vision Software
Unless you can do the software development yourself, you will need a team of developers, either internally or externally, with excellent software skills in various programming languages and a deep understanding of software design, image processing terminology and algorithms.
Support & Enhancements
Support is arguably the largest issue with opensource machine vision software.
Even though some opensource developers offer a warranty, there is only limited support available, should you encounter incompatibility issues or need updates or run into coding errors that might result in downtime.
Furthermore, incompatibility with other systems could cause a malfunction in your hardware, and without support, this would most likely prove challenging to solve, hogging resources and wasting time and money down the line.
In terms of enhancements, if you need a certain algorithm to run faster or more accurately, you may have to wait until the enhancement comes, if at all.
Chosen Coding Language
You also need to consider the language you choose to write your software in, and whether opensource vision software will be flexible enough to let you write in this language. The key question to ask yourself is this: If I choose this opensource software, can I code in a programming language I am already familiar with?
Python, C#, C++ and Visual Basic are all widely-used coding languages for machine vision, but not all of them are supported by opensource software.
Again, it’s crucial to consider the potential longevity and reliability of opensource software. Has it been extensively tested by paid machine vision experts? If not, you could be running the risk of taking a machine vision enthusiast’s passion project and integrating it into a professional environment.
It would be a mistake to implement new software algorithms into your embedded vision systems without first testing them. Is there a way to test your algorithm without using the full system? If not, and you skip this phase, opensource may be crippling for your project.
How complex are your intended machine vision software functions? Can you do what you want to do with opensource software right out of the box, or will you need to write custom image processing algorithms? If not, you may well face the same issues we’ve mentioned under Software Development.
Another big question is whether your opensource software will make good use of the available processing power in your hardware. For example, will the algorithm you need be able to run at the speed you want? With professional licenced packages, algorithms are consistently benchmarked and optimised for the latest CPU instructions, like SSE, SSE2, SSE3, SSE4, AVX, AVX-512, etc
Taking this further, what if the opensource algorithms aren’t supported by your machine vision hardware at all? It’s a particularly crucial question to ask in the world of embedded vision, where your hardware options may be more constrained due to size and physical integration considerations. Does your software work with the CPU you are using, let alone the embedded vision cameras, frame grabbers, etc.?
Deciding Between Opensource vs Licensed Machine Vision SDKs
The bottom line is this: if you’re a machine vision hobbyist, and software issues won’t cost you thousands of pounds in the long run, then opensource software is a fine option.
But if you’re an OEM or System Integrator, you could be running into a mistake by choosing opensource software to implement into your embedded vision systems.
However, to add more to the bundle, there is also a large hardware consideration to make…
ARM/FPGA vs Intel/CPU Processors for Embedded Vision
Professional machine vision software packages (like MIL X) are heavily optimised for the platforms they support. So with PC vision systems, almost everything is running on Intel CPUs; for example, Matrox's latest release of MIL is speed optimised for the latest Intel® Advanced Vector Extensions 512 (AVX-512).
The optimisations that work for Intel CPUs don't work for ARM, so you need a company that can do the real low-level optimisation – especially if you have a real-time vision system where things need to run quickly.
This might make the difference between Pattern Matching being done in milliseconds vs seconds, for example.
Then we come to FPGAs. Typically, you will need a hardware developer on hand who can work with VHDL to take an algorithm and make it run on an optimised FPGA. However, Matrox offer frame grabbers that come with FPGAs that are pre-installed with ready-to-run machine vision algorithms.
Matrox RadientPro CL Frame Grabber
The same goes for the new NET iam smart camera. This smart camera enables users with no VHDL expertise to use the FPGA resources for their own vision solutions.
NET iam Smart Camera
They can also use commercial libraries, OpenCV or NET functions – so in this case, there is perhaps more nuance in the decision of software, rather than a cut-and-dry, better-or-worse evaluation between opensource and licensed machine vision software, as this camera will support either.
Choosing Licensed Machine Vision Software
MIL X for Embedded Vision
There are some fantastic options when it comes to licensed SDKs for machine vision; we usually recommend MIL (Matrox Imaging Library) X as it represents the best in machine vision software.
Not only is MIL X hardware efficient, highly functional and reliable, but it also allows you to use a huge range of amazing machine vision functions. You will not have to write your own algorithms – Matrox’s software experts have already written a fantastic range of machine vision functions into MIL X.
You also needn’t worry about your preferred coding language, as MIL X allows you to write your code in Python, C#, C++, and Visual Basic.
MIL X is a common software interface, which means the same core code developed for PC applications running on an Intel CPU, with Windows can also be used on an ARM processor running Linux, making it perfect to install in embedded vision settings.
Furthermore, MIL X is optimised for GenICam-compliant hardware, which means in addition to ensuring a much smoother runway to market, you’ll be covered for software support from real machine vision professionals.
Licensed software like MIL X will not require the level of in-house support that opensource imaging software would probably require, which means you can advance your project unhindered.
Spending some money on a great licensed SDK may be an upfront investment for OEMs and System Integrators, but it is one that will save you years of headaches further down the line. If you’re an end user, or working with ARM processors, then there is a little more scope for debate, and with the right preparation, perhaps opensource machine vision software may be an option for your embedded vision project.
Ultimately it also it comes down to the question of optimisation. In embedded systems, when you move away from an Intel CPU, it’s essential to really consider the required speed of your system, how your system is going to be optimised to meet that speed requirement, and finally who is going to carry out this optimisation work on your system.
Embedded Vision Solutions from ClearView Imaging
That’s it for our series of blog posts on Embedded Vision. For more, check out our great range of machine vision products and solutions.
Be sure to stay tuned next week as we open up a new series of blogs on machine vision illumination!
Here at ClearView, we have a broad range of knowledge and machine vision expertise to help you decide on the right solution for your project.
We offer a huge range of components, and our experts are happy to help no matter what your question or problem may be. Feel free to get in touch with us and one of our machine vision experts will be ready to help you get going with your project!