mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 02:16:34 +08:00
[ximgproc::rl::createRLEImage] make runs const
This commit is contained in:
@@ -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
|
* @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)
|
* 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.
|
* @brief Applies a morphological operation to a run-length encoded binary image.
|
||||||
|
@@ -700,13 +700,13 @@ CV_EXPORTS bool isRLMorphologyPossible(InputArray rlStructuringElement)
|
|||||||
return true;
|
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();
|
size_t nRuns = runs.size();
|
||||||
rlVec runsConverted(nRuns);
|
rlVec runsConverted(nRuns);
|
||||||
for (size_t i = 0u; i < nRuns; ++i)
|
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);
|
runsConverted[i] = rlType(curIn.x, curIn.y, curIn.z);
|
||||||
}
|
}
|
||||||
sortChords(runsConverted);
|
sortChords(runsConverted);
|
||||||
|
Reference in New Issue
Block a user