1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-17 07:04:18 +08:00

[ximgproc::rl::createRLEImage] make runs const

This commit is contained in:
shimat
2021-04-11 07:35:35 +09:00
parent 9163f86a40
commit cf2e899486
2 changed files with 3 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ CV_EXPORTS bool isRLMorphologyPossible(InputArray rlStructuringElement);
* @param size image size (to be used if an "on" boundary should be used in erosion, using the default
* means that the size is computed from the extension of the input)
*/
CV_EXPORTS void createRLEImage(std::vector<cv::Point3i>& runs, OutputArray res, Size size = Size(0, 0));
CV_EXPORTS void createRLEImage(const std::vector<cv::Point3i>& runs, OutputArray res, Size size = Size(0, 0));
/**
* @brief Applies a morphological operation to a run-length encoded binary image.

View File

@@ -700,13 +700,13 @@ CV_EXPORTS bool isRLMorphologyPossible(InputArray rlStructuringElement)
return true;
}
CV_EXPORTS void createRLEImage(std::vector<cv::Point3i>& runs, OutputArray res, Size size)
CV_EXPORTS void createRLEImage(const std::vector<cv::Point3i>& runs, OutputArray res, Size size)
{
size_t nRuns = runs.size();
rlVec runsConverted(nRuns);
for (size_t i = 0u; i < nRuns; ++i)
{
Point3i &curIn = runs[i];
const Point3i &curIn = runs[i];
runsConverted[i] = rlType(curIn.x, curIn.y, curIn.z);
}
sortChords(runsConverted);