akka stream for image processing

Post on 21-Mar-2017

361 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Akka StreamFor Image processing

Fabian GUTIERREZfabGutierrfagossa

Who we are?

Diana ORTEGAdicaormudicaormu

Agenda

● Context● Images, motion detection● Streams, back pressure and all that stuff● Image processing in a reactive pipeline

Context

Consume StreamedImages

Detection Motion

Identify obstacle with Tensor flow

Stream result

DetectionMotion

Show Image

CaptureImage

Python

Images and image processing

Motion Detection

Motion detection

Streams, back pressure and all that stuff

Pub

lishe

r

Sub

scrib

er

Back-pressured

Pub

lishe

r

Sub

scrib

er

Back-pressured

100

op/s

ec

1 op

/sec

Pub

lishe

r

Sub

scrib

er

Back-pressured

100

op/s

ec

1 op

/sec

.

.

.

Fast :)

Slow :’(

Pub

lishe

r

Sub

scrib

er

Back-pressured

100

op/s

ec

1 op

/sec

Request(3)

Back-pressured stream processing

monix

Streams

Image processing with pipelines

CaptureImage

MotionDetection

Show image

CaptureImage

MotionDetection

Show image

Motion detection

smooth

diff threshold

smooth

CameraSource

MotionDetection

ScreenSink?

Something

LocalCameraSource

Show ImageSink

RemoteHttp

Source

MotionDetection

CouchbaseSink

S3 KafkaSink

4 3 2 1Source Sink

4 3

2

1

Source Sink

Grouped

Scala implementation

Initialisation

Source

Grouped elements call flow

Sink

Java implementation

Initialisation

Source

Grouped elements call flow

Sink

Source scala

Source java

Flow scala

Flow creation

Operationsimages

Operationsimages

Flow creation

Operationsimages

Operationsimages

Flow java

Flow creation

Operationsimages

Operationsimages

Sink

Rx

.Observable

.prototype

.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

github.com/akka/alpakka

https://github.com/fagossa/camera_stream

https://github.com/fagossa/camera_stream

fabGutierr

dicaormu

blog.xebia.fr

Contact

top related