|
|
|
@ -116,8 +116,9 @@ namespace hdrplus
|
|
|
|
|
// 1. get all four subsets: original (evenly split), horizontal overlapped,
|
|
|
|
|
// vertical overlapped, 2D overlapped
|
|
|
|
|
std::vector<std::vector<cv::Mat>> tiles_original;
|
|
|
|
|
std::vector<cv::Mat> row;
|
|
|
|
|
for (int y = 0; y < num_rows / offset - 1; y += 2) {
|
|
|
|
|
std::vector<cv::Mat> row;
|
|
|
|
|
row.clear();
|
|
|
|
|
for (int x = 0; x < num_cols / offset - 1; x += 2) {
|
|
|
|
|
row.push_back(tiles[y * (num_cols / offset - 1) + x]);
|
|
|
|
|
}
|
|
|
|
@ -125,8 +126,9 @@ namespace hdrplus
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::vector<std::vector<cv::Mat>> tiles_horizontal;
|
|
|
|
|
// std::vector<cv::Mat> row;
|
|
|
|
|
for (int y = 0; y < num_rows / offset - 1; y += 2) {
|
|
|
|
|
std::vector<cv::Mat> row;
|
|
|
|
|
row.clear();
|
|
|
|
|
for (int x = 1; x < num_cols / offset - 1; x += 2) {
|
|
|
|
|
row.push_back(tiles[y * (num_cols / offset - 1) + x]);
|
|
|
|
|
}
|
|
|
|
@ -134,8 +136,9 @@ namespace hdrplus
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::vector<std::vector<cv::Mat>> tiles_vertical;
|
|
|
|
|
// std::vector<cv::Mat> row;
|
|
|
|
|
for (int y = 1; y < num_rows / offset - 1; y += 2) {
|
|
|
|
|
std::vector<cv::Mat> row;
|
|
|
|
|
row.clear();
|
|
|
|
|
for (int x = 0; x < num_cols / offset - 1; x += 2) {
|
|
|
|
|
row.push_back(tiles[y * (num_cols / offset - 1) + x]);
|
|
|
|
|
}
|
|
|
|
@ -143,8 +146,9 @@ namespace hdrplus
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::vector<std::vector<cv::Mat>> tiles_2d;
|
|
|
|
|
// std::vector<cv::Mat> row;
|
|
|
|
|
for (int y = 1; y < num_rows / offset - 1; y += 2) {
|
|
|
|
|
std::vector<cv::Mat> row;
|
|
|
|
|
row.clear();
|
|
|
|
|
for (int x = 1; x < num_cols / offset - 1; x += 2) {
|
|
|
|
|
row.push_back(tiles[y * (num_cols / offset - 1) + x]);
|
|
|
|
|
}
|
|
|
|
@ -190,9 +194,10 @@ namespace hdrplus
|
|
|
|
|
std::vector<std::vector<cv::Mat>> alt_tiles_list(reference_tiles.size());
|
|
|
|
|
int num_tiles_row = alternate_channel_i_list[0].rows / offset - 1;
|
|
|
|
|
int num_tiles_col = alternate_channel_i_list[0].cols / offset - 1;
|
|
|
|
|
std::vector<cv::Mat> alt_tiles;
|
|
|
|
|
for (int y = 0; y < num_tiles_row; ++y) {
|
|
|
|
|
for (int x = 0; x < num_tiles_col; ++x) {
|
|
|
|
|
std::vector<cv::Mat> alt_tiles;
|
|
|
|
|
alt_tiles.clear();
|
|
|
|
|
// Get reference tile location
|
|
|
|
|
int top_left_y = y * offset;
|
|
|
|
|
int top_left_x = x * offset;
|
|
|
|
|