mirror of
https://github.com/opencv/opencv.git
synced 2025-07-25 22:57:53 +08:00
Fix self converTo.
We still need images[i] = img because it is used below in buildPyramid.
This commit is contained in:
parent
3ff1ec99ac
commit
b774753922
@ -176,16 +176,16 @@ public:
|
|||||||
|
|
||||||
parallel_for_(Range(0, static_cast<int>(images.size())), [&](const Range& range) {
|
parallel_for_(Range(0, static_cast<int>(images.size())), [&](const Range& range) {
|
||||||
for(int i = range.start; i < range.end; i++) {
|
for(int i = range.start; i < range.end; i++) {
|
||||||
Mat& img = images[i];
|
Mat img, gray, contrast, saturation, wellexp;
|
||||||
Mat gray, contrast, saturation, wellexp;
|
|
||||||
std::vector<Mat> splitted(channels);
|
std::vector<Mat> splitted(channels);
|
||||||
|
|
||||||
img.convertTo(img, CV_32F, 1.0f/255.0f);
|
images[i].convertTo(img, CV_32F, 1.0f/255.0f);
|
||||||
if(channels == 3) {
|
if(channels == 3) {
|
||||||
cvtColor(img, gray, COLOR_RGB2GRAY);
|
cvtColor(img, gray, COLOR_RGB2GRAY);
|
||||||
} else {
|
} else {
|
||||||
img.copyTo(gray);
|
img.copyTo(gray);
|
||||||
}
|
}
|
||||||
|
images[i] = img;
|
||||||
split(img, splitted);
|
split(img, splitted);
|
||||||
|
|
||||||
Laplacian(gray, contrast, CV_32F);
|
Laplacian(gray, contrast, CV_32F);
|
||||||
|
Loading…
Reference in New Issue
Block a user