TD_IMAGE2MATRIX Examples - Teradata Vantage

Database Unbounded Array Framework Time Series Functions

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2026-03-23
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);