Legacy Systems Are Everywhere. How to Build Automations Within Them?
Vinícius Eduardo
Senior RPA Engineer | UiPath | Python | Selenium | Power Automate | Intelligent Automation | API Integration | UiPath RPA Developer Advanced Certified
Automating legacy systems is increasingly essential for companies seeking to streamline processes, but these systems often rely on outdated technology that complicates automation efforts. In such cases, UiPath’s Computer Vision offers a powerful toolset to interact with these legacy interfaces. However, to achieve a resilient and reliable automation solution, we often need to make a series of image adjustments, including grayscale conversion, zoom, and additional enhancements to ensure accurate element detection.
First Things First... Do you know what Computer Vision is?
Computer Vision (CV) enables machines to interpret visual information, allowing automation tools like UiPath to "see" and interact with on-screen elements. This is especially useful for automating legacy systems or virtual environments where traditional selectors don’t work. CV uses machine learning to recognize buttons, fields, and menus by analyzing pixel patterns, making automation more adaptable and resilient.
Now, that you are more familiar with Computer Vision concepts, let's keep diving into this amazing feature!
How to use Computer Vision in UiPath?
To use Computer Vision in UiPath, follow these quick steps:
After all settings done, you'll see some options available on your Studio. We have so many Computer Vision actions to use, but before using it, we need to map the screen that we want to automate by using CV Screen Scope activity.
Here we have the screen mapped and all of the elements detected using UiPathScreenOCR whithin CV Screen Scope.
Challenges in Automating Legacy Systems
Legacy systems can present numerous obstacles for RPA due to old software interfaces, low screen resolutions, and a lack of accessible APIs. These systems require precise element detection, and even small changes in the screen can disrupt the automation. In these cases, UiPath’s Computer Vision helps by visually recognizing elements, but even with this tool, optimizing images can improve accuracy and stability significantly.
Optimizing Images for Better Detection with Grayscale Conversion
Converting an image to grayscale is a simple yet effective way to improve element detection. By removing color information, grayscale conversion focuses on shapes and contrasts, which can be beneficial when Computer Vision processes the image. This approach can especially help when dealing with interfaces that contain complex backgrounds or low-contrast text.
After running this code to enhance image quality, we can see the difference and improvement.
In the enhanced image of the legacy system interface, we applied several adjustments to improve accuracy for the robot. By converting the image to grayscale and boosting contrast, we removed unnecessary color details, helping the Computer Vision algorithm focus on the main elements like buttons and fields. Additionally, reducing background noise made the interface cleaner and more defined. These improvements make it easier for the robot to accurately identify and interact with specific parts of the legacy system.
Additional Image Processing Techniques for Enhanced Precision
Beyond grayscale conversion, other techniques can further optimize images for reliable Computer Vision detection. Some options include:
Applying these techniques can make a significant difference when dealing with complex interfaces. You may experiment with these adjustments based on the challenges presented by each specific legacy system.
How Do You Pass the Image Captured by the Computer Vision Activity to Your Code?
Simple! When the Computer Vision activity captures the system image, the content is saved into a variable, which can then be easily manipulated throughout the process.
After processing the images, you can integrate them into UiPath’s Computer Vision activities to build a resilient automation. Here, you’ll set selectors based on optimized images, ensuring that the bot can reliably recognize elements despite visual inconsistencies. Applying these pre-processing steps to the images beforehand ensures that Computer Vision’s element recognition functions with greater accuracy, even under varied conditions.
Final Thoughts
Automating legacy systems presents unique challenges, but by leveraging image processing techniques like grayscale conversion, contrast enhancement, and zoom adjustments, you can significantly improve the stability and accuracy of UiPath’s Computer Vision automation. Each adjustment makes a difference in how effectively the bot interacts with older interfaces, resulting in a more resilient and adaptable solution tailored to handle even the most outdated systems.
Technical Architect | RPA | UiPath | 3x Certified RPA Professional | Automation Anywhere | SAFe? POPM, SSM, Agilist | Python | Selenium | Ex-Accenture
4 个月Nice tip!! I did the exact same thing with automation anywhere a few years ago. AA has an in-built action/activity to modify the image properties such as sharpness, contrast and grayscale conversion etc. This improved the OCR accuracy by 40%
Lead Fullstack Engineer | Typescript Software Engineer | Nestjs | Nodejs | Reactjs | AWS
4 个月Amazing
FullStack Developer @ Itaú Digital Assets | Go | TS | Blockchain | Aws
4 个月Great content!
.NET Developer | C# | TDD | Angular | Azure | SQL
4 个月Awesome article Vinícius Eduardo
Data Analyst | Data Engineer | GCP | AWS | Python | SQL
4 个月Great, thanks for sharing! ??