HDR Imaging - assert failure during merge_mertens (Bug #3939)
Description
According to the HDR-Tutorial: http://docs.opencv.org/trunk/doc/tutorials/photo/hdr_imaging/hdr_imaging.html#hdrimaging
Merge_Mertens does not work.
Example Code:
cv::Mat fusion;
cv::Ptr<cv::MergeMertens> merge_mertens = cv::createMergeMertens();
merge_mertens->process(images, fusion);
Execution results always in the following error:
OpenCV Error: Assertion failed (y == 0 || (data && dims >= 1 && (unsigned)y < (u nsigned)size.p0)) in cv::Mat::ptr, file C:\builds\master_PackSlave-win64-vc11- static\opencv\modules\core\include\opencv2/core/mat.inl.hpp, line 750
The bug happens in this line of code (example: 7 images in the vector, crash at image 4):
for(int lvl = 0; lvl < maxlevel; lvl++) {
Mat up;
pyrUp(img_pyr[lvl + 1], up, img_pyr[lvl].size());
img_pyr[lvl] -= up;
}
Images are not huge so memory consumption should not be a problem.
Associated revisions
Merge pull request #3939 from paroj:fmtfix
History
Updated by Steven Puttemans over 10 years ago
Hello!
Before processing that vector of images, could you try doing something dumb and loop over each vector position and imshow the images.
Your error seems due to the fact that there is no data where it expects data to be.
Regards,
Steven
- Status changed from New to Open
- Assignee changed from Leonid Beynenson to Jo Z
Updated by Maksim Shabunin almost 10 years ago
- Target version changed from 3.0-alpha to 3.0
Updated by Vadim Pisarevsky almost 10 years ago
there is regression test on MergeMertens, which passes on different platforms. Without particular sample code and data we could not reproduce the problem and can not fix it.
- Status changed from Open to Incomplete
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4843