Release notes

Release 18.17

Release date: Aug 15, 2015
Major Changes in this Release:
New Features:
   - More clustering tools:
      - Added bottom_up_cluster() and find_clusters_using_angular_kmeans()
      - Added a --cluster option to the imglab tool.  This lets you cluster
        objects into groups of similar appearance/pose.
   - Improved the shape_predictor.  In particular, it can now be learned from
     datasets where some landmarks are missing.  The shape_predictor also now
     outputs a sparse feature vector that encodes which leafs are used on each
     tree to make a prediction.
Non-Backwards Compatible Changes:
   - extract_highdim_face_lbp_descriptors() produces slightly different output.

Bug fixes:
   - Fixed a minor bug in extract_highdim_face_lbp_descriptors() which was
     pointed out by Yan Xu. One of the face locations was mistakenly used twice
     while another was skipped. This change breaks backwards compatibility with
     the previous feature extraction output but should slightly improve
     accuracy of classifiers trained using these features.
   - Fixed jet() and heatmap() so they work on empty images.
   - The SQLite transaction object did not function correctly when compiled 
     in a C++11 program.  Since its destructor can throw, an exception
     specification needed to be added indicating that this was possible since
     destructors are now noexcept by default in C++11.
   - Fixed a bug pointed out by Ernesto Tapia that could cause matrix
     expressions that involve sub matrix views (e.g. colm) to produce the wrong
     results when the BLAS bindings were enabled.
   - Added an if to avoid a possible division by zero inside spectral_cluster().
   - Fixed a bug in parse_xml(). It failed to check if the given input stream
     was valid before trying to parse it.


Release 18.16

Release date: Jun 3, 2015
Major Changes in this Release:
New Features:
   - Added a linear model predictive control solver.  See the mpc_ex.cpp example
     program for details.
   - Thanks to Patrick Snape, the correlation_tracker can now be used from Python.
Non-Backwards Compatible Changes:
   - The camera_transform's second operator() method now takes 3 arguments
     instead of 2.  This is to allow it to output the z distance in addition to

Bug fixes:
   - Fixed a bug in the eigenvalue_decomposition which could occur when a
     symmetric matrix was used along with the LAPACK bindings.
   - Fixed a bug where the last column of data in a file wasn't loaded on some
     OS X machines when load_libsvm_formatted_data() was called.

   - Added a hard iteration limit to a number of the SVM solvers.
   - Adrian Rosebrock graciously setup an OS X machine for dlib testing, which
     resulted in improved CMake python scripts on OS X machines.
   - Improved the way overlapping points are rendered by the perspective_window.

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
      - 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
   - 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.

   - 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.

   - 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
   - Disabled all bindings to FFTW because FFTW isn't threadsafe.

   - 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.

   - 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 This
     has been fixed.


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
   - 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

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().

   - 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.


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
   - 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()

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

Old Release Notes