The Library

- Algorithms
- API Wrappers
- Bayesian Nets
- Compression
- Containers
- Graph Tools
- Image Processing
- Linear Algebra
- Machine Learning
- Metaprogramming
- Miscellaneous
- Networking
- Optimization
- Parsing

Help/Info

- Examples: C++
  - 3D_Point_Cloud
  - Assignment_Learning
  - Base64_Encoder
  - Bayesian_Network
  - Bayesian_Network_From_Disk
  - Bayesian_Network_GUI
  - Bridge
  - BSP
  - C-Support_Vector_Machine
  - Cmd_Line_Parser
  - Compress_Stream
  - Config_File_Reader
  - Custom_Trainers
  - Directory_Navigation
  - Empirical_Kernel_Map
  - Face_Detection
  - Face_Landmark_Detection
  - FHOG_Feature_Extraction
  - FHOG_Object_Detection
  - Graph_Labeling
  - GUI
  - Hough_Transform
  - HTTP_Server
  - Image
  - IO Socket Streams
  - IO Streams Server
  - Kernel_Centroid
  - Kernel_K-Means_Clustering
  - Kernel_Ridge_Regression
  - Kernel_RLS_Filtering
  - Kernel_RLS_Regression
  - KRR_Classification
  - Learning_to_Track
  - Linear_Assignment_Problems
  - Linear_Manifold_Regularizer
  - Logger
  - Logger_Advanced
  - Logger_Custom_Output
  - Matrix
  - Matrix_Expressions
  - Member_Function_Pointer
  - Model_Selection
  - Multiclass_Classification
  - Multithreaded_Object
  - Neural_Network
  - Non-Linear Least Squares
  - Nu-Support_Vector_Machine
  - Numerical_Integration
  - Object_Detector
  - Object_Detector_Advanced
  - One_Class_Classifiers
  - Online_SVM
  - Optimization
  - Parallel_For_Loops
  - Pipe
  - Pipe_2
  - Quantum_Computing
  - Queue
  - Rank_Features
  - Relevance_Vector_Classification
  - Relevance_Vector_Regression
  - Running_Stats
  - Sequence_Labeling
  - Sequence_Segmentation
  - Sockets
  - Sockstreambuf
  - Sparse_Vectors
  - SQLite
  - Std_C++_Allocator
  - Structural_Support_Vector_Machines
  - Support_Vector_Regression
  - SURF
  - SVM-Rank
  - Threaded_Object
  - Threads
  - Thread_Function
  - Thread_Pool
  - Timer
  - Train_Object_Detector
  - Train_Shape_Predictor
  - Using_Custom_Kernels
  - Video_Object_Tracking
  - Webcam_Face_Pose_Estimation
  - XML_Parser
- Examples: Python
  - Face_Detector
  - Face_Landmark_Detection
  - find_candidate_object_locations
  - Linear_Assignment_Problems
  - Sequence_Segmenter
  - Structural_Support_Vector_Machines
  - SVM-Rank
  - Train_Object_Detector
  - Train_Shape_Predictor
- FAQ
- Home
- How to compile
- How to contribute
- Index
- Introduction
- License
- Python API
- Suggested Books

Current Release

- Change Log
- Release Notes
- Version: 18.15

Last Modified: Apr 29, 2015

# Release notes

# Release 18.15

Release date: Apr 29, 2015
Major Changes in this Release:

    New Features:
       - Added a number of tools for working with 3D data:
          - Added the perspective_window which is a tool for displaying 3D point clouds.
          - Added camera_transform.  It performs the 3D to 2D mapping needed to visualize 3D
            data.
          - Added point_transform_affine3d as well as functions for creating such transforms:
            rotate_around_x(), rotate_around_y(), rotate_around_z(), and translate_point().
       - Added draw_solid_circle() for drawing on images.
       - Added get_best_hough_point() to the hough_transform.
       - Thanks to Jack Culpepper, the python API for object detection now outputs detection
         confidences.
       - Added lspi, an implementation of the least-squares policy iteration algorithm.

    Non-Backwards Compatible Changes:
       - The shape_predictor and shape_predictor_trainer had a non-optimal behavior when used
         with objects that have non-square bounding boxes. This has been fixed but will cause
         models that were trained with the previous version of dlib to not work as accurately if
         they used non-square boxes. So you might have to retrain your models when updating dlib.

    Bug fixes:
       - Fixed a bug which prevented add_image_rotations() from compiling.

    Other:
       - The imglab tool now allows the user to click and drag annotations around by holding
         shift and right clicking.

# Release 18.14

Release date: Mar 01, 2015
Major Changes in this Release:

    New Features:
       - Added spectral_cluster()
       - Added sub_image() and sub_image_proxy
       - Added set_all_logging_headers()

    Non-Backwards Compatible Changes:

    Bug fixes:
       - Fixed a bug that caused the correlation_tracker to erroneously trigger an assert when
         run in debug mode.

    Other:
       - Improved the usability of the new drectanle object.
       - Optimized extract_fhog_features() for the case where cell_size==1. This makes it about
         4x faster in that case.
       - Made it so you can compose point transform objects via operator *.

# Release 18.13

Release date: Feb 03, 2015
Major Changes in this Release:

    New Features:
       - Added the correlation_tracker object
       - Added the option to force the last weight to 1 to structural_assignment_trainer.
       - Added max_point_interpolated()
       - Added the drectangle object
       - New Python Tools:
          - Patrick Snape contributed a Python binding for the face landmarking tool and
            the general purpose shape prediction/training tools.
          - Vinh Khuc contributed a Python binding for find_candidate_object_locations(),
            dlib's implementation of the selective search object location proposal method.

    Non-Backwards Compatible Changes:

    Bug fixes:
       - Fixed a bug in extract_image_chips() and get_mapping_to_chip() that caused
         incorrect outputs when the requested chip stretched the image unevenly
         vertically or horizontally.
       - Made CMake check that libpng and libjpeg actually contain the link symbols
         they are supposed to since, on some systems, these libraries aren't
         installed correctly and will cause linker errors if used.
       - Fixed assign_border_pixels(img, rect) so that it correctly zeros an image
         when an empty rectangle is supplied. Previously, it did nothing to the
         image in this case.
       - Fixed compute_lda_transform() so it works properly when the class
         covariance matrices are singular even after performing PCA.
       - Fixed a bug in find_similarity_transform(). When given just two points as
         inputs it would sometimes produce a reflection rather than a similarity
         transform.
       - Disabled all bindings to FFTW because FFTW isn't threadsafe.

    Other:
       - Added an example program for dlib's SQLite API and made a few minor
         usability improvements to the API as well.

# Release 18.12

Release date: Dec 20, 2014
Major Changes in this Release:

    New Features:
       - Upgraded fft() and ifft() to support 2D matrices.
       - Added hough_transform
       - Added skeleton() for finding the skeletonization of a binary image.
       - Added distance_to_line(), clip_line_to_rectangle(), min_point(), and max_point().
       - Added a simple API for calling C++ from MATLAB.

    Non-Backwards Compatible Changes:

    Bug fixes:
       - Fixed a compile time error that could happen when calling fft() for
         certain input types.
       - Fixed a compile time error that prevented auto_threshold_image() from
         being used.
       - Fixed name clashes with new version of Boost.
       - Changed Python pickling code so it works with Python 3.
       - Fixed CMake compile time error related to finding fftw.

    Other:
       - Made extract_image_chips() much faster when extracting unscaled image chips.

# Release 18.11

Release date: Nov 13, 2014
Major Changes in this Release:

    New Features:
       - Added save_jpeg()
       - Added the option to use an identity matrix prior to vector_normalizer_frobmetric.
       - Made the extract_image_chips() routine more flexible, in particular: Added
         get_mapping_to_chip(), get_face_chip_details(), map_det_to_chip(), and also
         upgraded chip_details so you can specify a chip extraction by a bunch of
         point correspondences between the chip and the original image.
       - Added a set of local-binary-pattern based feature extractors:
         make_uniform_lbp_image(), extract_histogram_descriptors(),
         extract_uniform_lbp_descriptors(), and extract_highdim_face_lbp_descriptors()
       - Added compute_lda_transform()
       - Added equal_error_rate()
       - Added cast_to() to the type_safe_union. This allows you to get the
         contents of a const type_safe_union.

    Non-Backwards Compatible Changes:

    Bug fixes:
       - Changed noncopyable.h to avoid a name clash with boost 1.56
       - On some platforms hostname_to_ip() would erroneously return 0.0.0.0. This
         has been fixed.

    Other:

# Release 18.10

Release date: Aug 28, 2014
Major Changes in this Release:

    New Features:
       - Added find_similarity_transform()
       - Added the ability to upgrade a auto_mutex_readonly from a readonly lock to a write
         lock.
       - Added an implementation of the paper "One Millisecond Face Alignment with an Ensemble
         of Regression Trees" by Vahid Kazemi and Josephine Sullivan which appeared in this
         year's CVPR conference.  Therefore, dlib now includes tools for learning shape models
         and also comes with a state-of-the-art face landmark locator.  See the
         face_landmark_detection_ex.cpp and train_shape_predictor_ex.cpp example programs for
         an introduction.

    Non-Backwards Compatible Changes:
       - Made the interface to all the image processing routines more generic.  In particular,
         it is now easier to use arbitrary image types with dlib.  The new generic image
         interface is defined in dlib/image_processing/generic_image.h and simply consists of
         seven user defined global functions and a traits template.  Any user code that was
         using array2d objects to represent images will still work.  However, if you had been
         using your own custom image object you will need to provide implementations of the
         seven functions.  Instructions for how to do this are in
         dlib/image_processing/generic_image.h.

    Bug fixes:
       - Changed the murmur hash implementation to avoid any possibility of strict aliasing
         violations in user code, even when things get inlined in unfavorable ways.
       - Fixed a color space handling bug in resize_image() that caused bad looking outputs in
         some cases.
       - If "cmake" was a substring of the full path to your source code folder then the cmake
         scripts would fail. This has been fixed.
       - Fixed a compile time error that could occur when using find_max_single_variable().

    Other:
       - load_image() now uses the internal file header information to detect the
         image format rather than looking at the file extension.
       - Renamed unit test program to dtest avoid warnings from CMake.
       - cross_validate_trainer() and cross_validate_trainer_threaded() no loner make copies
         of the training data.  This significantly reduces their RAM usage for large datasets.
       - Changed the serialization code for C-strings so that they don't save the null
         terminator byte. This makes their serialization format the same as the format for
         std::string.  The code should still be able to read all previously serialized data
         correctly, so the change is backwards compatible with previous versions of dlib.
       - Changed the evaluate_detectors() routine so that it applies non-max suppression to
         each detector individually. This way one detector doesn't stomp on the output of
         another detector.
       - Made the version of draw_line() that draws onto a regular image use alpha blending
         for drawing diagonal lines.

# Release 18.9

Release date: Jun 16, 2014
Major Changes in this Release:

    New Features:

    Non-Backwards Compatible Changes:

    Bug fixes:
       - The new simplified serialization API that works like serialize("filename")<<object
         was not opening files in binary mode and therefore didn't work properly on Windows.
         This has been fixed.

    Other:

# Release 18.8

Release date: Jun 02, 2014
Major Changes in this Release:

    New Features:
       - Added the ability to set a previously trained function as a prior to the
         svm_multiclass_linear_trainer, svm_c_linear_trainer, and svm_rank_trainer
         objects.
       - Added a user settable loss to the structural_assignment_trainer and
         structural_track_association_trainer objects.
       - Added evaluate_detectors(), a function for efficiently running multiple fHOG
         based object detectors.
       - Added the new split_on_first() and split_on_last() string manipulation functions.
       - Added locally_change_current_dir, a RAII tool for switching between directories.
       - You can now make a 1x1 matrix containing a single value by calling mat() on a single
         scalar value.
       - The point transform functions and frobmetric_training_sample are now serializable.
       - Added a simplified operator << and >> based syntax for serializing to and
         from files.  So now you can serialize to a file using a syntax of:
           serialize("myfile.dat") << myobject << another_object;
         and then load those objects from disk via:
           deserialize("myfile.dat") >> myobject >> another_object;
         An arbitrary number of objects can be serialized or deserialized by
         chaining the << and >> operators.

    Non-Backwards Compatible Changes:

    Bug fixes:
       - Fixed a bug pointed out by Daniel Girardeau-Montaut. The covariance()
         function didn't work on non-double valued matrices.
       - Fixed a bug in the backtracking_line_search() function pointed out by
         Ping-Chang Shih. The function ignored the max_iter parameter.
       - Fixed a compiler error encountered when using clang 3.4 on Mac OS X 10.9.
         Thanks to Martin Fergie for reporting this problem.
       - Fixed a potential divide by zero in draw_fhog()

    Other:
       - Added an example program showing how to set a custom logger output hook.
       - Made linear decision_functions which use sparse vectors much faster.

# Release 18.7

Release date: Apr 09, 2014
Major Changes in this Release:

    New Features:
       - Added a Python API for working with fHOG based object detectors.  See the
         new python example programs train_object_detector.py and face_detector.py for
         more details.
       - Added the ability to use a user supplied fHOG style feature extractor with
         the scan_fhog_pyramid object.  So now you can define your own version of HOG
         for use with these tools.
       - The oca solver now supports taking a user supplied prior vector. That is,
         it lets you use a regularizer like ||w-prior||^2 instead of the usual
         ||w||^2 regularizer.
       - Added the structural_track_association_trainer object.  It is a structural
         SVM tool for creating multi-target tracking algorithms.  See the
         learning_to_track_ex.cpp example program for an introduction.
       - Added the following minor utility functions: nearest_center(),
         add_image_rotations(), set_aspect_ratio(), and tile_images().

    Non-Backwards Compatible Changes:
       - Refactored the load_image_dataset() routines so they are easier to use and
         more flexible. This introduces a slight backwards incompatibility in that
         the version that loads full_object_detection objects now returns an ignore
         rectangle set instead of a parts name list.  Other than that the changes
         are backwards compatible with previous versions of dlib.
       - Added a bias term to the assignment_function's model so the user doesn't
         need to remember, or even understand, that they should add it themselves.
         However, this change breaks backwards compatibility with the previous
         serialization format for assignment_function objects.

    Bug fixes:
       - Fixed a number of compile time errors that could occur in rare cases.
       - The stopping condition for the svr_linear_trainer was too tight, causing it
         to take an excessive amount of time to converge in some cases.
       - Disabled use of XIM for X11 windowing since it makes programs hang on some
         systems. However, this means the wide character input methods won't work on
         X11 systems anymore.
       - Fixed a bug in randomize_samples() which caused the outputs to be not as
         random as they should be.
       - Fixed dlib's CMakeLists.txt file so that the "use FFTW" option actually
         causes the build to use FFTW.
       - Fixed a compile time error that triggered when trying to link with FFTW.
       - mat() did not work correctly when used with std::vector<bool> objects.
         This has been fixed.

    Other:

# Release 18.6

Release date: Feb 03, 2014
Major Changes in this Release:

    New Features:
       - Object Detection Tools:
          - Added scan_fhog_pyramid, a tool for creating Histogram of Oriented Gradient (HOG)
            based object detectors.
          - Added get_frontal_face_detector(), a HOG based face detector.
          - Added an option to include "ignore/don't care" truth boxes to the
            structural_object_detection_trainer.  This allows a user to tell the trainer that
            they don't care if certain objects are detected or not detected.
       - Image Processing Tools:
          - Added extract_image_chips()
          - Added a version of draw_rectangle() for drawing on images.
          - The spatial filtering routines now support even sized filters.
          - Added flip_image_dataset_left_right(), upsample_image_dataset(), and
            rotate_image_dataset().
       - Machine Learning Tools:
          - Added a nuclear norm regularization option to the structural SVM solver.
          - Added the option to learn only non-negative weights to the
            svm_multiclass_linear_trainer.
       - Speed Improvements:
          - The svm_multiclass_linear_trainer, one_vs_one_trainer, and one_vs_all_trainer
            objects are now multithreaded.  This also means you have to #include
            dlib/svm_threaded.h instead of dlib/svm.h to use these tools.
          - A number of image processing tools can now optionally use SSE and AVX instructions
            and are therefore considerably faster.  In particular, the following tools have been
            accelerated: extract_fhog_features, resize_image, pyramid_down, pyramid_up,
            spatially_filter_image_separable, and spatially_filter_image.
       - Added an inv() routine that inverts point transformation functions.
       - Added a sign() routine for matrix objects.

    Non-Backwards Compatible Changes:
       - The spatial image filtering functions have the following changes:
          - They no longer zero the image borders when you set the add_to parameter to true.
          - The spatially_filter_image_separable_down() routine now only allows grayscale
            output images.
       - Changed the default parameters of the test_box_overlap object. Now it defaults to
         using exactly the PASCAL VOC match criterion.
       - To use the svm_multiclass_linear_trainer, one_vs_one_trainer, or one_vs_all_trainer
         objects you now have to #include dlib/svm_threaded.h instead of dlib/svm.h.
       - pyramid_up() no longer has a levels option.

    Bug fixes:
       - Fixed a compile time bug that could occur when wide character strings were
         serialized.
       - Fixed a compile time bug occurring in gcc 4.7.1 on SUSE Linux.  Thanks to Volker
         Härtel for finding this.
       - Fixed compile time errors that occurred when using gcc on cygwin.
       - Fixed a compile time bug that could occur when serializing mlp objects.
       - Fixed a bug in the bigint object that caused division to sometimes produce incorrect
         results.
       - Fixed a bug which sometimes caused load_image_dataset() to erroneously report that
         the dataset file could not be found.
       - Fixed a bug in the structural_object_detection_trainer that caused it to erroneously
         throw a impossible_labeling_error exception in certain rare cases.
       - Updated find_max_factor_graph_nmplp() to use the improved version of the algorithm
         from the 2011 paper Introduction to dual decomposition for inference by David Sontag,
         Amir Globerson, and Tommi Jaakkola.  The original algorithm presented in their 2008
         paper had an error that negatively affected its convergence.  Thanks to James Gunning
         for pointing this out.

    Other:
       - Fixed many compiler warnings in gcc 4.8.
       - Made many of the mat() converters bind the resulting matrix expressions into BLAS
         functions.
       - libpng and libjpeg are now included in the dlib/external folder to enable easy static
         linking to these libraries on platforms that typically don't have them (e.g. Windows).
         Moreover, dlib's cmake files will automatically perform this static linking when no
         copy of these libraries is found on the system.

Old Release Notes