Added call to clone() to avoid unexpected change to external data.
- Fix both stitching_detailed.cpp sample and cv::Stitcher.
This commit is contained in:
parent
964b260937
commit
7674f3ddbf
@ -522,7 +522,7 @@ Stitcher::Status Stitcher::estimateCameraParams()
|
|||||||
{
|
{
|
||||||
std::vector<Mat> rmats;
|
std::vector<Mat> rmats;
|
||||||
for (size_t i = 0; i < cameras_.size(); ++i)
|
for (size_t i = 0; i < cameras_.size(); ++i)
|
||||||
rmats.push_back(cameras_[i].R);
|
rmats.push_back(cameras_[i].R.clone());
|
||||||
detail::waveCorrect(rmats, wave_correct_kind_);
|
detail::waveCorrect(rmats, wave_correct_kind_);
|
||||||
for (size_t i = 0; i < cameras_.size(); ++i)
|
for (size_t i = 0; i < cameras_.size(); ++i)
|
||||||
cameras_[i].R = rmats[i];
|
cameras_[i].R = rmats[i];
|
||||||
|
@ -527,7 +527,7 @@ int main(int argc, char* argv[])
|
|||||||
{
|
{
|
||||||
vector<Mat> rmats;
|
vector<Mat> rmats;
|
||||||
for (size_t i = 0; i < cameras.size(); ++i)
|
for (size_t i = 0; i < cameras.size(); ++i)
|
||||||
rmats.push_back(cameras[i].R);
|
rmats.push_back(cameras[i].R.clone());
|
||||||
waveCorrect(rmats, wave_correct);
|
waveCorrect(rmats, wave_correct);
|
||||||
for (size_t i = 0; i < cameras.size(); ++i)
|
for (size_t i = 0; i < cameras.size(); ++i)
|
||||||
cameras[i].R = rmats[i];
|
cameras[i].R = rmats[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user