Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Vision Thing (Part 1): Ingesting Web Camera Images From Apache NiFi Machines

DZone's Guide to

Vision Thing (Part 1): Ingesting Web Camera Images From Apache NiFi Machines

Learn how to use a custom web camera processor to ingest images via Apache NiFi on an OSX laptop equipped with two web cameras.

· Big Data Zone ·
Free Resource

Hortonworks Sandbox for HDP and HDF is your chance to get started on learning, developing, testing and trying out new features. Each download comes preconfigured with interactive tutorials, sample data and developments from the Apache community.

In preparation for this talk, I am releasing some articles detailing how to work with images. In this one, I use my custom web camera processor to ingest images via Apache NiFi on an OSX laptop equipped with two web cameras.

This will let you ingest as many images as you need for security, motion detection, or just plain fun.

The Custom Processor is here.

My processor is a thin wrapper on an awesome Java library. See here for more details.

To use the processor, you can clone my GitHub project or download the prebuilt NAR, install it to your nifi/lib directory, and restart your NiFi server.

It is easy to use. Add the processor to your workflow at the start to ingest images from your webcam.

The processor takes two properties: imagefilename and cameraname. The imagefilename is the name you want the newly created image to be. The cameraname is the name of the camera if you have more than one. You can put in a partial name to match. For my OSX machine, I have the built-in one and I have one in my display. When I am working in locked mode, I want it to grab the display version, so I enter the text "display".

When combining with the custom TensorFlow processor, it's really nice workflow.

The easiest Java 8 code ever! Wrap any of your Java goodness and make it a processor!

It's even easier to test. When you use the Maven archetype, it builds the full directory, a valid empty processor, and a unit test.

Apache NiFi builds the documentation for me. Add some comments to your code, and blammo!

Another awesome option is to use the MiNiFi C++ agent to ingest your webcam images.

Example image:

Hortonworks Sandbox for HDP and HDF is your chance to get started on learning, developing, testing and trying out new features. Each download comes preconfigured with interactive tutorials, sample data and developments from the Apache community.

Topics:
big data ,tutorial ,ingesting data ,apache nifi ,image recognition

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}