burst add num_images support

main
Xiao Song 3 years ago
parent 01881ca089
commit 8d5d43f4bf

@ -14,10 +14,8 @@ class burst
explicit burst( const std::string& burst_path, const std::string& reference_image_path ); explicit burst( const std::string& burst_path, const std::string& reference_image_path );
~burst() = default; ~burst() = default;
std::string reference_image_path; // Reference image index in the array
std::string burst_path;
int reference_image_idx; int reference_image_idx;
std::vector<std::string> bayer_image_paths;
// Source bayer images & grayscale unpadded image // Source bayer images & grayscale unpadded image
std::vector<hdrplus::bayer_image> bayer_images; std::vector<hdrplus::bayer_image> bayer_images;
@ -25,7 +23,14 @@ class burst
// Image padded to tile size // Image padded to tile size
// Use for alignment, merging, and finishing // Use for alignment, merging, and finishing
std::vector<cv::Mat> grayscale_images_pad; std::vector<cv::Mat> grayscale_images_pad;
// number of image (including reference) in burst
int num_images;
private:
std::string reference_image_path;
std::string burst_path;
std::vector<std::string> bayer_image_paths;
}; };
} // namespace hdrplus } // namespace hdrplus

@ -12,6 +12,9 @@ burst::burst( const std::string& burst_path, const std::string& reference_image_
// Search through the input path directory to get all input image path // Search through the input path directory to get all input image path
cv::glob( burst_path + "/*.dng", bayer_image_paths, false ); cv::glob( burst_path + "/*.dng", bayer_image_paths, false );
// Number of images
num_images = bayer_image_paths.size();
// Find reference image path in input directory // Find reference image path in input directory
// reference image path need to be absolute path // reference image path need to be absolute path
reference_image_idx = -1; reference_image_idx = -1;

Loading…
Cancel
Save