Member Avatar

Hi everybody, is there anyone with experience with opencv for python? I was wondering if there is a way to allocate some memory on demand, since when I try processing images (usually bigger than 800x800 pixels) I get a "OpenCV Error: Insufficient memory (unable to allocate 59500564 bytes)" message. (bytes may be more or less, according to the images obviously). The solution I am using is to scale down the images, but I am curious to know if there is another workaround. Thanks, Gianluca

0
2
Member Avatar

Hi all, hope you can give me some help to edit my code. I'm unaware how to merge two arrays and allocate them to a third array(of the right size) and let's just say for the sake of things, we'll call it C. I went ahead and instead used the StringTokenizer, but I assume there's a simpler way to put it together. (Also, I'm getting the data from a .txt file, for my instance the file is called "SortedArrays.txt") import java.io.*; import java.util.*; class SortedArrays { public static void main(String args[])throws FileNotFoundException{ File f = new File("SortedArrays.txt"); Scanner s =new …

Member Avatar
0
8
Member Avatar

Hi I have trouble with implementing a dynamic two dimensional pointer array on allocating memory for it. I tried it this way but not sure if it's correct. The array should contain pointers to heap allocated **Integer** objects const int size = 10; Integer *** twoD; twoD = new Integer**(); for(int i = 0 ; i < size ; i++) *twoD[i] = new Integer(); for(int j = 0 ; j < size ; j++) twoD[i][j] = new Integer(); Any help will be appreciated!

Member Avatar
0
7

The End.