An Introduction to Computer Vision

Alteryx Designer: An Introduction to Computer Vision

Table of Contents
    Add a header to begin generating the table of contents


    Have you ever stumbled upon a folder that holds past invoices and receipts from years ago that you wish you could include in your current bookkeeping records? Ever had to scan physical receipts from business transactions and upload them into a cloud database? It’s incredibly tedious to manually input these records into an Excel file every time you receive a new document. Computer Vision can help you to do these tasks quickly and easily but how can you do it?

    What if we told you that we have an out-of-the-box software that helps you achieve the above efficiently and automatically, without needing to manually input information? All you would need to do is run your documents through an input tool and you’re good to go. 

    Alteryx Computer Vision Tools

    Alteryx is a powerful tool for Analytics Process Automation. The Designer product contains the Intelligence Suite enabling users with drag-and-drop Machine Learning, Text Mining and Computer Vision capabilities. Within this blogpost, we will be looking at the Computer Vision tools which can help you extract information out of documents and images efficiently and conveniently.  

    Within the Alteryx Computer Vision palette, you will find the following set of tools to which could retrieve information out of documents and images, adjust poor image quality and work with varying image formats. 

    Before we go in depth into the use case for Computer Vision, here is a quick introduction of the various tools within the Computer Vision tool palette. 

    Image Input Tool Image Input Add image into your workflow by connecting it to a folder path. The input data tool allows you to choose whether to Input All File Types or Only Include Specific File Types (BMP, JPEG, PDF and PNG) from the specified folder.
    Image Output Tool Icon Image Output The Image Output tool allows you to output the processed image into BMP, JPEG and PNG.
    Image Processing Tool Icon Image Processing The Image Processing can perform several actions, such as align, threshold, scale, and crop images. Other enhancements include balancing the brightness and converting to grayscale.
    Image Profile Tool Icon Image Profile Extract base data information like the image's size and number of channels; Exif data, which is metadata; and a summary of helpful metrics for each channel in the images, like the total number of pixels.
    Image Recognition Tool Icon Image Recognition Use Image Recognition to build a machine learning model that can classify images by group. You can use your own data and labels to train a new model, or you can use one of the pre-trained models within Alteryx.
    Image Template Tool Icon Image Template Use Image Template to identify tables and strings, creating a template for subsequent images using annotations.

    In order to demonstrate some of the Computer Vision tools, we will be looking at a case example where we would like to read through a few PDF invoices and have their information stored within our database. See PDF invoice sample below: 

    Invoice sample

    Please note that all information within the PDF sample are fictional and only for demonstration purposes. 

    Let’s look at what we can do with the Computer Vision tools on Alteryx. 

    Computer Vision Use Cases

    Use Case 1: Image Processing with Image Output

    The Computer Vision tool palette can run your documents through a simple image processing and output the result into a JPEG file. With the Image Input tool, the document can be easily read into the workflow.  

    In the Configuration panel, enter the folder path and name the resulting BLOB column. The BLOB column will hold the read input it receives from the input file. Select the relevant options to allow Alteryx to read in all file types or only specific file types within the folder. You can choose between PDF, BMP, JPG or PNG. The Image Input tool will then be able to read in all the specified file types from the folder selected into Alteryx. For this example, we will be importing a PDF file into the input tool.  

    Image Input tool

    After configuring the Image Input tool, drag the Image Processing tool onto the canvas. Then select the column you have created from the BLOB Column specified in the input tool. In order to configure the tool, you need to add steps for image processing. For this example, we will be converting the image into grayscale and cropping the image to achieve our ideal output. 

    Image Processing tool

    After processing, we can output the image into an image file. Drag in the Image Output tool into the canvas. Select the file with _processed string appended at the back since we are exporting the processed image. The name of the file can be selected as file or path, where we select file to retain its original file name. Select the output location and image file type desired. 

    Image Output tool

    After running the above workflow, the image below will appear in the specified location. As you can see, the image is now in greyscale and cropped with selected information present. In our example, the input PDF was relatively clean. Often, the scanned PDFs will often require adjustments for legibility, this can be achieved with additional parameters in the Image Processing tool.  

    Sample invoice

    Use Case 2: Extracting Text from Image

    The Image to Text tool within the Computer Vision palette helps you convert your BLOB images to text. After reading in your image from the Image Input tool, drag an Image to Text tool onto the canvas. Then select the name of the image and language of the text present within the image.  

    Image to text tool

    With a quick run, the text identified within the image will be present in the resulting column text as shown below. 

    With the help of data preparation and text parsing tools in Alteryx, we can clean the text to display each line from the image into rows as shown below. This is a critical step in automating scanned PDFs into rows of text information for further processing. Once the logic of text parsing is identified, the method can be applied to multiple files without any need for additional adjustments. 

    Data preparation and text parsing tools

    Use Case 3: Integrating information from Multiple Image Files to an existing database

    When dealing with large volumes of documents, invoices or receipts, importing them one file at a time is rather tedious. More often than not, we would hope to be able to import files in bulk, rather than importing them one by one. With the Image Input tool, you are able to do just that. Using the Image Input tool, point to the folder path which holds the various image files for processing. Once you point to that folder, all the files which are of the file type selected will be read in.  

    Now you might be thinking, how do I ensure that the data from similar files will all be read in by the tool the same way? Within the Computer Vision tool palette, there is an Image Template Tool that helps create templates for image inputs using annotations. Here in our example, we will be annotating our invoice to only input the relevant information needed, such as the Client ID, Invoice Number, Table and the invoice date. The annotations can be saved as an image, string or table to be used for further processing.  

    The resulting output will hold the number of columns depending on the number of annotations you made on your image. Since we made four annotations on our pdf file, the resulting output would give us four columns. Each row below represents each file being read in by the Image Input tool 

    file being read in by the Image Input tool.

    After successfully reading in the information from the image into Alteryx, we can make use of the data preparation and parsing tools to further break down the table to show the cleaned tabular result as below. 

    data preparation and parsing tools

    When your data is ready, you can join your read in data with previous data you might already have stored in your database. For our example, we have stored our read in data from the invoices, to be joined with the past invoice data we have in our excel file.  

    Joining data

    Now we can easily analyse our data and answer questions like how much each client has spent or which service is most popular within our company. We can even use Alteryx’s Reporting tools to craft a Quarterly Business Report on the business’ performance.  

    Get efficient with Computer Vision

    The Computer Vision and various other tools within the Intelligence Suite aim to help automate use cases. As depicted in this blog post, you can easily turn readily available data into breakthroughs. With the Computer Vision tools, reading and analysing data from images or files has never been easier. These tools are also designed to do these tasks at scale, while still giving you the flexibility to choose specific areas of focus when extracting information. Paired with the data cleaning, preparation and analysing tools on Alteryx, there is no limit to what you could achieve from your data.  

    Now it’s your turn! If you would like to find out more about Computer Vision, or Alteryx Designer in general, our Alteryx certified consultants here at Billigence could help you further explore tools and solutions to cater to your organisation. Please feel free to submit an enquiry form below to find out more and get in touch with us to start your journey and uncover hidden potentials of your organisation’s data with Alteryx. 

    Contact Us

    Leave a Comment

    Scroll to Top