dlib C++ library Changelog

What's new in dlib C++ library 18.2

Jun 7, 2013
  • New Features:
  • Object Detection Tools:
  • Added another image scanning tool similar to scan_image_pyramid. This is the new scan_image_boxes object. It allows a user to easily specify an arbitrary set of object boxes which should be checked by an object detector rather than scanning a fixed sized window over the image as is done by the scan_image_pyramid tool. This allows more flexible scanning strategies. For example, it is now possible to use the selective search method implemented by the new find_candidate_object_locations() routine.
  • Added the binned_vector_feature_image.
  • Upgraded the object_detector so that you can use the adjust_threshold argument for all versions of the operator() method.
  • Added remove_unobtainable_rectangles()
  • Hashing Tools:
  • Added a set of new locality sensitive hashing functions meant for use with larger vectors and higher bit sizes than the current LSH tools.
  • These are the new hash_similar_angles_xxx objects.
  • Added find_k_nearest_neighbors_lsh() and hash_samples()
  • Added create_max_margin_projection_hash()
  • New Matrix Routines: linpiece(), fft(), and ifft()
  • Added numeric constants and additional statistics to the running_stats object.
  • Added the image_window::get_next_keypress() routine. This tool allows a
  • user to easily find out which keyboard key the user is pressing.
  • Non-Backwards Compatible Changes:
  • Changed the object_detector interface slightly. In particular, it no longer adds the adjust_threshold argument to the output scores.
  • The object detector testing functions now output mean average precision in addition to precision and recall.
  • Changed how dlib does serialization in a number of ways:
  • The running_stats and scan_image_pyramid objects have had their serialization format changed in a way that breaks backwards
  • compatibility. This means serialized versions of these objects can't be loaded by the new version of dlib.
  • Changed the format dlib uses when it serializes floating point values.
  • Previously, we used an ASCII based format. Dlib now uses a much more efficient binary format. However, the deserialization routines have been made backwards compatible with the previous format. So dlib can
  • still deserialize older data but older software won't be able to read the new format.
  • Changed the serialization formats for the matrix and array2d objects so that either object can be deserialized into the other. This was done in a way that is backwards compatible with previous versions of dlib. That is, we can still load data serialized by previous dlib versions. However, older versions of dlib can't load the new serialization format.
  • Bug fixes:
  • Fixed a bug in save_dng() that happened sometimes when saving images with unsigned char pixels.
  • The test_ranking_function() and cross_validate_ranking_trainer() routines
  • computed incorrect MAP scores when the learned function output a constant value for all samples. This has been fixed.
  • Other:
  • Gave load_image_dataset() the ability to skip images that don't have any ground truth boxes.
  • Changed average_precision() to use interpolated precision. So now it uses
  • the same metric as the one used by the Pascal VOC challenge.
  • Upgraded the dng image format so it can natively store floating point pixel types without any information loss.

New in dlib C++ library 18.1 (Jun 7, 2013)

  • 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

New in dlib C++ library 18.0 (Jun 7, 2013)

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

New in dlib C++ library 17.49 (Jun 7, 2013)

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

New in dlib C++ library 17.48 (Jun 7, 2013)

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

New in dlib C++ library 17.46 (Apr 12, 2012)

  • New Stuff:
  • Image Processing:
  • Added the option to make the features generated by the 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 rls_filter and kalman_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 obj; syntax. Additionally,
  • all extensions were merged into the array object.

New in dlib C++ library 17.45 (Feb 3, 2012)

  • New Stuff:
  • 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

New in dlib C++ library 17.44 (Nov 22, 2011)

  • New Stuff:
  • 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.

New in dlib C++ library 17.43 (Oct 22, 2011)

  • New Stuff:
  • 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.

New in dlib C++ library 17.42 (Jun 25, 2011)

  • New Stuff:
  • 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.
  • 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.

New in dlib C++ library 17.41 (Jun 13, 2011)

  • New Stuff:
  • You can now add tasks to a thread_pool by value, using the new
  • add_task_by_value() method.
  • Non-Backwards Compatible Changes:
  • Bug fixes:
  • Fixed a bug which caused multiply defined symbol errors during linking
  • if the PNG saving routine was #included.
  • Other:
  • Optimized the threaded and distributed structural svm solvers for the
  • case where there are many data samples and the separation oracle is
  • quick to evaluate.

New in dlib C++ library 17.40 (Jun 6, 2011)

  • New Stuff:
  • Added a function for saving to the PNG image format.
  • Added Austin Appleby's excellent MurmurHash3 hashing code and setup some
  • additional convenience functions. These functions are murmur_hash3() and
  • various overloads of hash().
  • Non-Backwards Compatible Changes:
  • Made get_pixel_intensity() more efficient. However, the value returned
  • is slightly different than it used to be for RGB pixel types.
  • Bug fixes:
  • Setup proper error handling for libpng in the png_loader. Now if the PNG
  • file is corrupted in the middle it won't just print a message and abort
  • the program.
  • Fixed a bug in assign_pixel_intensity() that happened when the target pixel
  • was an RGB pixel with an alpha channel.
  • Other:
  • Added a Frequently Asked Questions page
  • Changed the array2d object so you don't have to say array2d::kernel_1a
  • anymore to declare it. Now you just say array2d.

New in dlib C++ library 17.39 (May 23, 2011)

  • New Stuff:
  • Added tools for distributing the work involved in solving a structured
  • SVM problem over many computers and CPUs.
  • Added the bridge. It allows a dlib::pipe to be used for networked
  • communication.
  • Non-Backwards Compatible Changes:
  • Removed the DLIB_REVISION macro and replaced it with DLIB_MAJOR_VERSION and
  • DLIB_MINOR_VERSION.
  • Other:
  • dlib's version control system has switched from Subversion to Mercurial.

New in dlib C++ library 17.38 (May 23, 2011)

  • New Stuff:
  • Added the max_sum_submatrix() function to the optimization tools.
  • Upgraded the pyramid_down function object so it can create color pyramids.
  • Also, added some functions which define the coordinate transforms between
  • different layers in an image pyramid.
  • Non-Backwards Compatible Changes:
  • Changed the oca_problem interface to the oca optimizer. Now the
  • optimization_status() function reports back the current risk and risk gap
  • in addition to the overall objective value and objective gap.
  • Changed the stopping condition for the structured svm to the one suggested
  • by the Joachims paper. Now it stops when the risk gap is below a user
  • supplied epsilon.
  • Other:
  • Various usability improvements.
  • Improved the feature vector caching in the structural_svm_problem object.
  • Some objects were setup as multi-implementation objects but only had one
  • implementation. I went through dlib and switched these to single implementation objects. So for example, to use the dlib crc32 module you used to declare an object of type "crc32::kernel_1a" but now you can just say "crc32". Note that I did this change in a way that maintains backwards compatibility with previous versions. So crc32::kernel_1a is still allowed but that form is officially deprecated. The modified objects are as follows:
  • base64
  • byte_orderer
  • config_reader
  • crc32
  • pipe
  • rand

New in dlib C++ library 17.37 (Mar 25, 2011)

  • New Stuff:
  • Added a multiclass support vector machine.
  • Added a tool for solving the optimization problem associated with
  • structural support vector machines.
  • Added new functions for dealing with sparse vectors: add_to(),
  • subtract_from(), max_index_plus_one(), fix_nonzero_indexing(), a
  • more flexible dot(), and I renamed assign_dense_to_sparse() to assign()
  • and made it more flexible.
  • Non-Backwards Compatible Changes:
  • Renamed max_index_value_plus_one() (a function for working with graphs) to
  • max_index_plus_one() so that it uses the same name as the essentially
  • identical function for working with sparse vectors.
  • I simplified the cross_validate_multiclass_trainer(), cross_validate_trainer(),
  • test_binary_decision_function(), and test_multiclass_decision_function()
  • routines. They now always return double matrices regardless of any other
  • consideration. This only breaks previous code if you had been assigning
  • the result into a float or long double matrix.
  • Renamed assign_dense_to_sparse() to assign()
  • Bug fixes:
  • Fixed a bug in load_libsvm_formatted_data(). I had forgotten to clear the
  • contents of the labels output vector before adding the loaded label data.
  • Fixed a bug in the kernel_matrix() function. It didn't compile when used
  • with sparse samples which were of type std::vector.
  • Moreover, some of the trainers have a dependency on kernel_matrix() so this
  • fix makes those trainers also work with this kind of sparse sample.
  • Other:
  • Added a value_type typedef to matrix_exp so it's easier to write templates
  • which operate on STL containers and matrix objects.

New in dlib C++ library 17.36 (Mar 3, 2011)

  • New Stuff:
  • Added an implementation of the Hungarian algorithm for solving the optimal
  • assignment problem (in the new max_cost_assignment() routine).
  • Bug fixes:
  • Fixed a problem which prevented the any_function unit test from compiling
  • in visual studio 2008.
  • Other:
  • Changed the oca optimizer so that it warm starts the QP subproblem
  • rather than resolving it from scratch during each iteration. This
  • improves the speed and stability of the algorithm.

New in dlib C++ library 17.35 (Feb 11, 2011)

  • New Stuff:
  • Added the rr_trainer. It is a version of krr_trainer which is optimized
  • for use with the linear_kernel.
  • Added the approximate_distance_function() routine. It is the core optimizer
  • behind the reduced2() trainer adapter.
  • Added an any_function which supports the same functionality as std::function
  • from the upcoming C++0x standard. I added this so dlib can be modified to
  • easily support lambda functions while still being compilable with compilers
  • which don't support the new std::function.
  • Added overloads of all the GUI event handlers so you can use general functions
  • as callbacks (via any_function). This way, if you have a C++0x compiler, you
  • can use lambda functions with the event handlers.
  • Added the split() function for splitting up strings.
  • Non-Backwards Compatible Changes:
  • Improved the distance_function object by turning it into a properly
  • encapsulated class rather than just a simple struct. I also added
  • overloaded +, -, *, and / operators for this object so you can do the
  • kind of arithmetic you would expect on an object which represents a
  • point in a vector space. This breaks backwards compatibility with
  • the previous interface though as the member variables are now private.
  • Bug fixes:
  • Fixed a compile-time error in the kernel_matrix().
  • Fixed a bug in an assert in the spatially_filter_image() function.
  • Applied a patch from Nils Labugt which fixes a runtime bug in the gui_core
  • component. The bug caused a crash when using X11 and Ubuntu 10.10 in
  • certain cases.
  • Updated code so that it compiles with the clang compiler.
  • Other:
  • Updated the image_display widget so you can zoom in and out using the
  • mouse wheel

New in dlib C++ library 17.34 (Jan 4, 2011)

  • New Stuff:
  • General Stuff:
  • Added the promote template
  • Added the basic_type template
  • Added the assign_image_scaled() function
  • Added the unordered_pair object.
  • Added the symmetric_matrix_cache() function
  • Added two new quadratic program solvers. The solve_qp2_using_smo
  • and solve_qp3_using_smo objects.
  • Machine Learning Stuff:
  • Added the svm_c_trainer object. It implements C-SVM classification and
  • allows the user to set different C values for each class.
  • Added the svm_one_class_trainer object.
  • Added the svr_trainer object. It implements epsilon-insensitive
  • support vector regression.
  • Added two new any objects. The any_decision_function for containing
  • decision function style objects and the any_trainer for trainers.
  • Added cross_validate_regression_trainer()
  • Added test_regression_function()
  • Added the probabilistic() function. It is a trainer adapter that
  • simply calls train_probabilistic_decision_function().
  • Added tools for multiclass classification:
  • Added one_vs_one_trainer
  • Added one_vs_all_trainer
  • Added cross_validate_multiclass_trainer()
  • Added test_multiclass_decision_function()
  • Non-Backwards Compatible Changes:
  • invalid_svm_nu_error has been renamed to invalid_nu_error.
  • Changed the pixel_traits so that signed grayscale pixel types are allowed.
  • This involved adding a few new fields to pixel_traits. I also changed the
  • get_pixel_intensity() function so that its return value is of the same type
  • as the basic pixel type rather than always being unsigned long.
  • Removed the kernel_type typedef from the normalized function since this
  • meta-object should be capable of working with non-kernel decision functions.
  • train_probabilistic_decision_function() no longer accepts column vectors of
  • samples and labels. Now it only accepts std::vectors of samples and labels.
  • Bug fixes:
  • Fixed a bug in the deserialization code for the sparse kernels. The bug
  • prevented code which used the deserialize() routine from compiling.
  • Other:
  • Changed the image display GUI widgets to use the assign_image_scaled()
  • function internally. Now they will accept just about any image and
  • do the right thing.
  • Modified the type_safe_union so that you can call apply_to_contents() on const
  • type_safe_unions.
  • Added serialization support for std::pair objects.
  • Made the train_probabilistic_decision_function() more general by making it work
  • with any kind of trainer object rather than only ones which produce
  • dlib::decision_function objects. I also made it work with trainers that only
  • take std::vectors.
  • Added overloads to the config_reader's methods to allow it to load directly
  • from a file name given as a string in addition to taking istream objects.

New in dlib C++ library 17.33 (Dec 6, 2010)

  • New Stuff:
  • Added the ability to add/subtract scalar values to/from all the elements
  • of a matrix using the - and + operators.
  • Added a trust region optimizer.
  • Added Levenberg-Marquardt and LM/quasi-newton hybrid methods for solving
  • non-linear least squares problems.
  • Added an any container object.
  • Bug fixes:
  • Fixed a compiler warning and also a runtime bug in sort_basis_vectors().
  • The bug triggered when all the basis vectors were included in the final
  • answer.
  • Other:
  • Added a bunch of overloads to catch operations on diagonal matrices
  • and use more efficient code paths for them. For example, inv(diagm(d))
  • turns into diagm(reciprocal(d)). Multiplication by a diagonal matrix
  • is now also handled efficiently.

New in dlib C++ library 17.32 (Nov 15, 2010)

  • New Stuff:
  • Added a class for reading JPEG image files.
  • Added scale_rows(), flipud() and fliplr() matrix functions.
  • Added console_progress_indicator. It is a tool for measuring how long a
  • task will take.
  • Added sort_basis_vectors(). It is a function for performing supervised
  • basis selection.
  • Non-Backwards Compatible Changes:
  • Renamed the linearly_independent_subset_finder's dictionary_size() member
  • function to size(). This way, linearly_independent_subset_finder objects
  • can be used in many templated functions which expect objects which look
  • like arrays.
  • Bug fixes:
  • Changed the assert macros so that they don't use __PRETTY_FUNCTION__
  • with gcc 4.4.5 since, on Ubuntu at least, this version of gcc segfaults
  • when __PRETTY_FUNCTION__ is used within certain template constructs
  • Improved the alias detection capability of kernel_matrix() expressions
  • Now statements of the form: sample = kernel_matrix(kern, *, sample) can
  • be used since the aliasing of sample will be handled
  • Other:
  • Generally tried to make things more usable.
  • Optimized matrix expressions such as mat*diagm(vect)
  • Made the code in chol() more robust to indefinite matrices.

New in dlib C++ library 17.31 (Sep 16, 2010)

  • New Stuff:
  • Added the running_scalar_covariance object.
  • All the matrix decomposition routines now use LAPACK when DLIB_USE_LAPACK
  • is #defined.
  • Non-Backwards Compatible Changes:
  • Removed the dlib::EOTHER constant since it conflicts with visual
  • studio 2010.
  • Changed the svd functions so you can't supply output matrices which use
  • both column and row major layouts. Now all the output matrices need to
  • use the same memory layout.
  • Removed the qr_decomposition::get_householder() function.
  • Bug fixes:
  • Minor fixes so that dlib compiles in Visual Studio 2010
  • Other:
  • Added an overloaded matrix_assign() that handles symmetric kernel_matrix()
  • expressions more efficiently by only evaluating the upper triangular part
  • of the matrix.

New in dlib C++ library 17.30 (Jul 31, 2010)

  • New Stuff:
  • Non-Backwards Compatible Changes:
  • Bug fixes:
  • Fixed a compile-time bug in the matrix related to multiplication by subm() expressions when the BLAS bindings were enabled.
  • Fixed a bug in train_probabilistic_decision_function() which could cause it to go into an infinite loop when working with very large datasets.

New in dlib C++ library 17.28 (Jun 15, 2010)

  • New Stuff:
  • Added the simplify_linear_decision_function() routines.
  • Added the find_approximate_k_nearest_neighbors() function.
  • Added the fill_lisf() function.
  • Non-Backwards Compatible Changes:
  • Made the sample_pair have a default distance of infinity instead of
  • the max floating point value. I also reworked the graph creation functions
  • to make them a little more versatile. Now you can use infinite distances to
  • indicate that certain nodes are not connected at all.
  • Changed the linear_manifold_regularizer to normalize the regularization
  • parameter by the sum of edge weights instead of the sum of edges.
  • Bug fixes:
  • Fixed a bug in the timer_kernel_2 object. In certain rare cases it would
  • stop calling the action function and essentially shut down without being
  • told to do so.
  • Other:
  • Made the reduced() and reduced2() functions more efficient.
  • Many small usability improvements here and there.

New in dlib C++ library 17.27 (Jun 15, 2010)

  • New Stuff:
  • Added the svm_c_ekm_trainer. It is a kernelized version of the fast
  • linear trainer svm_c_linear_trainer.
  • Added the linear_manifold_regularizer and some supporting tools.
  • Added the sum_rows(), sum_cols(), join_rows(), join_cols(), reshape(),
  • and pointer_to_matrix() functions.
  • Added the randomly_subsample() function.
  • Bug fixes:
  • Fixed some minor compile time bugs on certain older compilers.
  • Other:
  • Updated the += and -= matrix operators to be a little more flexible. Now
  • if you try to apply them to a matrix of the wrong size it will automatically
  • resize the target matrix and just do a normal assignment.
  • Removed the requirement that you load dng files into an image of the exact
  • pixel type that created the file. Now you can use any pixel type. I also
  • changed the code so that grayscale pixels with more than 16 bits get saved as
  • 16 bit grayscale images instead of 8 bit images.

New in dlib C++ library 17.26 (Jun 15, 2010)

  • New Stuff:
  • Added the solve_qp_using_smo() function to solve certain quadratic programs.
  • Added the oca object. It is an implementation of the Optimized Cutting Plane Algorithm.
  • Added a linear SVM trainer that uses oca.
  • Added an implementation of the Histogram of Oriented Gradients algorithm
  • Added a simple tool for making image pyramids
  • Added the running_covariance object
  • Added a simple linear (i.e. non-kernelized) kmeans implementation
  • Added support for serializing dlib::int64
  • Added some functions to load and save LIBSVM formatted data files.
  • Non-Backwards Compatible Changes:
  • Changed the definition of dlib's sparse vector format to require unsigned integral keys. Having this requirement is nice because it creates a simple correspondence between dense vector index values and sparse vector keys. The previous sparse vector definition was excessively generic.
  • Renamed sparse_vector::dot_product() to sparse_vector::dot() so that both dense and sparse vectors have a global function with the same name (i.e. dot()).
  • Bug fixes:
  • Fixed a bug discovered by Mitchell Peabody. In some instances trying to
  • deserialize a std::vector would fail to compile.
  • Other:
  • Increased the number of template arguments of the type_safe_union from 10 to 20. Additionally, I made the get_id() function public and renamed it to get_type_id(). I also added a comment explaining the serialization format of type_safe_union objects.
  • Moved the optimization algorithms into their own page in the documentation.
  • Added a Suggested Books page to the documentation

New in dlib C++ library 17.25 (Jun 15, 2010)

  • New Stuff:
  • Added the ability to compute transformation matrices that map between
  • the representations used by different empirical_kernel_maps. Also added
  • the ability to compute projection error.
  • Added the random_subset_selector object.
  • Added the compute_mean_squared_distance() function.
  • Non-Backwards Compatible Changes:
  • Modified the logger's hook implementation so that it uses a special stream
  • buffer instead of an std::ostringstream. This way logging doesn't cause
  • memory allocations. This breaks backwards compatibility with the previous
  • hook function API but only slightly. The new hook functions must take a
  • const char* instead of std::string.
  • Added the const_ret_type typedef to the matrix_exp. It is now required that
  • all matrix expressions define this type. This enables the expressions to
  • return elements by constant reference when appropriate rather than always
  • returning by value.
  • Bug fixes:
  • Fixed a bug in the matrix BLAS bindings that caused BLAS to return an invalid
  • argument error. The error occurred when general matrix multiply expressions
  • were transposed and didn't result in a square matrix. E.g. mat = trans(a*b)
  • where mat isn't square.
  • Fixed potential compile time bugs in the comparison operators for futures.
  • Added a missing check for division by zero in the SURF feature extractor.
  • Modified the find_min_single_variable() function so that it is more
  • robust when working with functions that are made up of a bunch of
  • constant value strips. Previously, these kinds of functions could
  • cause the optimization to fail.
  • Other:
  • Changed the regression test suite so that when it sets the logging level
  • it now sets it for all loggers. Not just ones that start with "test."

New in dlib C++ library 17.24 (Jun 15, 2010)

  • New Stuff:
  • Added some MATLAB style thresholding relational operators to the matrix.
  • Added the kernel_matrix() functions.
  • Added the empirical_kernel_map object.
  • Added the discriminant_pca object.
  • Added the read_write_mutex object.
  • Non-Backwards Compatible Changes:
  • Renamed the support_vectors member of the decision_function and
  • distance_function classes to basis_vectors. This name more appropriately
  • reflects how these two classes are used within the library.
  • Changed the matrix_exp interface slightly. This could only impact users
  • who created their own custom matrix expressions. If you don't get a
  • compiler error then you don't have to worry about it.
  • Bug fixes:
  • Fixed a minor error in the LBFGS code.
  • Added a missing check for division by zero to the kcentroid, krls,
  • and linearly_independent_subset_finder classes. If someone added
  • the zero vector to them as the first training example a division by zero
  • could result.
  • There were a few cases where the code wouldn't compile when using
  • matrices of complex numbers. There was also a runtime bug that triggered
  • when a rank 1 update was performed where one of the vectors was conjugated
  • and two or more transposes were used in certain positions. This bug
  • caused the wrong output to be computed if the BLAS bindings were used.
  • Both of these bugs have been fixed.
  • Fixed a bug in the http server that affected cookies with certain kinds of
  • data. The result was invalid data being sent back to the web browser.
  • Other:
  • Generally improved the BLAS bindings for the matrix object.

New in dlib C++ library 17.23 (Jun 15, 2010)

  • New Stuff:
  • Added the pointer_to_column_vector function.
  • Added the BOBYQA algorithm for derivative-free optimization.
  • Added some functions to make it easy to do a line search on a function of a single variable when derivatives are not available.
  • Bug fixes:
  • Fixed a bug in the cpp pretty printer. It wasn't parsing exponentiated numbers like 1e100 correctly.
  • Other:
  • Added a model selection example program using grid search and the new BOBYQA algorithm.

New in dlib C++ library 17.22 (Oct 20, 2009)

  • New Stuff:
  • Added an implementation of the L-BFGS algorithm for unconstrained non-linear
  • optimization.
  • Non-Backwards Compatible Changes:
  • Refactored the optimization code. It is now much more flexible but
  • this resulted in changes to the API. See the optimization example program
  • for a discussion of the new API.
  • Bug fixes:
  • Fixed a bug in the get_filesystem_roots() roots function that
  • prevented it from compiling.

New in dlib C++ library 17.21 (Oct 20, 2009)

  • New Stuff:
  • Added the ability to use a kernel cache to the batch_trainer object.
  • svm_pegasos can now be configured to use two different lambda arguments
  • for use with unbalanced data.
  • Added the reciprocal_max() and dot() matrix functions.
  • Added the bgr_pixel and cv_image objects so that OpenCV images can
  • be easily used with dlib routines.
  • Non-Backwards Compatible Changes:
  • I changed the batch trainers so that they always call clear() on the
  • trainer being used before training begins.
  • Modified the svm_pegasos class so that the user can set independent lambda
  • parameters for each class. This breaks backwards compatibility with
  • the previous interface slightly and changes the serialization format
  • of this class.
  • Split the vector_normalizer into a normal normalizer and a pca normalizer
  • version.
  • The zoomable_region widget now uses exponential rather than linear
  • zoom scaling since this is much more pleasing to use. There is now
  • a new requirement on the zoom increment that it must be between 0
  • and 1.
  • Bug fixes:
  • Fixed a bug in the cross_validate_trainer_threaded() function. It could
  • deadlock if more than about 10 folds were requested.
  • Fixed the serialization functions for the normalized_function object.
  • They will now work with custom normalizer function objects.
  • Fixed a minor bug in the zoomable_region::set_min_zoom_scale() function.
  • It didn't always end up zooming in a smooth sensible manner after this
  • function was called.
  • Other:
  • Made the thread_function object more general. It can now handle
  • arbitrary functions of up to four arguments.

New in dlib C++ library 17.20 (Oct 20, 2009)

  • New Stuff:
  • Added the reshape_to_column_vector() function.
  • Added a hook to the logger object that lets you set a different kind of
  • output logging destination (in addition to the std::ostream supported
  • already).
  • Upgraded the smart_ptr so that it can handle array pointers as well
  • as customer deleter functions.
  • Added overloads of the kernel_derivative object for all the kernels
  • in dlib.
  • Non-Backwards Compatible Changes:
  • Reworked the config_reader interface a little to make it easier to use.
  • In particular, I removed the enumerator over blocks in favor of a simple
  • get_blocks() function that just returns a std::vector of all the blocks.
  • I also removed the requires clauses on the block and key accessor functions
  • and instead made a request for a non-existent key/block result in a non-fatal
  • exception. This way users can let the config reader perform a more natural
  • role in config file validation (by catching this exception and acting
  • accordingly).
  • It is now illegal to multiply matrices of size zero together.
  • Bug fixes:
  • Fixed the gaussian() function used by the SURF code. It wasn't computing
  • a properly weighted Gaussian function.
  • Fixed a few things in various parts of the code to avoid compiler errors
  • in certain use-cases.
  • Added a missing rethrow statement. The xml parser would eat exceptions
  • thrown by event handlers rather than letting them propagate out as
  • documented in the specification.

New in dlib C++ library 17.19 (Oct 20, 2009)

  • New Stuff:
  • Added an implementation of the SURF algorithm which includes the
  • following new objects and functions: integral_image, hessian_pyramid,
  • interest_point, surf_point, compute_dominant_angle(),
  • compute_surf_descriptor(), haar_x(), haar_y(), get_interest_points(),
  • and get_surf_points().
  • Added the zeros_matrix() and ones_matrix() functions.
  • Added serialization support to the type_safe_union object.
  • Added the grow_rect() and shrink_rect() functions.
  • Added the get_files_in_directory_tree() function.
  • Added the null_trainer_type object.
  • Added the roc_trainer_type object.
  • Non-Backwards Compatible Changes:
  • Removed some extraneous get_kernel() functions from some of the
  • trainer adapter classes since they really aren't needed.
  • Bug fixes:
  • Changed the socket read/write code so that it can handle a large
  • number ( > 2 billion) of bytes in I/O calls.
  • Added a missing type cast to the reciprocal() function to fix a compile
  • time error you get when you use it with complex type matrices.
  • Fixed a bug in the assign_border_pixels() and zero_border_pixels() functions.
  • Their contracts said there was no upper limit on the size of the border that
  • could be assigned/zeroed but the implementations failed to handle the case
  • where the border was bigger than the image.
  • Other:
  • Generally cleaned up the code and documentation here and there.
  • Added in Steven Van Ingelgem's patches to improve the usability of the
  • HTTP server object.
  • Updated the load_bmp() function so that it is capable of reading BMP
  • files that have been compressed with the RLE compression sometimes
  • used for 8bit BMP files.
  • Merged in Miguel Grinberg's patch to add a non-blocking read() function to the
  • connection object.

New in dlib C++ library 17.18 (Oct 20, 2009)

  • New Stuff:
  • Added a set of kernels that can operate on sparse vectors.
  • Added the image_window and image_display objects.
  • Added the rotate_point() function and the point_rotator object.
  • Non-Backwards Compatible Changes:
  • Added Steven Van Ingelgem's patch to add the body of data posted
  • back to the server into the incoming data object given to the
  • server_http::on_request() handler. This removes the content_length
  • field and replaces it with a string that contains the body of content
  • data.
  • Bug fixes:
  • Fixed a compile time bug in the offset_kernel.
  • Other:
  • Added optimized overloads of the kcentroid object for various
  • linear kernels.
  • Changed all the tests in the dlib test suite to use a new DLIB_TEST
  • macro instead of DLIB_CASSERT since the tests really aren't
  • technically assertions

New in dlib C++ library 17.17 (Oct 20, 2009)

  • New Stuff:
  • Added the strings_equal_ignore_case() functions
  • Non-Backwards Compatible Changes:
  • Changed the on_request() function in the http server
  • Changed the serialization format of the kcentroid and svm_pegasos
  • objects
  • By default, the kcentroid now keeps the most linearly independent
  • dictionary vectors rather than the newest
  • Bug fixes:
  • Other:
  • Split the algorithms documentation page into three pages, algorithms,
  • machine learning, and bayes nets.
  • Merged in Steven Van Ingelgem's patch to cleanup the HTTP server and
  • add new functionality. This breaks backwards compatibility with the
  • previous on_request() interface but it is easy to update old code and
  • it is now much cleaner and easier to use.
  • Changed the kcentroid so that you can tell it to keep the most linearly
  • independent vectors rather than the newest vectors. I then changed the
  • svm_pegasos object so that it has a max number of support vector setting
  • so that the user can supply an upper limit on the number of support
  • vectors to use.

New in dlib C++ library 17.16 (Oct 20, 2009)

  • New Stuff:
  • Matrix related
  • Added the find_min_and_max(), index_of_min(), index_of_max(), trace(),
  • randm(), linspace(), logspace(), and cartesian_product() functions.
  • Machine learning related
  • Added the offset_kernel
  • Added some functions to the kcentroid to allow the user to compute
  • the inner_product of kcentroids as well as a few other useful things.
  • Added a kernelized version of the Pegasos SVM training algorithm.
  • Non-Backwards Compatible Changes:
  • Changed the range() function so that it returns row vectors
  • instead of column vectors.
  • Bug fixes:
  • Changed threading code to avoid a potential race condition during
  • program termination.
  • Fixed a few incorrect DLIB_ASSERT statements
  • Fixed a bug in the way Content-type was handled in HTTP posts.
  • Fixed a bug in subm() that showed up when statically dimensioned row
  • vectors were used to select a sub matrix.
  • Other:
  • Added some functions to the rectangle to make it easy
  • to get the corner points.
  • The cross validation functions no longer allow invalid_svm_nu_error
  • exceptions to escape. Instead, they are assigned low CV scores.
  • Made std_vector_c able to copy directly from std::vector objects.
  • Added a get_socket_descriptor() function to the connection class

New in dlib C++ library 17.15 (Oct 20, 2009)

  • New Stuff:
  • Matrix related
  • Added QR, LU, Cholesky, and eigenvalue decomposition class objects
  • Added overloads for rowm() and colm() that allow you to pick out
  • less than an entire vector
  • Added the lowerm() and upperm() functions
  • Added the const_temp_matrix class
  • Non-Backwards Compatible Changes:
  • Renamed the cholesky_decomposition() function to chol()
  • Bug fixes:
  • Fixed some errors in the requirements for calling the new rowm() and
  • colm() functions.
  • Fixed dlib::abs() so that it returns the right type when used
  • with complex matrices.
  • Fixed a race condition in the logger object. It was missing a needed call
  • to unregister_thread_end_handler(). What could happen in some scenarios is,
  • during program termination, a global part of the logger object could be destructed
  • when it still had outstanding thread end handlers registered to it.
  • Other:
  • Added an example program that shows how to use the optimization
  • functions.
  • Gave the matrix object the ability to factor expressions containing
  • trans() function calls into more efficient forms.
  • Generally cleaned up the matrix code

New in dlib C++ library 17.14 (Oct 20, 2009)

  • New Stuff:
  • Added the multi-line text_box GUI widget.
  • Added the type_safe_union object
  • Non-Backwards Compatible Changes:
  • Renamed the array::expand() function to array::resize() since it does
  • basically the same thing as std::vector::resize() and more than one
  • user has told me they found the name "expand" to be confusing.
  • Bug fixes:
  • Other:
  • Added an example showing how to use the type_safe_union and pipe
  • together.
  • Added a page to the documentation that discusses the dlib coding
  • standards and how to contribute to the project.

New in dlib C++ library 17.13 (Oct 20, 2009)

  • New Stuff:
  • Added the bound_function_pointer object.
  • Added support for futures to the thread_pool object.
  • Added a set of objects that makes it possible to create simulations
  • of quantum computing algorithms.
  • Added copy and paste support to the text_field.
  • matrix object stuff
  • Added the range() function as well as overloads of all the various
  • sub-matrix selection functions so that you can pick out slices of
  • matrices like in Matlab.
  • Added a new template argument to the matrix object that allows the
  • user to select the memory layout. Also added a row_major_layout
  • and column_major_layout.
  • The matrix object can now be initialized using a comma separated
  • list of values.
  • Non-Backwards Compatible Changes:
  • Changed the fatal_error exception class so that it aborts your program
  • and prints a message if you try to construct it more than once since
  • doing so indicates that you ignored the first fatal error.
  • The way matrix expressions work in the library has been changed
  • since the last release. So if you created custom matrix expressions
  • then they will need to be updated to use the new matrix expression stuff.
  • Bug fixes:
  • Fixed a minor bug in how the zoomable_region widget drew itself after
  • a resize in some cases.
  • Fixed a problem with draw_line where it didn't always redraw the line
  • properly.
  • Other:
  • A lot of the matrix code has been refactored and optimized. The matrix
  • object will now introduce temporary objects when doing so results in
  • better performance. I also added a simple system for binding
  • arbitrary matrix expressions to optimized BLAS routines.
  • Cleaned up the vector and point classes. Now there is only one class,
  • the vector class, and it is capable of representing everything the old
  • vector and point class could. I also added code to make sure the
  • vector class does the appropriate type promotions when vector objects
  • with different types are used together.
  • Made the vector class inherit from matrix

New in dlib C++ library 17.12 (Oct 20, 2009)

  • New Stuff:
  • Added user settable styles to most of the gui widgets
  • Added the diagm(), svd2() and svd3() matrix functions
  • Added the thread_pool object
  • Non-Backwards Compatible Changes:
  • Removed the arrow_button widget and moved its functionality into the
  • button widget.
  • Renamed the dragable class to draggable
  • Removed the confusing and unnecessary hidden bool argument to the
  • gui widget style drawing functions.
  • Changed some of the events that are about the mouse leaving a widget so
  • that they still trigger even if the widget has been disabled or hidden.
  • Bug fixes:
  • Added some missing mutex locks to the scroll_bar widget
  • Fixed a bug in the fill_gradient_rounded() function. It didn't always
  • draw the entire rectangle.
  • Fixed a compile time bug in the pinv() function. It didn't compile
  • when used on statically sized matrices when they weren't square.
  • Other:
  • The member_function_pointer object now never calls new or delete.
  • So it is safe to use in a real time environment.

New in dlib C++ library 17.11 (Oct 20, 2009)

  • New Stuff:
  • Added the sort_columns() and rsort_columns() functions
  • Added the vector_normalizer object
  • Added the normalized_function object.
  • Added a tensor_product() function for the matrix object.
  • Bug fixes:
  • Made it so that the gui event handler thread isn't created at all
  • unless some part of an application calls some of the gui_core code.
  • In the previous release the event handler thread was executed
  • briefly during program termination and could cause problems if no
  • windowing environment was available.
  • Fixed an #include statement in the matrix utilities so that it works
  • even if you don't specify an include path argument to your compiler.

New in dlib C++ library 17.10 (Oct 20, 2009)

  • New Stuff:
  • Added a thread safe shared pointer object
  • Added the popup_menu_region widget.
  • Non-Backwards Compatible Changes:
  • The on_wheel_up() and on_wheel_down() gui events now take an unsigned long
  • argument.
  • Removed the register_program_ending_handler() function from the threading
  • API and also changed the dlib thread pool so that it no longer causes
  • a terminating program to wait for any outstanding threads to finish
  • before allowing the application to end.
  • Changed the serialization format of the linearly_independent_subset_finder
  • class.
  • Changed all the font pointers in the gui API's interfaces
  • to shared_ptr_thread_safe objects.
  • Bug fixes:
  • Made the kkmeans class actually use the min_change parameter.
  • Fixed a bug in the linearly_independent_subset_finder object. Also
  • added a way to set a minimum tolerance.
  • Fixed a bug in the scrollable_region widget that caused it to scroll in an
  • unpleasant way when the horizontal and vertical scroll increments weren't
  • set to the same value.
  • Made one of the arguments to font::draw_string() not be a reference because
  • some versions of gcc don't end up doing the right thing when -O3 is
  • supplied.
  • Fixed a bug in the covariance() function that prevented it from compiling
  • sometimes.
  • Other:
  • Changed the gui core code around so that it should be safe to make window
  • objects at the global scope.
  • Added more control over how the scrollable_region scrolls its region.
  • You can now adjust how much it scrolls when the mouse wheel is scrolled
  • as well as enabling scrolling via a mouse drag.
  • Modified the library so that it compiles with the Intel compiler.
  • Added some example programs that use the relevance vector machine

New in dlib C++ library 17.9 (Oct 20, 2009)

  • Bug fixes:
  • Fixed a bug in the tooltip widget
  • Fixed the cmake option to toggle the ENABLE_ASSERTS macro
  • Fixed some bugs in the rvm
  • Fixed the serialization code for the kkmeans object so that it actually
  • works
  • Fixed a bug that can trigger when the thread_specific_data object is
  • destructed
  • Fixed a bug in the directory navigation gui. If you tried to go
  • into a drive on windows that wasn't mounted you got an error.
  • This is now fixed.
  • Other:
  • Made the dir_nav stuff work with std::vector and dlib::std_vector_c
  • as well as dlib::queue objects.
  • Generally cleaned up a bunch of things

New in dlib C++ library 17.8 (Oct 20, 2009)

  • New Stuff:
  • Added relevance vector machine regression and classification support.
  • Added the cross_validate_trainer_threaded() function
  • Added the length and length_squared matrix functions.
  • Non-Backwards Compatible Changes:
  • Bug fixes:
  • Changed gui code a little so that windows don't popup in funny
  • places when used with the cygwin X windows system.
  • Other:
  • Made it easier to use the scoped_ptr with the TCP connection object
  • Optimized the matrix object a little

New in dlib C++ library 17.7 (Oct 20, 2009)

  • New Stuff:
  • Machine Learning
  • Added the ability to compare kcentroid objects to each other
  • Added the rank_features() function
  • Added the distance_function object
  • Added the reduced_decision_function_trainer object and
  • reduced() function
  • Added the reduced_decision_function_trainer2 object and
  • reduced2() function
  • Added a radial basis function network trainer
  • Added the linearly_independent_subset_finder object
  • Added the sigmoid_kernel
  • Matrix Utilities
  • Added the inv_upper_triangular() and inv_upper_triangular()
  • functions.
  • Non-Backwards Compatible Changes:
  • Refactored a bunch of the kernel learning code into a much cleaner form.
  • But this does change the interface to all the training functions.
  • Bug fixes:
  • Fixed a bug in the min and max calculation in the running_stats object
  • Removed a bug in the sum() and variance() functions that
  • caused them to seg fault when they were used on certain
  • matrix of matrix objects.
  • Added a missing check for division by zero to the conjugate gradient
  • optimization functions.
  • Added some missing member variables to the .swap and serialization
  • functions for the kcentroid object. So now they should work right.
  • Other:
  • Added an option to the cmake file to toggle the DLIB_ASSERT macro
  • Added an option to the cmake file to toggle the dlib stack trace macros
  • Made the library compile in Cygwin

New in dlib C++ library 17.6 (Oct 20, 2009)

  • New Stuff:
  • Merged in Keita Mochizuki's unicode patches to the GUI components. So
  • the dlib GUI now has better unicode support.
  • Added the remove_row and remove_col matrix functions. Also made all
  • three of the above functions capable of taking arguments at run time
  • as well as compile time.
  • Added the ability to cap the number of dictionary vectors used by the krls
  • and kcentroid object at a user specified number.
  • Added the pick_initial_centers() function
  • Added the running_stats object
  • Non-Backwards Compatible Changes:
  • Changed the interface to the krls and kcentroid objects somewhat.
  • All of the style objects in the GUI part of the library now use
  • dlib::ustring instead of std::string. This only matters to you if
  • you have made your own style objects.
  • Changed the serialization format of the krls, kcentroid, and
  • directed_graph_drawer objects. Note that is also means that the
  • files saved by previous versions of the bayes_net_gui_ex program
  • won't load with the current version.
  • Bug fixes:
  • Fixed an aliasing bug in the set_subm(), set_rowm(), and set_colm()
  • functions. It was possible that you could get incorrect results
  • if you used these functions to copy one part of a matrix to another
  • part of the same matrix if the two areas overlapped.
  • Fixed a minor numerical error in the krls code so now it gets slightly
  • better results.
  • Other:
  • Made the types generated by the matrix operations a lot shorter. This
  • avoids some compiler warnings from visual studio and even some potential
  • internal compiler errors in some instances

New in dlib C++ library 17.5 (Oct 20, 2009)

  • New Stuff:
  • Added some macros that allow dlib to create a stack trace
  • Added the wrap_function and is_function templates.
  • Added two new events to the text_field object. One for detecting when the
  • user hits enter and another for detecting when input focus is lost.
  • Machine Learning
  • Added a kernel based centroid estimator/novelty detector
  • Added a kernel based k-means clustering algorithm
  • Numerical
  • Added an identity_matrix() function that can take a runtime defined size.
  • Added a bunch of unconstrained optimization stuff to the library.
  • It now has a conjugate gradient optimization algorithm as well as
  • a quasi-newton algorithm.
  • Added the set_subm, set_rowm, and set_colm functions.
  • Non-Backwards Compatible Changes:
  • In the krls object: Added a requires clause to the set_tolerance() member
  • function and renamed clear() to clear_dictionary().
  • Bug fixes:
  • Fixed a bug in the requires clause of the subm() function. It was
  • more restrictive than it should have been.
  • Other:
  • Added example programs for the krls object as well as the new
  • kcentroid and kkmeans objects.

New in dlib C++ library 17.4 (Oct 20, 2009)

  • New Stuff:
  • Added an implementation of the kernel recursive least squares algorithm
  • Non-Backwards Compatible Changes:
  • Broke backwards compatibility in the directed_graph_drawer's serialization
  • format when I fixed the bug below.
  • Bug fixes:
  • Fixed two bugs in the directed_graph_drawer widget. First, it sometimes
  • threw a dlib::fatal_error due to a race condition. Second, the color of
  • the nodes wasn't being serialized when save_graph() was called.
  • Made vector_to_matrix() work for std::vector objects that have non-default
  • allocators.
  • Other:
  • Added some stuff to make people get a really obvious error message
  • when they set up the include path incorrectly.

New in dlib C++ library 17.3 (Oct 20, 2009)

  • New Stuff:
  • Added the vector_to_matrix() function.
  • Added a cholesky_decomposition() function.
  • Added the toggle_button GUI widget
  • Added a default toggle button style as well as check box and
  • radio button styles.
  • Added a single click event to list_box
  • Added a save_file_box() and open_existing_file_box() function.
  • Non-Backwards Compatible Changes:
  • Changed the check_box and radio_button widgets to be specializations of
  • the new toggle_button object. This is a nearly backwards compatible
  • change except that the events registered to check_box and radio_button
  • clicks must now take the form void event(toggle_button&) or
  • void event(void) instead of the previous void event(check_box&) and
  • void event(radio_button&).
  • Removed the is_mouse_over bool from the button_style::draw_button()
  • function.
  • Bug fixes:
  • Fixed a compiler error in mingw.
  • Changed the preprocessor checks for the wchar_t overload of
  • is_built_in_scalar_type so that it works properly with visual studio.
  • Other:
  • Added a Bayesian Network GUI that allows you to create a network
  • and serialize it to disk.

New in dlib C++ library 17.2 (Oct 20, 2009)

  • New Stuff:
  • GUI Related
  • Added the scrollable_region widget
  • Added the text_grid widget
  • Added an event to the text_field so you can tell when the
  • user modifies it.
  • Added the fit_to_contents() function to the tabbed_display
  • widget.
  • Bayesian Network Related
  • Added the node_first_parent_assignment(), node_next_parent_assignment(),
  • and node_cpt_filled_out() functions.
  • Non-Backwards Compatible Changes:
  • Reverted the change in 17.0 where I made drawable::lastx and
  • drawable::lasty not match the current location of the mouse inside
  • the on_mouse_move() event. I changed this back to how it was before,
  • so now lastx and lasty represent the most current record of where
  • the mouse is in *all* events.
  • Changed the functions that control text color in the label and text_field
  • widgets to use rgb_pixel objects. Also added a function to set the
  • background color of a text_field.
  • Bug fixes:
  • Fixed a bug in the bayesian_network_join_tree object that caused it to
  • compute incorrect results for some networks.
  • GUI Related
  • Fixed a minor bug in the cursor drawing of the text_field
  • gui widget.
  • Fixed a bug in the compute_cursor_rect() function. It would return an
  • incorrectly positioned rectangle for 0 length strings.
  • Changed the way wchar_t is handled in the serialize.h file. Now
  • everything should compile correctly in visual studio regardless of how
  • you set the /Zc:wchar_t compiler option.
  • Fixed a bug in the menu_bar widget. One of the members wasn't being
  • initialized when it needed to be.
  • Fixed a bug in the tabbed_display where it didn't redraw itself
  • correctly after it was moved by set_pos()
  • Other:
  • Changed the xml parser so that it counts line numbers
  • from the start of the input stream instead of from the
  • root tag.
  • Changed the xml parser so that you will only get the fatal_error
  • event once if it occurs.

New in dlib C++ library 17.1 (Oct 20, 2009)

  • New Stuff:
  • Added a zoomable_region widget
  • Added a directed_graph_drawer widget
  • Non-Backwards Compatible Changes:
  • Changed the first_pixel argument of the draw_string() function
  • to be a rectangle like all the other draw functions now use.
  • Bug fixes:
  • Fixed a bug in the tooltip widget that was triggered when calling
  • its member functions without calling set_tooltip_text(). This also
  • fixed a bug in the button object that triggered when calling some button
  • functions that referenced the tooltip widget.
  • Fixed a problem in the draw_circle and draw_solid_circle functions.
  • They didn't draw themselves quite correctly in all cases.

New in dlib C++ library 17.0 (Oct 20, 2009)

  • New Stuff:
  • Added a png_loader object
  • GUI related
  • Added a popup_menu widget
  • Added a menu_bar widget
  • Added a tooltip widget
  • Added a user selectable style to the gui button.
  • Added the draw_rounded_rectangle() and fill_gradient_rounded() functions
  • Added the mouse_over_event object to the base_widgets and made the
  • button_action inherit from it.
  • Added the drawable::next_free_user_event_number() function
  • matrix and geometry:
  • Added a size() function to matrix_exp and matrix_ref objects.
  • Added a class that represents 2D points
  • Added the following matrix functions:
  • squared(), cubed(), get_rect(), a subm() function that takes
  • rectangles, and normalize()
  • Added the following rectangle functions:
  • area(), centered_rect(), translate_rect(), move_rect(), resize_rect(),
  • resize_rect_height(), resize_rect_width(), and nearest_point()
  • Non-Backwards Compatible Changes:
  • Renamed atom() to array_to_matrix()
  • Moved the rectangle object from the gui_core into a new geometry folder
  • (only matters if you were directly including the rectangle file)
  • Moved the vector object into the geometry folder. Also removed the kernel_1a
  • stuff. So there is now only one possible vector implementation.
  • Changed the default position for a rectangle to (0,0) instead of (1,1)
  • Added edge data to the directed_graph. This breaks backwards compatibility
  • with the previous serialization format for directed_graphs.
  • GUI related:
  • Changed the base_window::on_keydown event signature so that it now
  • reports more keyboard modifier keys (e.g. alt)
  • Made the functions for drawing on canvas objects take points and pixels
  • instead of just a bunch of integers. Also changed the order of the
  • arguments so that the canvas comes first, followed by the location
  • to draw on, then what to draw.
  • Moved the canvas drawing functions into the gui_widgets/canvas_drawing.h
  • file.
  • Modified the drawable_window so that the drawable::lastx and drawable::lasty
  • fields are updated after calls to on_mouse_move. This way the x and y that
  • go into the on_mouse_move actually tell you something.
  • Bug fixes:
  • Fixed a bug in the floating point serialization code. It
  • didn't handle NaN or infinities correctly.
  • Fixed a bug in the win32 version of the gui_core component. It was
  • possible that calling set_size(), set_pos(), or set_title() could cause
  • the program to deadlock.
  • Made the load_bmp() function more robust in the face of weirdly
  • written BMP files.
  • Modified the draw_circle() and draw_solid_circle() functions so that they
  • only touch each canvas pixel once. This avoids messing up alpha blending
  • if an rgb_alpha_pixel is used.
  • Other:
  • Removed the old win32 only gui code in the dlib/gui folder.
  • Changed the default GUI font to a nicer Sans Serif font

New in dlib C++ library 16.5 (Oct 20, 2009)

  • New Stuff:
  • Added another constructor to the thread_function object.
  • Now it can take proper function objects as well as normal function
  • pointers.
  • Added the probabilistic_decision_function object and svm_nu_train_prob()
  • function.
  • Non-Backwards Compatible Changes:
  • Changed the svm train functions so that the cache_size argument
  • now measures the max number of megabytes of memory to use rather
  • than number of kernel matrix rows to cache. It's default
  • value is now 200MB.
  • changed the type typedef in the SVM kernel function objects to
  • be named sample_type instead of type.
  • Bug fixes:
  • Fixed a bug in the trim, rtrim, and ltrim functions. They
  • didn't return empty strings when the input string contained all
  • trim characters.
  • Fixed a bug in the decision_function's copy constructor
  • Other:
  • Added an optimization to the working set selection for the svm training code.
  • Now the algorithm will prefer to select indices that are in the kernel
  • matrix cache when possible.
  • Fixed a problem with the chm documentation file where many of the links
  • didn't work.
  • Made the support vector functions capable of operating with floats, doubles,
  • and long doubles instead of just the double type.

New in dlib C++ library 16.4 (Oct 20, 2009)

  • New Stuff:
  • Added aversion of the draw_line() function for images.
  • Added the atom(), rowm(), colm(), and subm() matrix functions.
  • Added some push/pop_back() functions to the array object that are similar
  • to the ones in the std::vector.
  • Added the std_vector_c class that wraps std::vector and checks its
  • function's preconditions.
  • Added the polynomial_kernel object for use with the svm algorithm.
  • Non-Backwards Compatible Changes:
  • Changed the svm_nu_cross_validate() function to return a vector
  • of both the +1 and -1 cross validation accuracies.
  • Bug fixes:
  • Fixed a bug in the list_box that caused it to not hide itself properly
  • when told to do so.
  • Fixed canvas::fill() gui function so that it should work right
  • on 64 bit platforms.

New in dlib C++ library 16.3 (Oct 20, 2009)

  • New Stuff:
  • Added memory manager support to the matrix object.
  • Non-Backwards Compatible Changes:
  • Made the assign_pixel() function saturate grayscale values bigger
  • than the target pixel type can handle. Previously it would just
  • truncate the numbers.
  • Removed rand_kernel_1 and rand_kernel_2 because they gave very
  • inferior results compared to rand_kernel_3. I then renamed
  • rand_kernel_3 to rand_kernel_1.
  • Renamed rand::get_random_number() to get_random_8bit_number() and also
  • added a get_random_16bit_number() and get_random_32bit_number()
  • Added a checksum to compress_stream_kernel_1 and kernel_2. This
  • breaks backwards compatibility with the previous versions. That is,
  • the new implementations will complain that decompression fails if
  • you give them data compressed with the old non-checksum version of
  • the compression routines.
  • Removed the width() and height() functions from the array2d object.
  • Now only the equivalent nc() and nr() member functions remain.
  • Changed array2d::set_size(width,height) to set_size(num_rows, num_cols).
  • That is, I switched the order of the two arguments to this function.
  • The reason for doing this is to make it have the same form as the
  • set_size() member of the matrix object. This way the usage of the
  • set_size() member for these two very similar data structures is
  • the same. Hopefully this will reduce confusion rather than
  • make things worse.
  • Bug fixes:
  • Fixed a bug in the image_widget. It didn't repaint the screen
  • all the way if you gave it a smaller image to display.
  • Fixed a bug in the cat() function that caused the state of the queue
  • to be broken if you called cat with an empty queue.
  • Made the queue_sort_1 use a better sorting algorithm. In particular, it
  • will not sort slowly for nearly sorted data.
  • Fixed a bug in the queue_kernel_2 object that caused it to not work
  • correctly with the non-default memory managers.
  • Other:
  • Added example code for the member_function_pointer as well as the matrix
  • object.
  • Added some more regression tests and made some of the longer running
  • ones execute a lot quicker.
  • Made the unit test suite easier to use. Now tests just throw an exception
  • to indicate an error rather than returning an error code.
  • Added an example program for the multi-layer perceptron neural network.

New in dlib C++ library 16.2 (Oct 20, 2009)

  • New Stuff:
  • Added the is_signed_type and is_unsigned_type templates
  • Image Processing stuff
  • Added the assign_all_pixels() function
  • Added the assign_border_pixels() function
  • Added the assign_pixel_intensity() function
  • Added the auto_threshold_image() function
  • Added the binary_union() function
  • Added the edge_orientation() function
  • Added the get_histogram() function
  • Added the get_pixel_intensity() function
  • Added the hysteresis_threshold() function
  • Added the sobel_edge_detector() function
  • Added the suppress_non_maximum_edges() function
  • Added the zero_border_pixels() function
  • Changed the pixel_traits structure so that it can support 8, 16, and 32
  • bit grayscale pixels.
  • Non-Backwards Compatible Changes:
  • Added more fields to the pixel_traits template so if you had defined your
  • own pixel types you will need to update them.
  • Bug fixes:
  • Fixed some compiler errors in Visual Studio 2008
  • Other:
  • Generally tried to clean up the documentation and code in this release

New in dlib C++ library 16.1 (Oct 20, 2009)

  • New Stuff:
  • Added the randomize_samples() function
  • Added the set_main_font() and main_font() functions to the drawable object.
  • So now the drawable widgets can use a user provided font.
  • Non-Backwards Compatible Changes:
  • Made the named_rectangle object a little easier to use. It now won't
  • let you size it so small that it doesn't display its entire name.
  • Bug fixes:
  • Fixed a bug in the svm_nu_train() function that caused a crash with
  • some inputs.
  • Fixed a compile time error that occurred when compiling the bayesian
  • network code in Mac OS X.
  • Fixed a bug in the compute_cursor_pos() function where it would
  • return the incorrect value.
  • Other:
  • Added an example showing how to use the svm functions.

New in dlib C++ library 16.0 (Oct 20, 2009)

  • New Stuff:
  • Added the left_substr() and right_substr() functions
  • Added the zero_extend_cast() function
  • Added the unsigned_type template
  • Added the uint8 typedef
  • Bayesian Network related
  • Added the assignment object
  • Added the bayes_node object
  • Added the joint_probability_table object
  • Added the conditional_probability_table object
  • Added the bayesian_network_gibbs_sampler object
  • This object implements an algorithm that performs approximate inference
  • in a Bayesian Network.
  • Added the bayesian_network_join_tree object
  • This object implements an algorithm that performs exact inference
  • in a Bayesian Network.
  • Set related
  • Added the set_intersection_size() function
  • Added the set_union() function
  • Added the set_intersection() function
  • Added the set_difference() function
  • Graph related
  • Added the graph object
  • Added the is_graph template
  • Added the is_directed_graph template
  • Added the create_moral_graph() function
  • Added the triangulate_graph_and_find_cliques() function
  • Added the graph_contains_length_one_cycle() function
  • Added the find_connected_nodes() function
  • Added the graph_is_connected() function
  • Added the is_clique() function
  • Added the is_maximal_clique() function
  • Added the copy_graph_structure() function
  • Added the create_join_tree() function
  • Added the is_join_tree() function
  • Added the edge() function
  • GUI related
  • Added the base_window::get_display_size() function
  • Added message_box_blocking()
  • Added the bdf_font object which is capable of loading BDF font files into
  • the font object used by the gui_widgets
  • Better Unicode support
  • Added the basic_utf8_ifstream: An input stream that can read UTF-8 files
  • Added serialization support for wchar_t and std::wstring
  • Added the is_combining_char() function
  • Added the convert_utf8_to_utf32() function
  • Modified most of the string manipulation functions in dlib/string.h
  • to work with any kind of character type
  • The gui widgets' font object now works with Unicode text (i.e. wchar_t
  • and unichar strings) as well as with normal char data.
  • Non-Backwards Compatible Changes:
  • The dlib/all_console.cpp and dlib/all_gui.cpp files have been deprecated
  • in favor of a new file. Now to build with dlib you simply add
  • dlib/all/source.cpp to your project regardless of what type of project
  • you are building.
  • The GUI program entry point, winmain(), has been removed. You can now use
  • the normal main() entry point or some other non-standard entry point
  • provided by your compiler.
  • Renamed directed_graph::node::item to directed_graph::node::data
  • Bug fixes:
  • Fixed some build issues in gcc 4.2 involving some uses of the std_allocator
  • Fixed some build issues in Visual Studio involving the dir_nav component
  • and building with NO_MAKEFILE #defined.
  • Moved the #define that disables the old WinSock API into the sockets cpp
  • file. This should avoid conflicts with people who are using the old WinSock
  • API.
  • Changed the tuple template slightly to avoid a bug in Visual Studio 7.1
  • that caused a compile time error in some instances.

New in dlib C++ library 15.12 (Oct 20, 2009)

  • New Stuff:
  • Added a destroy() function to the map, set, hash_map, and hash_set objects.
  • Added the tuple object
  • Added an overload of connect() that has a timeout
  • Added rand_kernel_3 as a random number generator that uses the Mersenne Twister
  • algorithm.
  • Added the directed_graph object
  • Added the graph_contains_undirected_cycle() and graph_contains_directed_cycle()
  • functions.
  • Added the std_allocator object. It is a STL style allocator that can use
  • the dlib memory manager objects.
  • std::string manipulation functions:
  • Added the cast_to_string() function.
  • Added the tolower() function
  • Added the toupper() function
  • Added the ltrim() function
  • Added the rtrim() function
  • Added the trim() function
  • Added the lpad() function
  • Added the rpad() function
  • Added the pad() function
  • Non-Backwards Compatible Changes:
  • Changed the default logging level from LNONE to LERROR
  • Renamed the ASSERT macro to DLIB_ASSERT and CASSERT to DLIB_CASSERT.
  • This rename avoids a conflict with a macro inside MFC.
  • Changed the logger so that settings are inherited when a new logger
  • is instantiated rather than just having the new logger use the
  • default settings.
  • Removed the logger::clear() function since it no longer really
  • makes sense given the above change.
  • Removed the get_main_thread_id() function and replaced it with the
  • is_dlib_thread() function.
  • Bug fixes:
  • Pushed some things into cpp files because doing so avoids build and/or
  • runtime errors on some platforms.
  • Other:
  • Changed the string_cast() function so that it will recognize the words true
  • and false as boolean values. Also improved the error message inside the
  • string_cast_error exception object.

New in dlib C++ library 15.11 (Oct 20, 2009)

  • New Stuff:
  • Added the covariance() function
  • Added the rgb_alpha_pixel pixel type and modified all relevant functions to
  • support it.
  • Non-Backwards Compatible Changes:
  • The GUI changes that are non-backwards compatible:
  • The alpha parameter is now an unsigned char instead of unsigned int
  • and its range is now 0 to 255 instead of 0 to 256.
  • The image_widget no longer has any member functions dealing with
  • alpha values. If you want to use alpha blending you just give it an
  • image that has an alpha channel. The same goes for draw_image().
  • There are now more fields in the pixel_traits template. So if you were
  • defining your own pixels before you will need to update your pixel_traits
  • specializations.
  • Bug fixes:
  • Made some functions non-inline and put some things on the stack
  • instead of heap. Doing this avoids some problems with certain
  • kinds of builds in visual studio.
  • Other:
  • Modified the message_box() function so that it is safe to call end_program()
  • from within its callback event.

New in dlib C++ library 15.10 (Oct 20, 2009)

  • New Stuff:
  • Modified the GUI drawing functions to take an alpha argument to allow
  • alpha blending.
  • Added the svm_nu_cross_validate() function to perform k-fold
  • cross validation using the svm_nu_train() function.
  • Added the boost enable_if templates
  • Added the rand_float extension to the rand object.
  • New matrix features:
  • Added the pinv() function
  • Changed round_zeros() to use the machine epsilon instead of 1e-6 as
  • its default epsilon.
  • Modified the matrix object so that you can declare them with
  • a static dimension and a dynamic dimension. E.g. matrix
  • is now legal and declares a matrix with a fixed number of columns(10)
  • and a variable number of rows.
  • Added the equal() function to compare two matrices of floating
  • point numbers for near equality.
  • Changed the matrix so that operator(long) works for both
  • column vectors and now also for row vectors.
  • Added a set_size() and constructor that takes a single long for use in
  • sizing row and column vectors.
  • Added the scale_columns() function
  • Bug fixes:
  • Fixed an error in svm_nu_train() where it would incorrectly
  • complain of incorrect nu values for some datasets.
  • Added a missing std:: qualifier at two points in the dlib/vector code that
  • could cause a compiler error in some instances.
  • Other:
  • Added a term index to the documentation.

New in dlib C++ library 15.9 (Oct 20, 2009)

  • New Stuff:
  • Added a nu support vector classifier training function.
  • Added a multilayer neural network object.
  • Added the "destructive aliasing" checks into the matrix code. Now temporary
  • matrices are only created during assignment if the right hand side aliases
  • the left hand side in a destructive way. This removes many of the previous
  • uses of temporary matrices.
  • Made the sum() matrix function be able to sum matrices of matrices
  • New matrix functions:
  • acos(), asin(), atan(), ceil(), cos(), cosh(), exp(), floor(), log(),
  • log10(), mean(), norm(), pow(), reciprocal(), round_zeros(), sin(),
  • sinh(), sqrt(), tan(), tanh(), variance(), and more overloads of
  • uniform_matrix().
  • Bug fixes:
  • Added missing nr() and nc() functions to the uniform_matrix() and
  • identity_matrix() functions.
  • Forgot to add a destructor for the dynamically sized matrix resulting in a
  • memory leak. This is now fixed.
  • Fixed various potential compile time errors

New in dlib C++ library 15.8 (Oct 20, 2009)

  • New Stuff:
  • Added a copy of the boost noncopyable base class.
  • added some smart pointers:
  • added shared_ptr
  • added weak_ptr
  • added scoped_ptr
  • Other:
  • Cleaned up the assert code and removed the need for the dlib/error.ccp file
  • Made the matrix take better advantage of the compile time sized
  • dimensions when it can.

New in dlib C++ library 15.7 (Oct 20, 2009)

  • New Stuff:
  • Made it so that command line options have a default conversion to bool
  • and the bool tells you if they are on the command line or not.
  • Added an implicit conversion to a scalar to the matrix object
  • when it is of dimension 1x1.
  • Added the thread_function object
  • Added a function to compute the singular value decomposition of a matrix.
  • Non-Backwards Compatible Changes:
  • Added two new arguments to the on_request() function. They allow you to
  • see what HTTP headers the client sends you and to control which ones
  • you send back.

New in dlib C++ library 15.6 (Oct 20, 2009)

  • New Stuff:
  • matrix object additions:
  • Added some functions to convert between matrix and pixel objects.
  • Added the clamp() function that operates on matrix objects.
  • Added the sigmoid function.
  • Made the matrix object capable of being sized at runtime in addition
  • to its original compile time static sizing capability.
  • Added 3 and 4 argument versions of pointwise_multiply()
  • Added the +=, -=, *= and /= operators to the matrix object.
  • Bug fixes:
  • Fixed the line numbering in the color pretty printer. Wasn't being
  • done correctly.
  • Fixed a bug in the matrix round() function.
  • Fixed some miscellaneous compile time errors
  • Fixed a bug in the matrix removerc() function.
  • Added some missing checks to catch invalid negative index inputs to
  • matrix objects.
  • Fixed a bug in the matrix inv() function. It could sometimes
  • segfault if used on certain singular matrices
  • Other:
  • string_cast() can now convert hex strings to integers
  • You can now say myarray2d.set_size(0,0) and have it do what
  • you would naturally expect.
  • Added some #pragma statements that tell visual studio
  • to link the right system libraries automatically.
  • So now you don't have to add these things in the
  • project settings anymore.

New in dlib C++ library 15.5 (Oct 20, 2009)

  • New Stuff:
  • Added the set_all_logging_levels(), set_all_logging_output_streams()
  • functions
  • Added the configure_loggers_from_file() function which allows you to
  • easily configure all logger objects using a textual configuration
  • file.
  • Bug fixes:
  • Added a workaround into the code that avoids a potential compilation
  • error on Mac OS X systems.

New in dlib C++ library 15.4 (Oct 20, 2009)

  • Bug fixes:
  • Fixed a bug in the POSIX version of the hostname_to_ip() function. It was
  • screwy if you asked for more than the first IP address (the same address
  • might be returned more than once).
  • Fixed a bug in the pipe object's timeout functions. The timeouts weren't
  • working correctly.

New in dlib C++ library 15.3 (Oct 20, 2009)

  • New Stuff:
  • Added the wait_for_num_blocked_dequeues(), enable_enqueue(),
  • disable_enqueue(), and is_enqueue_enabled() functions to the pipe object.
  • The pipe object can now be used with a zero length buffer.
  • Non-Backwards Compatible Changes:
  • There is no longer a pipe::kernel_1a_c typedef since the pipe
  • no longer has any requirements to check (due to the change of allowing
  • zero length buffer sizes)
  • Bug fixes:
  • Other:
  • Made the ASSERT and CASSERT macros call dlib_assert_breakpoint() when they
  • fail. This way you can easily set a breakpoint on them in a debugging
  • tool by breaking on calls to this new function.
  • Fixed some typos and unclear parts of the pipe spec.

New in dlib C++ library 15.2 (Jun 12, 2007)

  • Added a thread safe version of the config_reader object (in the form of an extension to the config_reader)
  • Added the wait_until_empty() function to the pipe object.
  • Removed the connection::close() and listener::close() functions. They have been replaced by destructors. To upgrade old code all you have to do is replace statements of the form "object->close();" with "delete object;".
  • Both statements do exactly the same thing. However, for connection objects, you should probably be using the close_gracefully() function instead.
  • Removed a potential compile time error in the dng image format handling code.
  • Fixed a bug in the bigint object. The destructor was using "delete" when it should have been using "delete []"
  • Fixed a resource leak in the POSIX version hostname_to_ip()
  • Fixed a significant memory leak in memory_manager_kernel_1
  • Fixed a memory leak that could occur in memory_manager_kernel_2 and memory_manager_kernel_3 when the constructor for the object being constructed threw an exception.
  • Added a missing delete statement to plug a memory leak in the md5 computation code.
  • Fixed an uninitialized variable warning from valgrind (in lz77_buffer/lz77_buffer_kernel_2.h). I think this could also potentially result in an error when decoding data but I'm not totally sure. But either way it is fixed now.
  • Changed a call to memcpy to memmove in the sockstreambuf_kernel_2 implementation since the copy could potentially be of overlapped memory.
  • Changed the connection::read() and connection::write() functions to takelongs instead of unsigned longs as the buffer sizes. They also now return longs instead of ints. This should be a backwards compatible change.
  • Started using the valgrind tool to check for memory errors in the project and found a few things.