You're most likely overflowing the stack. This is because imagen objects are very large (more than 1.5 MB each), and the stack is quite small by default (it doesn't really matter that you have 4 GB of RAM or something). As a simple test, move declarations of prueba and aux to the global scope. If the program works, it's the stack.
How to fix it? Allocate your matrix from the heap. I suggest to use std::vector for it (or boost::multi_array). This method has additional advantages: there is no limit on the max size (other than the amount of RAM), and you are not wasting memory for unused entries.
Unfortunately the OP is guilty of cross posting - and I was answering him in another thread.
Unfortunately the problem is stack overflow as suggested by Abramus - objects of the imagen class are very very
big (as he is using the tr1::array class which really is an array) and he is creating a very
big array here: