Let's say we have two region_prior_integral_image
instances: A and B. If you want to assign B to A, like A = B;
, the shapes of A
and B
must be equal. The error message is saying that, in your code image_cache[it->second] = filename_to_region_prior_map[it->first];
, the two arrays are of different shapes.
How do you created the arrays in filename_to_region_prior_map
? I guess you used this constructor to specify the shapes: multi_array<double,3> B(boost::extents[i][j][k])
. Hence their shape is [i][j][k]
. But when you create the image_cache
, the default constructor is invoked. So the two shapes mismatch.
My opinion is to store pointers of region_prior_integral_image
in your code, which will save a lot of copy as well.