ShapeLogic Scala is a generic computer vision library with cross-platform GUI. You write your image processing algorithm once, and it will work for images based on byte, short, float and double.
It has standard image processing algorithms like: Invert, threshold, edge detection, segmentation, skeletonize, edge tracer, vectorizer, point and line annotation all written in generic idiomatic Scala.
"org.shapelogicscala" %% "shapelogic" % "0.9.0"
Versions available for Scala 2.11 and 2.12
clone git https://github.com/sami-badawi/shapelogic-scala.git
cd shapelogic-scala
sbt compile
sbt test
sbt stage
target/universal/stage/bin/shapelogic
or on Windows
target/universal/stage/bin/shapelogic.bat
ShapeLogic Scala has a simple JavaFX GUI, it can:
ShapeLogic Scala goal is be a framework for object recognition using a hybrid approach to A.I. combining machine learning and symbolic A.I. Using some of the following techniques:
First example will be OCR, optical character recognition for a page of text. It is a solved but nontrivial problem.
The success of Convolutional Neural Network is indisputable. ShapeLogic intend to use CNN for lower level pattern matching not for end to end solutions. Either using TensorFlow's Java interface, Deeplearning4j or hand programmed pattern matches.
ShapeLogic Scala has a unified generic image class BufferImage that is mainly a buffer.
If you want to program your own image operations here are 5 base image operations you can start from:
There are a lot of challenges with creating a generic image class like BufferImage:
ShapeLogic Java was started in 2007 as a Java image processing library and library for functional programming techniques in Java. Functional programming now has better implementations in Java 8 and Scala. ShapeLogic Scala was started in 2016 and ports parts of ShapeLogic Java.
The goal is to keep library dependencies for ShapeLogic low. Currently the images loaders are using javax.imageio and JavaFX. They are only part of Oracle JDK not on OpenJDK.
Threshold:
sbt 'run-main org.shapelogic.sc.script.Threshold -i "image/rgbbmwpng.png" -t 10 -o "image/out.png"'
or
target/universal/stage/bin/shapelogic -main "org.shapelogic.sc.script.Threshold" -- -i image/440px-Lenna.png