Closed huntkao closed 3 years ago
in the functions has_sky_region(...) and has_partial_sky_region(...) in imageSkyDetector.cpp, the following code:
std::vector<int> border_diff(static_cast<int>(border.size() - 1), 0); for (auto i = static_cast<int>(border.size() - 1); i >= 0; i--) { border_diff[i] = std::abs(border[i + 1] - border[i]); }
std::vector<int> border_diff(static_cast<int>(border.size() - 1), 0);
for (auto i = static_cast<int>(border.size() - 1); i >= 0; i--)
{
border_diff[i] = std::abs(border[i + 1] - border[i]);
}
makes access violation error. Since the index i+1 exceeds the size of array border ?
in the functions has_sky_region(...) and has_partial_sky_region(...) in imageSkyDetector.cpp, the following code:
std::vector<int> border_diff(static_cast<int>(border.size() - 1), 0);
for (auto i = static_cast<int>(border.size() - 1); i >= 0; i--)
{
border_diff[i] = std::abs(border[i + 1] - border[i]);
}
makes access violation error. Since the index i+1 exceeds the size of array border ?