I am having a problem understanding a program I have been tasked to optimize.
In it there is an image Mat1b image
and then the following:
Mat1b taped_image(rows + ts2, cols + ts2);
Mat1b pyr_image = taped_image(Rect{ts, ts, cols, rows});
so I have an empty taped image a bit bigger than the original and what exactly is pyr_image
?
I ask this because later I have
cv::copyMakeBorder(image, taped_image, ts, ts, ts, ts, BORDER_REFLECT_101 + BORDER_ISOLATED);
so as you can see, taped_image has the extended image.
However, and this is what I don’t understand, that is the last time the program uses taped_image
After that the program processes pyr_image
as if this has the data, but it doesn’t does it?
Is pyr_image
a pointer to the image that was copied by the function copyMakeBorder
??
or it is just black (but for some reason it has data in the program I have)
Any help appreciated