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

Noise estimation sometimes goes out-of-bounds #19

Closed
tjof2 opened this issue Apr 18, 2016 · 1 comment
Closed

Noise estimation sometimes goes out-of-bounds #19

tjof2 opened this issue Apr 18, 2016 · 1 comment
Assignees
Labels

Comments

@tjof2
Copy link
Owner

tjof2 commented Apr 18, 2016

Offending line no. 77 in noise.hpp - robust means and variance arrays are sometimes too small compared to the number of patches resulting from the quadtree segmentation:

// Perform quadtree decomposition of frames
// to generate patches for noise estimation
int maxVsize = (Nx/size)*(Ny/size);
arma::vec means = -1 * arma::ones<arma::vec>(T*maxVsize);
arma::vec vars = -1 * arma::ones<arma::vec>(T*maxVsize);

Current "fix" on line 84 doesn't always help - still get an Armadillo error on some noise estimation problems. Thanks to @bm424 for reminding me.

@tjof2 tjof2 self-assigned this Apr 18, 2016
@tjof2 tjof2 added the bug label Apr 18, 2016
@tjof2 tjof2 added this to the Version 0.3 milestone Apr 18, 2016
This was referenced Apr 18, 2016
@tjof2
Copy link
Owner Author

tjof2 commented Apr 18, 2016

Simplest fix is to over-compensate with the array size by replacing int maxVsize = (Nx/size)*(Ny/size) with int maxVsize = (Nx*Ny), since the code subsequently deletes all irrelevant elements anyway (I couldn't think of a smarter way around this at the time, and I'm sure the actual problem is not line no. 77 but another one - but this should fix it anyway).

@tjof2 tjof2 closed this as completed Apr 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant