i have a OpenCV program for preprocessing and detecting text area for OCR.
For example in this part of program:
cv::Mat image;
cv::Mat outImage;
cv::Mat image_blurred_5x5_kernel;
cv::resize(image, outImage, cv::Size(), .75, .75);
cv::GaussianBlur(image, image_blurred_3x3_kernel, cv::Size(3, 3), 0);
The program creates 3 images; original, resized and blurred one. I'm only going to use the last image i acquired. For example after resizing the original image and storing it in some variable, i won't be using original image anymore.
but as you see i created and used objects themselves, i am wondering is using smart pointers would result in better memory control? Or destructors are enough for this and difference between two methods is negligible? Execution time is my priority, rather than space usage.