The Library
Help/Info
Current Release
Sourceforge









Get dlib C++ Library at SourceForge.net. Fast, secure and Free Open Source software downloads


Last Modified:
Mar 25, 2013

Release notes

Release 18.1

Release date: Mar 25, 2013
Major Changes in this Release:
New Features:
   - Added svd_fast(), a routine for computing a singular value decomposition of very 
     large matrices.
   - Added cca(), a routine for doing canonical correlation analysis on very large 
     and high-dimensional datasets.
   - Added tools for creating parallel for loops, see parallel_for().
   - Added some features to the image display widgets to let the user easily
     get information about where the user is clicking.  This is the new 
     get_next_double_click() routine.
   - Added an operator>> for matrix objects which allows you to read in ASCII
     matrices using the format used by operator<<.
   - Added serialization support for std::vector<bool>.
   - Added the following new minor objects and routines: average_precision(), 
     make_sparse_vector_inplace(), orthogonalize(), count_bits(), draw_surf_points(),
     hamming_distance(), cosine_distance, and negative_dot_product_distance.

Non-Backwards Compatible Changes:
   - Changed ranking evaluation functions to return the mean average precision
     in addition to just raw ranking accuracy. This changes their return types
     from double to matrix<double,1,2>.
   - Generalized segment_image() so it works on any pixel type or array of
     vectors.  I also changed its interface slightly.  In particular, I removed
     the min_diff parameter and replaced it with an explicit min_size parameter.
   - Changed how the SURF descriptor is computed slightly to improve its
     accuracy.  The interface to the user has not been changed, however, the
     number and position of detected SURF points might be different than in
     previous dlib versions.

Bug fixes:
   - Fixed an endianness bug in the PNG I/O functions which occurred when 16bit
     grayscale PNGs were used. 
   - Fixed a bug which could potentially occur when empty std::vector<char> or
     std::vector<unsigned char> were serialized.
   - There was a bug in the version of draw_line() that draws directly onto an
     array2d type image (not the one that draws onto a GUI canvas object). The
     bug triggered whenever a perfectly horizontal or vertical line that extended
     outside the image was drawn. This has been fixed.
   - Fixed a bug in the Windows implementation of the signaler object, which
     was found by Isaac Peterson. The bug caused the program to deadlock if
     signal() or broadcast() was called at exactly the same time a
     wait_or_timeout() function timed out.
   - Fixed a bug in the image_window and image_display GUI tools which caused
     them to not redraw overlay lines correctly in certain cases involving
     non-default zoom levels.
   - Switched randomly_color_image() to use the non-pointer based version of
     murmur_hash3() to avoid violation of the strict aliasing rule. In
     particular, the previous version didn't work correctly in gcc 4.7.2 when
     optimizations were enabled.
   - Visual Studio 2012's iostreams library has a bug which caused the
     iosockstream to crash on use.  This version of dlib has been changed to
     avoid triggering this bug.

Other:
   - Refactored the Platt scaling code a little. Now there is a function,
     learn_platt_scaling(), that allows you to directly call the Platt scaling
     code without supplying a trainer object.
   - Optimized the oca and structural SVM solvers.  They are now a little bit faster 
     than in previous dlib releases.


Release 18.0

Release date: Feb 04, 2013
Major Changes in this Release:
New Features:
   - Machine Learning
      - Added svm_rank_trainer, an optimized implementation of the SVM-Rank algorithm.
      - Added rank_unlabeled_training_samples(), an implementation of the SVM Active
        Learning algorithm.
      - Added svm_c_linear_dcd_trainer, a warm-startable SVM solver using the dual 
        coordinate descent algorithm used by liblinear.
      - Added the ability to force the last element of a weight vector to 1 to the
        following objects: svm_c_linear_trainer, svm_c_linear_dcd_trainer,
        svm_rank_trainer, and oca.
      - Added the ability to learn non-negative weight vectors to the
        structural_sequence_labeling_trainer object.
   - Networking
      - Added an iosockstream object.
      - Added a method to the server object that lets a user set the graceful close timeout
        time to something other than the default of 500ms.
   - Linear Algebra
      - Added the gaussian_randm() function.
      - Added the find_affine_transform() function.
      - Added the mat() function.  It combines the array_to_matrix(), vector_to_matrix(),
        pointer_to_column_vector(), and pointer_to_matrix() methods all into one convenient
        interface.   mat() also works for Armadillo and Eigen matrices.
      - Added STL style begin() and end() methods to matrix and matrix_exp.
      - Added an overload of sparse_matrix_vector_multiply() that multiplies a dense matrix
        with a sparse vector.
      - Made toMat() work with the matrix object in addition to array2d style images.
   - Graphical User Interface Tools
      - Added draw_solid_convex_polygon().
      - Added an overload of draw_image() that's useful for drawing images and doing
        interpolation at the same time.
      - Added the on_view_changed() callback to zoomable_region and scrollable_region widgets.
   - Added parse_trees_to_string() and parse_trees_to_string_tagged().
   - Added lambda function support to the timeout object.
   - Added the vectorstream object.
   - Added the parse_xml() routines.
   - Added a group name feature to the command line parser.  Now it is possible to make
     print_options() print related options in named groups. 
   - Added the following new hashing functions: murmur_hash3_128bit_3(),
     murmur_hash3_2(), murmur_hash3_3(), uniform_random_hash(), gaussian_random_hash() 
     as well as hash() overloads for uint32, uint64, and std::pair.

Non-Backwards Compatible Changes:
   - Made the svm_c_linear_trainer use the risk gap to decide when to stop.  This was done
     because it is how all the other OCA based SVM tools in dlib decide when to stop.  
     However, it might cause the outputs to be slightly different in this version of dlib.  
   - It is now illegal to call unlock() on a mutex when the mutex is not owned by the
     calling thread.  The most likely reason for doing this was to unlock early in an area
     locked by an auto_mutex.  Old code that does this can be fixed by calling auto_mutex's
     unlock() function instead.  
   - Removed the structural_assignment_trainer::learns_nonnegative_weights() routine 
     and moved its functionality into the feature extraction interface used by this object. 

Bug fixes:
   - Fixed a bug in find_max_factor_graph_nmplp() which caused it to not work properly on
     some compilers.
   - Fixed a bug pointed out by Joel Nelson in the version of md5() that took an istream.
     The bug caused the function to crash on strings longer than 56 characters.

Other:
   - dlib now has an excellent new logo thanks to Yasser Asmi. 
   - Added a new documentation page for the various linear algebra tools.
   - The following objects were turned into single implementation components:
     sockstreambuf, timeout, member_function_pointer, xml_parser, linker,
     bound_function_pointer, and timer.


Release 17.49

Release date: Dec 18, 2012
Major Changes in this Release:
New Features:
   - Machine Learning
      - Added the ability to learn non-negative weight vectors to the
        structural_assignment_trainer object.
      - Added two new graph clustering algorithms: Chinese Whispers and Newman's modularity
        clustering.
      - Added a number of new graph manipulation tools: sparse_matrix_vector_multiply(),
        is_ordered_by_index(), find_neighbor_ranges(), convert_unordered_to_ordered(),
        remove_duplicate_edges(), and the ordered_sample_pair object.
   - Networking
      - Added a set of tools for creating applications using the Bulk Synchronous Parallel
        computing model.  See the new bsp_ex.cpp example program for an introduction.
      - Added a routine that lets a user disable Nagle's algorithm on a TCP connection.
      - Added an asynchronous start routine to the server object.  This is the new
        start_async() method.
      - Added the network_address object.
      - Added connect_to() to the bridge interface.
   - Added find_max_parse_cky(), a method implementing the well known CKY algorithm for
     parsing probabilistic context free grammars.
   - Added the ability to label parts of objects with the mouse to the image_display
     widget.
   - Added the ability to put overlay circles and full_object_detections into the
     image_window widget.
   - Added a stddev() for matrix objects.
   - Added operator+() for running_stats and running_scalar_covariance.
   - Added an overload of murmur_hash3_128bit() that takes 4 integers instead of a block of
     memory.
   - Added rand::get_random_64bit_number().

Non-Backwards Compatible Changes:
   - Changed the image_dataset_metadata XML reading tools to use a map of strings to points
     to represent object parts. This change removes the old head point from a box since
     this information can now be represented in the parts map.
   - The syntax for passing order_by_distance and order_by_index to std::sort() is now
     slightly different since these functions are now templates.  However, this change
     allows them to work on any kind of sample_pair or ordered_sample_pair object.
   - The default distance value of a sample_pair is now initialized to 1 instead of
     infinity.

Bug fixes:
   - Added a patch, contributed by Martin Müllenhaupt, to fix a minor bug in the SQLite
     bindings.
   - Fixed a typo which would prevent code that called running_stats::max_n() from
     compiling.

Other:
   - Added a new documentation page for the various graph tools in dlib.
   - Added support for Visual Studio 2012.
   - Switched the sample_pair object to use double to store its distance value instead of
     float.
   - Added William Sobel's patch to the web server that improves its flexibility and
     security.
   - Changed the server object so you don't have to use the server::kernel_1a syntax to
     declare it anymore.  Now you just say server, server_iostream, or server_http
     depending on which one you want.
   - Changed the cmd_line_parser so you don't have to use the ::kernel_1a syntax anymore.
     Now it is declared like a normal single implementation object.
   - Set the default max number of connections a server will accept at a time to 1000
     rather than the previous default of infinity.


Release 17.48

Release date: Oct 18, 2012
Major Changes in this Release:
New Features:
  - Added more overloads of find_max_factor_graph_potts() to make applying it 
    over a Markov random field of image pixels really simple.
  - Added overloads of serialize()/deserialize() so that they can serialize
    Google protocol buffer objects.
  - Image Processing:
      - Added find_points_above_thresh()
      - Added max_filter() 
      - Added scan_image_movable_parts()
      - Added sum_filter_assign()
      - Added the full_object_detection object.
      - Added the ability to model objects with movable parts into the
        scan_image_pyramid object.  This update also includes all the needed tools
        to train movable part models using the structural_object_detection_trainer.
  - Machine Learning:
      - Added a per node loss option to the structural_svm_graph_labeling_problem's
        interface.
      - Added Emanuele Cesena's implementation of Sammon's nonlinear dimensionality
        reduction method.

Non-Backwards Compatible Changes:
  - To support movable part models, the serialization format of scan_image_pyramid
    objects was modified.  This breaks backwards compatibility with the previous
    format for scan_image_pyramid objects as well as object_detector instances
    that use the scan_image_pyramid.

Bug fixes:
  - Fixed a bug in auto_threshold_image() that caused it to give bad outputs 
    when used with very large images.

Other:
  - Updated find_max_factor_graph_potts() to correctly say you can use infinite
    weights for the factor_value_disagreement() values since the code actually
    supports this.
  - Made integer serialization about 3 times faster.


Release 17.47

Release date: Jun 15, 2012
Major Changes in this Release:
New Features:
   - Improvements to linear algebra tools:
      - Added the lowerbound() and upperbound() routines for thresholding dense 
        matrices.
      - Refined the tools for working with sparse vectors.  In particular, 
        the following functions were added: min(), max(), make_sparse_vector(),
        add(), and subtract().  A number of existing routines were also updated
        to work with both sparse and dense vectors so that templated code which 
        works on both vector types is simpler to write.
      - Added the += and -= operators to the set_subm(), set_rowm(), and set_colm()
        tools for operating on submatrices.
   - Optimization:
      - Added a new quadratic program solver, solve_qp4_using_smo().  This new
        solver is useful for solving quadratic programs corresponding to
        non-negative constrained primal quadratic programs.
      - Added an optional non-negativity constraint to the oca optimizer.
      - Added the min_cut object.  It provides a method to find the minimum weight 
        cut on a graph.  
      - Added tools for finding the maximum probability assignment in a Potts 
        style Markov random field.  See the find_max_factor_graph_potts() routine 
        for details.
   - Machine Learning:
      - Added structural SVM tools for learning the parameters of a Potts style
        Markov random field.  See the structural_graph_labeling_trainer and
        graph_labeler objects as well as their associated example program for 
        details.
      - Added the ability to learn only non-negative weights to the 
        svm_c_linear_trainer.
   - Improved Integration with OpenCV: 
      - Updated the cv_image object so it works with cv::Mat as well as IplImage.
      - Added the toMat() routine for converting from a dlib style image to an
        OpenCV cv::Mat image.

Non-Backwards Compatible Changes:
   - Removed the dlib::sparse_vector namespace.  Everything from this namespace 
     was moved into the normal dlib:: namespace so that code which works with 
     both sparse and dense vectors is more cohesive.

Bug fixes:
   - Fixed a bug in find_max_factor_graph_viterbi() which sometimes occurred when 
     the model order was larger than the number of variables.
   - Fixed a bug which caused a compiler error if you tried to call dot() on two 
     1x1 matrices which were statically dimensioned.

Other:
   - Improved existing documentation: added pictures of the gui widgets, 
     added documentation of the dlib::bridge protocol, and other minor 
     usability improvements.

Release 17.46

Release date: Apr 11, 2012
Major Changes in this Release:
New Features:
   - Image Processing:
      - Added the option to make the features generated by poly_image rotationally 
        invariant. 
      - Added a set of routines for warping, scaling, and resizing images.
        See the new "Scaling and Rotating" section of the image processing
        documentation for details.
      - Added the heatmap() routine for converting an image into a heatmap.
   - Machine Learning
      - Updated the sequence labeling trainer to allow the user to set different 
        loss values for different labels.
      - Added the rls object.  It is an implementation of the linear recursive 
        least squares algorithm.
   - Added the get_option() routines which slightly simplify option parsing 
     from the command line and config files.
   - Added the 128bit version of Murmur hash.
   - Added the kalman_filter and rls_filter objects.  These are tools for 
     performing Kalman filtering and recursive least squares filtering.
   - Added the circular_buffer object. 

Non-Backwards Compatible Changes:
   - The poly_image generates slightly different features in this new release.
     Therefore, classifiers trained using the previous version will need to be
     retrained if they are switched to the new version of poly_image.
   - Changed the xcorr() functions so they take the complex conjugate of the right
     hand arguments if they are complex numbers.  This way they do a proper
     cross-correlation and also mirror the behavior of MATLAB.  However, this
     breaks backwards compatibility with the previous behavior of xcorr().
   - Previously, dlib included two versions of dlib::array.  However, to
     simplify the user interface, dlib now includes only the contiguous
     memory implementation of dlib::array.  This change should only affect
     you if you wrote code which assumed dlib::array::set_max_size() only
     allocated a small amount of RAM.  The new behavior is similar to the
     std::vector::reserve() routine.  That is, dlib::array::set_max_size()
     will allocate the requested amount of memory immediately.

Bug fixes:
   - Fixed a bug which caused certain matrix expressions to not compile
     when the BLAS bindings were enabled.  In particular, expressions which
     involved a 1x1 matrix sometimes didn't compile.

Other:
   - Made the matrix routines min(), max(), sum() and mean() work with 
     complex numbers. 
   - Turned the array object into a single implementation object.  Now arrays 
     can be created using the normal array<type> obj; syntax.  Additionally, 
     all extensions were merged into the array object. 
   - Added an example program which better documents how to create training
     data for the object detection tools as well as how this data can be used.
     See the train_object_detector.cpp example for details.


Release 17.45

Release date: Jan 29, 2012
Major Changes in this Release:
New Features:
   - Added tools for timing blocks of code
   - Machine Learning
      - Added a set of tools for learning to solve the assignment problem.
        See the structural_assignment_trainer and its associated example
        program for an introduction.
      - Added random projection based locality sensitive hashing tools.
      - Added tools to simplify the creation of scan_image_pyramid objects.  
        See the object_detector_ex.cpp example program for details.
   - Image Processing
      - Added sum_filter() and spatially_filter_image_separable_down()
      - New feature extractors: poly_image, nearest_neighbor_feature_image, and
        fine_hog_image
 
Non-Backwards Compatible Changes:
   - Changed the serialization format for rand objects.
   - Changed the order of arguments for the sequence_labeler's constructor.
   - Object Detection Changes
      - Some parts of the object detection tools have been refactored.  In particular, 
        the interfaces of the scan_image_pyramid and structural_object_detection_trainer 
        have been changed slightly to improve usability.
      - Made the test_box_overlap a little more flexible.  This change breaks
        backwards compatibility with the previous version though.
      - The hashed_feature_image object has been made more general.  It now 
        uses a user supplied hashing function rather than its own hashing 
        implementation.
      - Removed constness from the operator() member functions of the 
        object_detector.
   - Fixed improper normalization in the gaussian() functions.  The
     normalization constant was being computed incorrectly.
   - Sequence labeling feature extractors must now define a sequence_type
     typedef instead of sample_type.  This change allows the user to use any 
     type of sequence, not just std::vector objects.

Bug fixes:
   - Changed the add_probability() method of joint_probability_table so
     it does a saturating add rather than a normal add.  This ensures the
     probability value stays exactly <= 1.  Previously, floating point
     rounding error could cause it to be slightly above 1 and would therefore
     cause some asserts to misfire during debugging mode.
   - The object_detector had code in it which limited the number of outputs
     to 100 rectangles.  This has been removed.
   - Fixed improper normalization in the gaussian() functions.  The
     normalization constant was being computed incorrectly.

Other:
   - dlib::rand can now generate Gaussian random numbers.
   - The structural_object_detection_trainer will now automatically setup
     appropriate non-max suppression parameters if the user doesn't supply them. 
   - The structural_object_detection_trainer has been optimized and now runs
     significantly faster than in previous dlib releases.
   - The tools folder containing htmlify, imglab, and mltool is now included
     in the dlib release archive files.  Previously, these tools were only 
     available directly from source control.


Release 17.44

Release date: Nov 21, 2011
Major Changes in this Release:
New Features:
   - Machine Learning
      - Added the histogram intersection kernel for sparse and dense vectors.
      - Added a set of tools to allow a user to easily learn to do sequence
        labeling using dlib's structural SVM implementation.  See the new
        sequence_labeler object and its associated example program for an 
        introduction.
   - Image processing:  
      - Added segment_image()
      - Added randomly_color_image()
      - Added the border_enumerator
   - Added the disjoint_subsets object, it is an implementation of the 
     union-find algorithm/disjoint-set data structure.
   - Added new matrix routines: conv(), conv_same(), conv_valid(), xcorr(),
     xcorr_same(), xcorr_valid(), and flip().
 
Non-Backwards Compatible Changes:
   - Changed find_max_factor_graph_viterbi() so you can use run-time
     defined order and num_states parameters.

Bug fixes:
   - The last dlib release added a max_iterations parameter to the
     svm_c_linear_trainer and svm_c_ekm_trainer objects.  However,
     there was a bug which made them only do at most 16 iterations,
     which is too few to solve many problems.  This has been fixed.
   - Fixed a bug in is_const_type.  It didn't work for reference types.
   - Fixed a bug in the SQLite binding routine statement::get_column_as_text().  
     It didn't work correctly if the column contained a NULL.
   - Fixed a bug in find_max_factor_graph_viterbi() which occurred when a
     zero order model had negative factor values.

Other:


Release 17.43

Release date: Oct 21, 2011
Major Changes in this Release:
New Features:
   - Two new routines for performing MAP inference in factor graphs:
      - For chain-structured graphs: find_max_factor_graph_viterbi()
      - For general graphs:          find_max_factor_graph_nmplp()
   - Image Processing
      - Added more tools for creating image pyramids.  See pyramid_down_5_4, 
        pyramid_down_4_3, and pyramid_down_3_2.
      - Added more image filtering and morphology functions.
      - Added a set of tools for creating sliding window classifiers:
         - Added the scan_image() routine.  It is a tool for sliding a set of 
           rectangles over an image space and finding the locations where the sum 
           of pixels in the rectangles exceeds a threshold.  Also added
           scan_image_pyramid, which is a tool for running scan_image() over an 
           image pyramid.
         - Added the structural_object_detection_trainer.  This is a tool which 
           formulates the sliding window classifier learning problem as an
           instance of structural SVM learning.
         - Added a variety of supporting tools and two object detection example 
           programs.
   - Added the following functions for computing statistics on vectors:
     mean_sign_agreement(), correlation(), covariance(), r_squared(),
     and mean_squared_error()
   - Added a C++ wrapper for SQLite (see the new database and statement objects)
 
Non-Backwards Compatible Changes:
   - Changed the interface to the ridge regression trainer objects so that they 
     report the entire set of leave-one-out prediction values rather than a 
     summary statistic like mean squared error.
   - Changed the serialization routine for bgr_pixels to store the pixels in BGR 
     order rather than RGB.
   - Changed the interface for the spatially_filter_image() routine to take the 
     filter as a matrix rather than C-array.  Also, now it won't force signed pixel 
     values to 0 if they go negative. 
   - Changed the test_regression_function() and cross_validate_regression_trainer()
     routines so they return both the MSE and R-squared values rather than just the
     MSE.
   - Changed suppress_non_maximum_edges() to use the L2 norm instead of L1 norm
     for measuring the strength of an edge since this produces a slightly better
     result.

Bug fixes:
   - The image_display didn't display overlay rectangles quite right.  If you zoomed
     in you could see that some of the pixels which are inside the rectangle were
     outside the overlay.  Specifically, the right column and bottom row was outside
     the overlay rectangle.  This has been fixed.  Now all pixels which are supposed
     to be part of a rectangle are drawn as being inside the overlay rectangle.
   - Fixed a bug pointed out by Martin Müllenhaupt which caused the windows socket
     code to not compile when used with the mingw-cross-env project.
   - Fixed a bug in the png_loader.  If you loaded an image with an alpha channel 
     into something without an alpha channel there were uninitialized values being 
     alpha blended into the image.
   - Fixed a bug in the cpp_tokenizer that only shows up on newer versions of gcc.  
     It wasn't tokenizing double quoted strings right.
   - Fixed a bug in spatially_filter_image() which showed up when using non-square 
     filters.  The bug would cause the edges of the output image to be incorrect.
   - Fixed a bug in the matrix class.  Expressions of the form mat *= mat(0) would
     evaluate incorrectly because the *= operator took the right hand side by reference
     and thus experienced an aliasing problem.  The other op= operators had similar
     problems and have also been fixed.
   - Fixed a bug pointed out by Justin Solomon which could cause the svr_trainer and
     svm_c_trainer to produce incorrect results in certain unusual cases.  

Other:
   - Added a more complete set of methods for converting between image space and 
     the downsampled hog grid used by hog_image.  Now you can convert from image 
     to hog in addition to hog to image.
   - Made the integral_image more general by making it templated on the type of 
     scalar used to store the sums.


Release 17.42

Release date: Jun 24, 2011
Major Changes in this Release:
New Features:
   - Added the check_sub_option() method to the command line parser check
     object.
   - Added match_endings to the dir_nav utils.
   - Added a set_current_dir() function.
   - Added the distance_to_rect_edge() routine.
   - Added support for user drawn rectangle overlays and selectable overlays 
     to the image_display widget.
 
Non-Backwards Compatible Changes:

Bug fixes:
   - Fixed a bug in the image_display widget.  If you switched it between
     images of a different size while any kind of zoom was in effect
     it could cause a segmentation fault.

Other:




Old Release Notes