Commit 0beabe84 authored by Davis King's avatar Davis King

Added image_dataset_file::shrink_big_images(). So now load_image_dataset() can

load a dataset of high resolution files into a user requested lower resolution.
parent 2ed907aa
This diff is collapsed.
......@@ -36,6 +36,7 @@ namespace dlib
This means that, initially, all boxes will be loaded. Therefore, for all
possible boxes B we have:
- #should_load_box(B) == true
- #box_area_thresh() == infinity
!*/
const std::string& get_filename(
......@@ -115,6 +116,26 @@ namespace dlib
- returns false
!*/
image_dataset_file shrink_big_images(
double new_box_area_thresh = 150*150
) const;
/*!
ensures
- returns a copy of *this that is identical in all respects to *this except
that #box_area_thresh() == new_box_area_thresh
!*/
double box_area_thresh(
) const;
/*!
ensures
- If the smallest non-ignored rectangle in an image has an area greater
than box_area_thresh() then we will shrink the image until the area of
the box is about equal to box_area_thresh(). This is useful if you have
a dataset containing very high resolution images and you don't want to
load it in its native high resolution. Setting the box_area_thresh()
allows you to control the resolution of the loaded images.
!*/
};
// ----------------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment