mlange-42 / chrono-photo

Chronophotography command line tool and library in Rust.

Home Page:https://mlange-42.github.io/chrono-photo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Multi-threading support

mlange-42 opened this issue · comments

Multi-threading can be applied for time-slicing as well as actual processing.

  • Time-slicing

For time-slicing, it is only possible to process image rows in parallel, while processing images in parallel is not (easily) possible, since rows are successively appended to temporary files.

The speed gain may be limited, particularly for low resolution images. Further, parallel writing to streams may be a bottle neck?

  • Video frames

Calculating frames of a video is simple.

However, is increases memory usage.

  • Camera shake analysis

Parallelize over frames. Increases memory usage.

  • Processing

Processing itself could by parallel over image rows. However, this would require loading multiple temporary files into memory at the same time, which could be a problem for series of a really high number (really really high!) images.

Alternatively, processing of pixels in the same row could be done in parallel. The gain would be highest for large images, and particularly for large amounts of images in a series.