https://github.com/farzadshayanfar/nodiumpy
Simple node editor application for learning image processing
https://github.com/farzadshayanfar/nodiumpy
dearpygui flow-based-programming image-processing node-editor python
Last synced: 5 months ago
JSON representation
Simple node editor application for learning image processing
- Host: GitHub
- URL: https://github.com/farzadshayanfar/nodiumpy
- Owner: farzadshayanfar
- License: apache-2.0
- Created: 2023-05-04T21:45:45.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-16T07:44:56.000Z (almost 3 years ago)
- Last Synced: 2025-09-06T20:44:22.010Z (6 months ago)
- Topics: dearpygui, flow-based-programming, image-processing, node-editor, python
- Language: Python
- Homepage:
- Size: 748 KB
- Stars: 23
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# NodiumPy
This is a very simple and minimal python application for node based image processing. The structure is very lean and
highly modular and allows for the existing nodes to be easily modified or for new nodes to be conveniently added.
My goal in writing this was to learn about dearpygui and flow based programming. The use case for this simple
application is merely educational and will benefit students or other enthusiasts wishing to develop a visceral and
practical understanding of how some image algorithms affect the input image and what the combination of these algorithms
will look like.

# Avalilable Nodes
Input Nodes
Image

This node opens a single image file (common image formats are supported).
Image Folder

This node allows retrieving a sequence of images in a specified directory. Also makes it possible to iterate and loop over the sequence.
Screen Recorder

Using this node, it is possible to capture the main screen or get all available screens (as a single large image). We can capture screen(s) as a single snapshot or a stream of snapshots.
2D Shape

This node creates several primitive 2D shapes with control over size, fill color, stroke color, and stroke weight.
Video

This node retrieve a video file and allows common video play functionality (playing, seeking, frame skip, and looping)
Webcam

As the name denotes, this node is for capturing image streams from connected webcams.
Adjustment Nodes
Crop

Node for cropping an input image. It offers two modes for cropping: (1) center crop, and (2) two corner crop
Flip

Flips the input image either horizontally, vertically or both.
Mask

Applies a binary mask to an input image.
Normalize

Normalizes the input image using provided mean and std.
Resize

Node for resizing the input image.
Rotate

Rotates the input image. There is an option for allowing reshaping of the rotated image, if off the rotated image is truncated, otherwise it will resize the rotated image such that no truncation happens.
Threshold

Node for thresholding input images.
Filter Nodes
Convolution

This node applies convolution operation for a parameterized kernel and the input image.
Edge Detection

This node allows for application of several edge detection algorithms on the input image.
Light Enhancement

Currently this node only offers an implementation of the VEVID algorithm from PhyCV library.
Smoothing / Sharpening

This node contains some of the common algorithms for smoothing and sharpening of the input image.
Code Snippet

We can use this node to write our own custom python filter code snippet. The variable "inImg" holds the reference to the input image and the variable "outImg" is the reference to the output image.
Viewer Nodes
Canvas

This node allows for composition of several input images into an output image. It supports layering, transforming, and several blending modes.
Image View

This node is used to visulize the output image or output image sequence. It has a context menu with entries for resizing and saving the displayed image.
Output Nodes
Image Writer

Node for writing image files to disk.
Video Writer

Node for writing video files to disk.
# Requirements
Python 3.11.3 and above is supported. All the required libraries can be installed using this line:
```
pip install dearpygui opencv-python Pillow
```
# Running
After setting up a python environment and installing the requirements, you can launch nodiumpy by running *main.py*
```
python main.py
```
# License
NodiumPy is licensed under Apache 2.0 License.
# Credits
+ Developed by Farzad Shayanfar
+ *[Jonathan Hoffstadt](https://github.com/hoffstadt)* and *[Preston Cothren](https://github.com/Pcothren)* and others
for their work on *[DearPyGui](https://github.com/hoffstadt/DearPyGui)*
+ This work is highly inspired by
*[Image-Processing-Node-Editor](https://github.com/Kazuhito00/Image-Processing-Node-Editor)* by
*[Kazuhito Takahashi](https://github.com/Kazuhito00)*