Dot OperatorΒΆ

[1]:
import logging
logging.basicConfig(level=logging.INFO)

import graphcat.notebook
import imagecat.notebook

graph = graphcat.StaticGraph()
imagecat.add_task(graph, "/load", imagecat.operator.load, path="Wood048_2K_Color.jpg")
imagecat.add_task(graph, "/dot", imagecat.operator.color.dot, matrix=[[0.6], [0.6], [0.1]])
imagecat.add_links(graph, "/load", ("/dot", "image"))


graphcat.notebook.display(graph)
image = graph.output("/load")
../_images/user-guide_dot_1_0.svg
INFO:imagecat.operator:Task /load load:
INFO:imagecat.operator:  layers: *
INFO:imagecat.operator:  path: Wood048_2K_Color.jpg
INFO:imagecat.operator:  output: Image(C: Layer(Role.RGB 2048x2048x3 float16))
[2]:
image.layers["C"]
[2]:
../_images/user-guide_dot_2_0.png
[3]:
image = graph.output("/dot")
INFO:imagecat.operator.color:Task /dot dot:
INFO:imagecat.operator.color:  inlayer: None
INFO:imagecat.operator.color:  matrix: [[0.6]
 [0.6]
 [0.1]]
INFO:imagecat.operator.color:  outdtype: float16
INFO:imagecat.operator.color:  outlayer: Y
INFO:imagecat.operator.color:  outrole: Role.LUMINANCE
INFO:imagecat.operator.color:  output: Image(Y: Layer(Role.LUMINANCE 2048x2048x1 float16))
[4]:
image.layers["Y"]
[4]:
../_images/user-guide_dot_4_0.png