Hello everyone, I'm thinking of a project, main id...
# arrow
r
Hello everyone, I'm thinking of a project, main idea is about processing an image with
OpenCV
. I believe that I should implement something reactive + FP: imagine there is a bar where we can "just add new processing operation". This will result in a "list of operations", applied:
rawImage -> op1-> op2 -> op3 -> processedImage
. where all
opX
take result of the previous one. That would be great to memoize the result of operations, so that if I change some characteristics in
op3
for example (each operation has its own arguments), that wouldn't lead to recomputation of
op1
and
op2
. Which way should I dig in, how do you think? I think this is ideal for FP, what do you say?
Goal is to implement the core logic and be able only to describe new operations and add them with their handlers later.
r
hi @rcd27, https://sksamuel.github.io/scrimage/composites/ by @sam does a great job at a composable image processing api that also works in Kotlin. I had used this library before on a server that would translate paths to image compositions and cached images for mobile devices. Sam’s library worked great. the composites link up there shows how you can compose filters etc resulting in new immutable images.
👍 1
👍🏻 1
If you want to introduce opencv the lib can still serve as inspiration on how it composes the different apis for your lib
r
@raulraja thank you, I'll look how it is written there.