A library and application for manipulating and creating images and audio.
Functionality which presently works well and default parameters are tuned to work well for most cases.
What | Where | Test |
---|---|---|
Image mosaic | DoMosaic | DoesMosaicTest |
Image similarity | ImageMatchers | ImageMatchersTest |
Docker image | On Dockerhub |
Functionality which may or may not work well yet, where default parameters are a WIP, etc.
What | Where | Test |
---|---|---|
Genetic Algorithm for sub-image matching | SimpleCompleteGeneticAssembler | SimpleCompleteGeneticAssemblerTest |
Image mosaic using non-uniform quadrilateral grid | QuadrilateralAssembler | QuadrilateralAssemblerTest |
$ ./sbt clean assembly
will create the far jar: bin/Sclaav.jar
$ ./sbt clean test
This is the preferred method for using this tool.
Original | Mosaic |
---|---|
- Given a
target
image (or set of target images) and a set ofsample
images,- Discretize target image in grid by
rows
andcols
. - For each sub-image, find the
sample
image which is the closest match; by default we use min-2-norm
distance betweenARGB
average vectors. - Assemble each matched sample image onto the original to create the mosaic.
- Eyeballs be amazed.
- Discretize target image in grid by
Run with:
$ java -jar bin/Sclaav.jar \ # invokes jar
--in file:///input-files-dir \ # input images directory
--out file:///output-dir \ # output directory
--mode permute \ # permute or single mode
--rows 64 \ # how many rows to split target
--cols 64 \ # how many cols to split target
--samples 300 \ # how many samples to use from input dir
--filters true \ # apply and use filtered images
--target file:///photo.jpg # if mode is single, specify the target image to use
Given a target image, print out the images which best matches based on a distance metric and similarity measure (Euclidean ARGB for now).
Run with:
$ java -jar bin/Sclaav.jar \
--in file:///input-files-dir \
--out file:///output-dir \
--mode similarity \
--samples 300 \
--target file:///photo.jpg
This comes with a Docker image! Build with:
./sbt docker
Or pull the image from Docker Hub:
docker pull ogeagla/sclaav
The container contains:
- The assembly jar in
/opt/sclaav/Sclaav.jar
- DCRAW installation. Test with
/opt/dcraw/scripts/test.sh
.
To use the container as a DCRAW execution environment, first start the container, then run a shell into it.
Run the container with:
docker run oct/sclaav:latest
Check that it is running with:
docker ps
Find the container ID and then run:
docker exec -it <container-id> bash
You will then have a prompt inside the running container. Run the test script with:
sh /opt/dcraw/scripts/test.sh
Which should create a thumbnail jpeg in /opt/dcraw/samples
.
http://www.octaviangeagla.com/bap
Apache 2.0