diff --git a/docs/docs/images/extract_image_4points_source.jpg b/docs/docs/images/extract_image_4points_source.jpg
index 68fc939f8..3a3003c9a 100644
Binary files a/docs/docs/images/extract_image_4points_source.jpg and b/docs/docs/images/extract_image_4points_source.jpg differ
diff --git a/docs/docs/images/mbd_example_in.jpg b/docs/docs/images/mbd_example_in.jpg
new file mode 100644
index 000000000..e0205c3bd
Binary files /dev/null and b/docs/docs/images/mbd_example_in.jpg differ
diff --git a/docs/docs/images/mbd_example_out.jpg b/docs/docs/images/mbd_example_out.jpg
new file mode 100644
index 000000000..71eda1c0a
Binary files /dev/null and b/docs/docs/images/mbd_example_out.jpg differ
diff --git a/docs/docs/imaging.xml b/docs/docs/imaging.xml
index a8c1dd59e..d60670b36 100644
--- a/docs/docs/imaging.xml
+++ b/docs/docs/imaging.xml
@@ -107,6 +107,7 @@
- scan_fhog_pyramid
- scan_image_custom
- find_candidate_object_locations
+ - min_barrier_distance
- test_box_overlap
- remove_unobtainable_rectangles
- setup_hashed_features
@@ -233,6 +234,7 @@
- flip_image_dataset_left_right
- rotate_image_dataset
- extract_image_chips
+ - extract_image_4points
- random_cropper
- jitter_image
- sub_image
@@ -1898,6 +1900,29 @@
+
+
+
+ extract_image_4points
+ dlib/image_transforms.h
+ dlib/image_transforms/interpolation_abstract.h
+
+ This function allows you to extract an arbitrary quadrilateral patch from
+ an image. For example, given the image on the left and the 4 corners of the
+ red box you can extract the image on the right:
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
@@ -2169,6 +2194,34 @@
+
+
+
+ min_barrier_distance
+ dlib/image_transforms.h
+ dlib/image_transforms/segment_image_abstract.h
+
+ This function implements the salient object detection method described in the paper:
+
+ "Minimum barrier salient object detection at 80 fps" by Zhang, Jianming, et al.
+
+ This routine takes an image as input and creates a new image where objects that are
+ visually distinct from the borders of the image have bright pixels while everything else is
+ dark. This is useful because you can then threshold the resulting image to detect objects.
+ For example, given the left image as input you get the right image as output:
+
+
+
+
+
+ |
+ |
+
+
+
+
+
+
diff --git a/docs/docs/linear_algebra.xml b/docs/docs/linear_algebra.xml
index bdc221995..d18f757d4 100644
--- a/docs/docs/linear_algebra.xml
+++ b/docs/docs/linear_algebra.xml
@@ -663,6 +663,9 @@
- intersect
- count_points_on_side_of_line
- count_points_between_lines
+ - angle_between_lines
+ - is_convex_quadrilateral
+ - find_convex_quadrilateral
@@ -823,6 +826,42 @@
+
+
+
+ angle_between_lines
+ dlib/geometry.h
+ dlib/geometry/line_abstract.h
+
+ This routine returns the angle, in degrees, between two lines. This is a number in the range [0 90].
+
+
+
+
+
+
+ is_convex_quadrilateral
+ dlib/geometry.h
+ dlib/geometry/vector_abstract.h
+
+ This routine tests if 4 points define a convex quadrilateral.
+
+
+
+
+
+
+ find_convex_quadrilateral
+ dlib/geometry.h
+ dlib/geometry/line_abstract.h
+
+ This routine takes 4 lines as input and determines if their
+ intersections form a convex quadrilateral. If so it returns the 4 corners of
+ this quadrilateral.
+
+
+
diff --git a/docs/docs/release_notes.xml b/docs/docs/release_notes.xml
index bba6534ab..00a1557c2 100644
--- a/docs/docs/release_notes.xml
+++ b/docs/docs/release_notes.xml
@@ -11,6 +11,49 @@
+New Features and Improvements:
+ - Added a lot of new Python bindings. You can now use these things from Python:
+ - gaussian_blur(), label_connected_blobs(), randomly_color_image(), jet(),
+ skeleton(), find_line_endpoints(), get_rect(), shrink_rect(), grow_rect(),
+ image_gradients, label_connected_blobs_watershed(), convert_image(),
+ convert_image_scaled(), dpoint, centered_rect(), centered_rects(), length(),
+ as_grayscale(), pyramid_down, find_bright_keypoints(), find_bright_lines(),
+ find_dark_lines(), find_dark_keypoints(), suppress_non_maximum_edges(),
+ find_peaks(), hysteresis_threshold(), sobel_edge_detector(), equalize_histogram(),
+ resize_image(), hough_transform, remove_incoherent_edge_pixels(),
+ normalize_image_gradients(), line, signed_distance_to_line(), distance_to_line(),
+ reverse(), intersect(), count_points_on_side_of_line(),
+ count_points_between_lines(), dot(), normalize(), point_transform_projective,
+ find_projective_transform(), inv(), transform_image(), angle_between_lines(),
+ extract_image_4points(), load_grayscale_image(), min_barrier_distance().
+ - Added a .add_overlay_circle() to dlib.image_window. Also made .add_overlay()
+ take lines.
+ - Added the *_corner() routines to rectangle and drectangle and made these
+ objects constructable from instances of each other.
+ - Made the Python extension module automatically enable AVX instructions if the host
+ machine supports them. So you never need to say --yes USE_AVX_INSTRUCTIONS anymore
+ when installing dlib.
+
+ - New C++ routines:
+ - Added an image_window::add_overlay() overload for line object.
+ - Added angle_between_lines()
+ - Added extract_image_4points()
+ - Added is_convex_quadrilateral(), find_convex_quadrilateral(), and no_convex_quadrilateral.
+ - Added python_list_to_array()
+ - Added min_barrier_distance()
+
+Non-Backwards Compatible Changes:
+
+Bug fixes:
+ - Fixed numpy_image and pybind11 crashing python sometimes when certain types of
+ conversions are attempted.
+ - Fixed some python functions not taking as wide a range of image types as they did in
+ previous dlib versions.
+
+
+
+
+
New Features and Improvements:
- Added Python interface to threshold_image() and partition_pixels().
@@ -20,7 +63,7 @@ Non-Backwards Compatible Changes:
Bug fixes:
- Dlib 19.11 had a bug that caused the Python interface to reject grayscale images.
This has been fixed.
-
+
diff --git a/docs/docs/term_index.xml b/docs/docs/term_index.xml
index 7ddf3b1b6..1488d08a7 100644
--- a/docs/docs/term_index.xml
+++ b/docs/docs/term_index.xml
@@ -433,6 +433,10 @@
+
+
+
+
@@ -1514,6 +1518,7 @@
+
@@ -1525,6 +1530,7 @@
+
diff --git a/docs/makedocs b/docs/makedocs
index 6289781c5..649a62b01 100755
--- a/docs/makedocs
+++ b/docs/makedocs
@@ -184,6 +184,8 @@ makedocs ()
cp docs/ml_guide.svg docs/chm/docs
cp -r docs/guipics docs/web
cp -r docs/guipics docs/chm/docs
+ cp -r docs/images docs/web
+ cp -r docs/images docs/chm/docs
cp docs/*.html docs/web
cp docs/*.html docs/chm/docs
cp docs/*.css docs/web