Skip to content

Block operations

Luis edited this page May 22, 2018 · 7 revisions

operations

VDMS allows for operations to be performed to an image at insertion and/or query time. Currently supported operations are: threshold, crop, resize. Therefore, those are the operations currently recognized in this block. More operations can be added in the future.

At least one operation must be defined in the array.

All the parameters are required for each operation. The parameters for the various operations supported are:

Parameters

  • type: Type of operation [crop, threshold, resize].

  • others (dependent on the type):

    • threshold:

      • value: is the value of the threshold above which all pixel values are returned and below which all pixel values are zeroed
    • crop:

      • "x", "y": specify the starting position x and y.
      • "width", "height": specify the width and height of the crop.
    • resize:

      • "width", "h": give the new expected width and height of the image, performs bilinear interpolation entity (entities).

Example

// resize and threshold
"operations": [
    {
        "type": "resize",
        "width": 200, "height": 200,
    }
    {
        "type": "threshold",
        "value": 155,
    }
],


// Crop and threshold
"operations": [
    {
        "type": "crop",
        "x": 255, "y": 155,
        "width": 15, "height": 10,
    },
    {
        "type": "threshold",
        "value": 155,
    }
],
Clone this wiki locally