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.
Join the DZone community and get the full member experience.Join For Free
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.
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.
Opinions expressed by DZone contributors are their own.