image_adapter [TAST DokuWiki ]

User Tools

Site Tools


Sidebar

First steps in TAST

What is UML

Computer setup for TAST use

FAQ

Recognized Issues

TAST tool Menu

TAST Adaptors

Adaptors examples

TAST Integrations

Interesting features

Documentation of technical administration

Modeling recommendations

Training in the TAST tool

image_adapter

Image Adaptor

Introduction

The image adapter allows you to compare two images. It should be clear that images are compared pixel by pixel. That is why a function has been created to compare and return the percentage of the difference:

  • If the images are the same, pixel for pixel, the difference is 0, i.e., they are identical.
  • If there is any variation, i.e., if the photo has been resized or the colour has been changed, the percentage will be between 0 and 10.
  • If the images being compared are totally different, the percentage will be between 11 and 20.

Initialization parameters

The imagen adapter has only one parameter. This parameter is the path to the image we want to work with:

  • FilePath: full path where the image is stored.

Predefined functions (PF)

  • compareWithAnother: compares the image of the adapter with another image. It has two input and one output parameter:
    • ImageToCompare: path of the image to compare. This is mandatory.
    • ResultPath: path to the folder to leave the result. This is optional. If empty, the resulting image Will be in the TCD path. The new image will be an image with red rectangles marking the difference between images.
    • DifferencePercent: output parameter. It is a double data type and gives information about the percentage difference.

  • Resize: Allows you to reasize an image. It has three input parameters:
    • ImageToTransform: path of the image to transform. This is optional. If the user does not enter a path, TAST uses the path of the image adapter.
    • Scale: is mandatory, if the number is positive, it enlarges the image. If it is a negative number, it reduces the image.
    • ResultPath: path to the folder where to leave the result. This is optional. If empty, the resulting image will be in the TCD path.

  • transformBlackAndWhite: allows you to transform a colour image into a black and white image. It has two input parameters:
    • ImageToTranform: path of the image to transform. This is optional. If the user does not enter a path, TAST uses the path of the image adapter.
    • ResultPath: path to the folder where to leave the result. This is optional. If empty, the resulting image will be in the TCD path.
image_adapter.txt · Last modified: 2023/12/18 13:46 by montse