Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception raised on undecimated decomposition for large image #19

Open
wickeat opened this issue Jan 20, 2020 · 2 comments
Open

Exception raised on undecimated decomposition for large image #19

wickeat opened this issue Jan 20, 2020 · 2 comments

Comments

@wickeat
Copy link

wickeat commented Jan 20, 2020

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?

@wickeat wickeat changed the title Exception raised on decomposition for large image Exception raised on undecimated decomposition for large image Jan 20, 2020
@rafat
Copy link
Owner

rafat commented Jan 20, 2020 via email

@wickeat
Copy link
Author

wickeat commented Jan 21, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants