Fast computer vision library for SFM, calibration, fiducials, tracking, image processing, and more.

Overview

Build Status Join the chat at https://gitter.im/lessthanoptimal/BoofCV Maven Central


Table of Contents


Introduction

BoofCV is an open source real-time computer vision library written entirely in Java and released under the Apache License 2.0. Functionality includes low-level image processing, camera calibration, feature detection/tracking, structure-from-motion, classification, and recognition.

Cloning GIT Repository

The bleeding edge source code can be obtained by cloning the git repository.

git clone -b SNAPSHOT --recursive https://github.com/lessthanoptimal/BoofCV.git boofcv

Is the data directory empty? That's because you didn't follow instructions and skipped --recursive. Fix that by doing the following.

cd boofcv
git submodule update --init --recursive

Quick Start Examples and Demonstrations

New to Java? Make sure you have Java 14 or newer installed. In the command line type java -version and you should see something like:

java -version
openjdk version "14" 2020-03-17

In this case I do have Java 14 installed. If you need to install/upgrade Java there are many options these days, such as Zulu. A quick search should help if you need a more detailed explanation. You should avoid anything with -ea in its name since that's a developmental version.

You can now build and run? Then run the commands below! Each jar will open a window, then to run an application just double click on its name.

cd boofcv
./gradlew autogenerate
./gradlew examplesJar
java -jar examples/examples.jar
./gradlew demonstrationsJar
java -jar demonstrations/demonstrations.jar

All the code for what you see is in boofcv/examples and boofcv/demonstrations. Example code is designed to be easy to understand so look there first.

Click HERE for instruction on building and running Applications. There you can calibrate cameras, create QR codes, batch scan for QR codes, batch downsample images, ... etc.

Maven Central Repository

BoofCV is on Maven Central and can be easily added to your Maven, Gradle, ...etc projects. It's divided up into many modules. The easiest way to include the critical modules is to have your project dependent on 'core'.

For Maven projects:

<dependency>
  <groupId>org.boofcv</groupId>
  <artifactId>boofcv-core</artifactId>
  <version>0.37</version>
</dependency>

There are also several integration modules which help BoofCV interact with external projects. A list of those is included below:

Name Description
boofcv-core All the core libraries without any of the integration modules listed below
boofcv-android Useful functions for working inside of Android devices.
boofcv-javacv JavaCV is a wrapper around OpenCV mainly for file IO.
boofcv-ffmpeg javacpp-presets their ffmpeg wrapper is used for reading video files.
boofcv-jcodec JCodec is a pure Java video reader/writer.
boofcv-swing Visualization using Java Swing
boofcv-WebcamCapture A few functions that make WebcamCapture even easier to use.

Directories

Directory Description
applications/ Helpful applications
data/ Directory containing optional data used by applets and examples.
demonstrations/ Demonstration code which typically lets experiment by changing parameters in real-time
examples/ Set of example code designed to be easy to read and understand.
integration/ Contains code which allows BoofCV to be easily integrated with 3rd party libraries. Primary for video input/output.
main/ Contains the source code for BoofCV

Building from Source

Building and installing BoofCV into your local Maven repository is easy[1] using the gradlew script:

cd boofcv
./gradlew autogenerate            # Creates auto generated files
./gradlew publishToMavenLocal     # Installs it into the local maven repository 

If you wish to have jars instead, the following commands are provided.

./gradlew oneJarBin               # Builds a single jar with all of BoofCV in it
./gradlew createLibraryDirectory  # Puts all jars and dependencies into boofcv/library
./gradlew alljavadoc              # Combines all JavaDoc from all sub-projects into a single set

[1] A couple of the integration submodules have a custom build process that can't be performed by Gradle. The script is smart enough to ignore modules and tell you that it is doing so if you haven't configured it yet.

IntelliJ

IntelliJ is the recommended IDE for use with BoofCV. With IntelliJ you can directly import the Gradle project.

  1. File->Project From Existing Sources
  2. Select your local "boofcv" directory
  3. Confirm that you wish to import the Gradle project

Eclipse

The easiest way to import the project is to use Gradle to generate an Eclipse project.

cd boofcv
./gradlew eclipse

Then in Eclipse; 1) "import existing projects", 2) Select your BoofCV directory, 3) Click Finish. You can also install a Gradle plugin to Eclipse and import the project directory. That's left as an exercise for the reader.


Dependencies

Core BoofCV modules depends on the following libraries

The following is required for unit tests

Code from the following libraries has been integrated into BoofCV

The optional sub-projects in integration also have several dependencies. See those sub-projects for a list of their dependencies.


Contact

For questions or comments about BoofCV please use the message board. Only post a bug report after doing some due diligence to make sure it is really a bug and that it has not already been reported.

Message Board

Issues
  • building android aar library

    building android aar library

    Hello, is there a known way to build boofCV to android aar library?

    opened by TheBricktop 2
  • Logging erratic CI crash in Github Actions

    Logging erratic CI crash in Github Actions

    If anyone knows Github Actions and can help access a JVM error log that would be very helpful. CI decided to start failing 50% of the time and is extremely annoying. The message says it log the failure to the location below but I'm not sure how to access it.

    /home/runner/work/BoofCV/BoofCV/main/boofcv-sfm/hs_err_pid3109.log

    The fix is probably simple but it would be helpful (and allow more time to be spent on new features) if someone could show us how to access this log so it can be debugged.

    help wanted 
    opened by lessthanoptimal 0
  • Perceptual hashing support for image similarity

    Perceptual hashing support for image similarity

    Related to the latest censorship scandal around Apple and its image scanning efforts I came across this topic: https://en.wikipedia.org/wiki/Perceptual_hashing

    IMHO it is a nice mechanism in general however the science behind there is still new and probably not standardized enough but maybe it can be in use for image processing already. There is an approach here: https://github.com/KilianB/JImageHash And there is a nice thesis here: https://www.phash.org/docs/pubs/thesis_zauner.pdf

    I am sorry I can not be of help of further development at the moment and no I am not related to any censorship related stuff. ;-)

    feature request 
    opened by thhart 1
  • Add support for Aztec Codes

    Add support for Aztec Codes

    The QrCode works great but I need my application to be able to support both datamatrix and aztec codes as well

    feature request 
    opened by github-account-0x00 1
  • Alpha channel has random index

    Alpha channel has random index

    When I convert Buffered Image to Planar than the alpha channel can be sometimes found with rgbF32.getBand(0) and other times with rgbF32.getBand(3). Am I doing something wrong?

    Planar<GrayF32> rgbF32 = ConvertBufferedImage.convertFromPlanar(imageSource, null,true, GrayF32.class);

    the imageSource is a BufferedImage.TYPE_INT_ARGB_PRE

    EDIT: I found out that my BufferedImage Type is not always TYPE_INT_ARGB_PRE but is sometimes TYPE_INT_ARGB. So for TYPE_INT_ARGB_PRE you can find the alpha channel at 0 index. For TYPE_INT_ARGB the alpha is at 3.

    Under Investigation 
    opened by c4da 1
  • PnP that can handle points in homogenous coordinates

    PnP that can handle points in homogenous coordinates

    Needs to properly handle homogenous coordinates and not just convert them into 3D points. This way if points are far away they will not screw up the numerics and will effectively just contribute to the orientation estimate. If only points at infinity are found the translation component should be zero. This might require adding a slight bias to keeping it at (0,0,0).

    opened by lessthanoptimal 0
  • Question: Using TornadoVM to accelerate processing

    Question: Using TornadoVM to accelerate processing

    Using boofcv for several years now, I just wonder whether you have considered to support GPUs via TornadoVM https://github.com/beehive-lab/TornadoVM in order to accelerate processing.

    feature request 
    opened by ecmnet 1
  • Self Calibration by constant internal parameters and solving quadratic equations

    Self Calibration by constant internal parameters and solving quadratic equations

    H&Z 19.3.2

    Implement that and see how well it works compared to other approaches. It should work with 3-views.

    opened by lessthanoptimal 0
  • Eigenvalue variant of SelfCalibrationLinearDualQuadratic

    Eigenvalue variant of SelfCalibrationLinearDualQuadratic

    Implement another variant of SelfCalibrationLinearDualQuadratic which uses Eigenvalue decomposition. Create a more robust performance study to see which variant is the most stable. Revisit some of the massaging/hacks in the current code to see if they help or hurt.

    opened by lessthanoptimal 0
  • Added GST Webcam support to BoofCV

    Added GST Webcam support to BoofCV

    Also added method to switch between camera backends using a static method

    opened by gatordevin 1
Releases(v0.37)
  • v0.17(Jun 19, 2014)

    Date : 2014/6/19 Version : Alpha 0.17

    • Improved/Fixed serialization
      • Several classes were missing no argument constructors
    • Added ImageMiscOps.flipHorizontal()
    • Added WeightSample2D_F32 for computing the weight of a sample in an abstract manor
      • Reduced MeanShiftPeak from 3 classes into one
    • Edge Non-Maximum suppression's documentation now clearly states that it suppresses only if adjacent pixel is less than. This is not true non-maximum suppression since it allows equal values but seems to produce better results
      • Improved unit tests to explicitly test for this behavior
    • Canny edge detector would fail if threshold was zero and the image had no texture
      • HysteresisEdge* code was using a value of 0 to mark traversed regions. It now uses -1 and sanity checks the lower threshold.
      • Thanks Lucaro for finding this bug
    • Added GImageMultiBand for generalized access to multi-band image data
    • Added support for MultiSpectral images to:
      • GBlurImageOps and BlurImageOps
    • Image Segmentation / Superpixels
      • Watershed
      • Mean-shift
      • Felzenszwalb-Huttenlocher 2004
      • SLIC Superpixels
    • Dense Optical Flow
      • KLT Based
      • Square Region Based
      • Horn Schunck
      • Horn Schunck Pyramid
      • Brox Spacial Warping
    • Fixed bugs in ConvertNV21
      • Was applying YV12 byte alignment to NV21 images. Depending on image size, this could cause a crash.
    • Fixed bug in ImplConvertToBitmap.multiToArray_F32()
      • Didn't handle case where the input image has 3 bands and not 4
    • ImageBase now provides a method for getting ImageType information
    • Threshold in the interface Associate is now <= instead of <
    • Android
      • Added classes which greatly simplify dealing with camera previews
      • Added new visualizations intended for use with segmented images
      • Simplified example code
    • Added XYZ and LAB color spaces
    • GImageMiscOps.fillUniform() max is inclusive for both integer and float and this is enforced
    • BinaryImageOps
      • Erode and dilate can now be applied multiple times with a single function call
    • StitchingFromMotion2D can now resize and translate the stitch image
      • Thanks Julien Seinturier for the suggestion
    • Convolution
      • 1D convolution now supports kernels which are not symmetric
    • Image gradient from a difference of two neighbors added
    • Square grid calibration grid detector has been improved.
      • No longer permutes through all combinations. Selects each valid square and assumes its the first instead
      • Graph connection rule has been improved too to reduce false connections
    • Moved serializeXML from BoofMiscOps to UtilIO
      • Removing an IO function which shouldn't be in image processing
    • FactoryDerivative
      • If derivative type is null it will use the default
    • Added ImageType to interpolate interface
    • Added ImageType to ImageSegmentation interface
    • Processing (http://processing.org) integration
      • Lots of examples
      • Simplified interface for working with BoofCV
    • XStream now works without that ugly hack
      • Thanks to Jörg Schaible of XStream for fixing the issue and all the help
    • Webcam Capture Support
      • Easy to use library for streaming webcams
      • Wrote several example showing how Webcam Capture can be used with BoofCV
    • Structure From Motion (SFM) example
    Source code(tar.gz)
    Source code(zip)
    boofcv-v0.17-docs.zip(5.38 MB)
    boofcv-v0.17-libs.zip(4.86 MB)
    boofcv-v0.17-src.zip(198.77 MB)
图片/GIF/音频/点选验证码生成工具,可以自定义图片尺寸,字体,颜色,干扰项等等。

简介 captcha是一个图片/点选/音频验证码生成工具库。 1.调用ImageCaptchaUtil中的方法来生成验证码图片信息,支持返回图片byte[],base64字符串和base64Data字符串。可设置干扰线类型来生成不同干扰类型的验证码图片。可已自定义图片背景颜色,图片宽度高度,字体,字

牛长清 22 Sep 2, 2021
Simple Java image-scaling library implementing Chris Campbell's incremental scaling algorithm as well as Java2D's "best-practices" image-scaling techniques.

imgscalr - Java Image-Scaling Library http://www.thebuzzmedia.com/software/imgscalr-java-image-scaling-library/ Changelog --------- 4.2 * Added sup

Riyad Kalla 1.1k Aug 24, 2021
Roman Beskrovnyi 167 Sep 8, 2021
Java interface to OpenCV, FFmpeg, and more

JavaCV Commercial support: Introduction JavaCV uses wrappers from the JavaCPP Presets of commonly used libraries by researchers in the field of comput

Bytedeco 5.3k Sep 19, 2021
This project allows the exchange of files between your local disk and a D64 image (Commodore 64 image disk) . Ce projet permet l'échange de fichiers entre votre disque local et une image D64 (Image de disquette du Commodore 64).

DiskToolC64 Ce projet permet l'échange de fichiers entre votre disque local et une image D64 (Image de disquette du Commodore 64). Introduction Les fi

Eddy BRIERE 3 May 13, 2021
TwelveMonkeys ImageIO: Additional plug-ins and extensions for Java's ImageIO

About TwelveMonkeys ImageIO is a collection of plugins and extensions for Java's ImageIO. These plugins extend the number of image file formats suppor

Harald Kuhr 1.3k Sep 17, 2021
Diagrams as code is a term used for storing the source of a diagram image as a text file.

Diagrams as code Diagrams as code is a term used for storing the source of a diagram image as a text file. Examples are architecture diagrams, or diag

null 18 Sep 10, 2021
Thumbnailator - a thumbnail generation library for Java

March 11, 2021: Thumbnailator 0.4.14 has been released! See Changes for details. Thumbnailator is now available through Maven! What is Thumbnailator?

Chris Kroells 3.8k Sep 17, 2021
ZXing ("Zebra Crossing") barcode scanning library for Java, Android

Project in Maintenance Mode Only The project is in maintenance mode, meaning, changes are driven by contributed patches. Only bug fixes and minor enha

ZXing Project 28.4k Sep 13, 2021
Custom Image Server for use with ShareX

rImageServer How to use: Normal Instalation: Download .jar Start: javar -jar [filename].jar Edit: imageserver.propierties Check if web works -> Go to

Ryzeon 13 Aug 27, 2021
Java JNA wrapper for Tesseract OCR API

Tess4J A Java JNA wrapper for Tesseract OCR API. Tess4J is released and distributed under the Apache License, v2.0. Features The library provides opti

Quan Nguyen 1k Sep 16, 2021
必应每日超清壁纸(4K)

Bing Wallpaper Today: Lençóis Maranhenses National Park in the state of Maranhão, Brazil (© WIN-Initiative/Getty Images) 2021-04-03 download 4k 2021-0

null 210 Sep 13, 2021
Pw0 Framewrok - magical android pentest app 🔮! Pixie Dust, Handshakes, Deauth, Nmap, Port scanner and more!

Pw0 Framework Pw0 Framewrok - magical android pentest app ?? ! Features: Pixie Dust Handshakes Deauth Nmap Port scanner and more! Version: 0.2 Beta Au

Huntmix 12 Sep 1, 2021
Open source Picture to text, text to Picture app

Pic SMS App Pic SMS is a free open source app. With Pic SMS, you can: convert pictures into text parts and send as SMS convert text parts into a pictu

Kaung Khant Kyaw 15 Sep 14, 2021
Anthos Edge Use Cases for bringing apps and computation closer to the location where the action is, to improve response times and save bandwidth.

Anthos Bare Metal Edge Use Cases Edge computing is a distributed computing paradigm that brings computation and data storage closer to the location wh

Google Cloud Platform 3 Sep 15, 2021
Traditional roguelike game with pixel-art graphics and simple interface

Traditional roguelike game with pixel-art graphics and simple interface

Evan Debenham 1.4k Sep 10, 2021