TD_IMAGE2MATRIX Examples - Teradata Vantage

Database Unbounded Array Framework Time Series Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
ncd1634149624743.ditamap
dita:ditavalPath
ruu1634160136230.ditaval
dita:id
ncd1634149624743

Example: Convert Image to matrixes with Gray Value

CREATE TABLE matrixTable AS
(
  SELECT * FROM
   TD_IMAGE2MATRIX (
     ON (SELECT id, image FROM imageTable)
     USING
     OUTPUT ('gray')
   )  t
) WITH DATA
PRIMARY INDEX (id, y, x);
The primary index contains multiple columns to reduce hash conflicts.

Example: Convert Image to matrixes with RGB Values

CREATE TABLE matrixTable AS
(
  SELECT * FROM
    TD_IMAGE2MATRIX (
      ON (SELECT id, image FROM imageTable)
      USING
      OUTPUT ('rgb')
    ) t
) WITH DATA
PRIMARY INDEX (id, y, x);