The prototype is developed as a distributed system: a graphical interface with partial processing of graphic data (hereinafter referred to as graphics) and a remote core, producing basic and final image processing.
Graphical interface - node based: Each operation performed on the image is represented as a node, the nodes are connected by connections to form a tree (oriented graph) of solutions. The data goes from the node (node) Read (or nodes generating the procedural image (constant color, gradient, etc.)) to the Write node in stages, undergoing processing in each node. Nodes are divided into: Color correct, Image transform, Image read / write / view, Image create, Image filter, Image merge, Image channel editing. The Read nodes and nodes generating procedural images are declared as root nodes, the process starts with them.
Before processing the image is divided into parts (tiles). Each part falls into a separate stream of pipelining (in accordance with the loaded script). At the output of the individual parts are collected in the resulting image. Each of the parts can be processed both locally and on a remote server (cloud). Processing of the entire image is also possible.
')
System architectureThe execution scenario is presented in the form of a directed graph, where each node (node) is an object with a description of the procedures and properties: node.procedure, node.properties. Before execution, the kernel converts the graph and orients it for sequential execution of operations.
Example:
read_01(file_name_01.jpg)->blur_01->size_01
read_02(file_name_02.jpg)->blur_02->size_02
the outputs from the size_01 and size_02 nodes go to the merge (plus) node where the addition of both streams takes place, followed by writing to the disk. The kernel expands the graph and executes sequentially:
read_01->blur_01->size_01 || read_02->blur_02->size_02 ||
size_01,size_01-->> megre(plus)->write(file_name_out.jpg)
In the node, there is also a link (except for the root nodes) to the data source (the previous node in the graph).
Through links all nodes are connected, forming a directed graph:
read_01->size_01(link to read_01)->write_01(link to size_01)
The Merge node has at least two inputs: merge_01 (link_a, link_b)
Realized functions: Read, Write, Blur, Sharpen, Color Correct, Size, Rotate, Composite, View.
Script Description Format: JSON
For kernel development, use: Python 2.7, Python Image Library, Numpy / Scipy
Library for graph visualizer: NetworkX, matplotlib
Graph visualizationExample script: (test.json):
{ "node1":{ "name" : "read_01", "type" : "read", "file" : "in.jpg", "id": 1 }, "node2":{ "name" : "blur_01", "type" : "blur", "link" : "read_01", "size" : 10, "id": 2 }, "node3":{ "name" : "write_01", "type" : "write", "link" : "blur_01", "file" : "test.jpg", "id": 3 } }
The author does not set a goal to release ready-made software.
This is a research project. Just for fun.
Link to the repository with the project:
github.com/shrimo/node_image_toolsSketch GUI:
www.behance.net/gallery/Neural-composer/6203259Detailed description of the procedures and properties of nodes:
docs.google.com/document/d/1ehPRAwRzhlibXLq6l_6LlObTzN8K20E6Toa9820EmvY/pubPS
The author will be very happy sane comments.