wavelib
wavelib copied to clipboard
Exception raised on undecimated decomposition for large image
I've encountered an exception when trying to perform swt2 or modwt2 on a large image (dimension is 23000 x 30000 pixels). Is there a limit to the allowable size of image for decomposition in the decomposition functions? Would there be a workaround to this issue?
Can you give more information ? Please attach a screenshot of the exception if possible.
On Mon, Jan 20, 2020, 15:25 wickeat [email protected] wrote:
I've encountered an exception when trying to perform swt2 or modwt2 on a large image (dimension is 23000 x 30000 pixels). Is there a limit to the allowable size of image for decomposition in the decomposition functions? Would there be a workaround to this issue?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rafat/wavelib/issues/19?email_source=notifications&email_token=AAI3ROYISCBTAEPUCABMZV3Q6VYIFA5CNFSM4KJBLEHKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IHJX54Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI3RO2LGVVY5HSPS2LAWMDQ6VYIFANCNFSM4KJBLEHA .
The exception is Exception thrown at 0x00007FF69A74A25F in Test.exe: 0xC0000005: Access violation writing location 0x0000000000000000. occurred.
Below is a snippet of the code written.
auto obj = wave_init("sym2"); // Initialize the wavelet
cv::Mat doubleIn;
cv::Mat doubleOut = cv::Mat::zeros(input.size(), CV_64F);
input.convertTo(doubleIn, CV_64F);
auto inp = reinterpret_cast<double*>(doubleIn.data);
auto oup = reinterpret_cast<double*>(doubleOut.data);
int J = 1;
auto wt = wt2_init(obj, "modwt", doubleIn.rows, doubleIn.cols, J);
// Perform decomposition
auto wavecoeffs = modwt2(wt, inp);
The exception is raised at the modwt2 function.
This piece of code worked for other smaller images, but not on the big one I have tried.