Hello, I want to add a dynamic array of Mat variebles, i.e. a 2D array of images. Simply suppose you are putting e.g. 3 rows and 4 columns of your images on the table. I write the following code: Mat *img_array; Mat temp = imread("Lena.tif", CV_LOAD_IMAGE_ANYDEPTH); img_array = (Mat *)malloc(hor * sizeof(temp)); for (char i1 = 0;i1<hor;i1++) {="" img_array[i1]="(Mat" *)malloc(ver="" *="" sizeof(temp));="" }="" puts("initializing="" image="" array...");="" for="" (i1="0;" i1="" <="" hor;="" i1++)="" for="" (char="" j1="0;" j1="" <="" ver;="" j1++)="" img_array[i1][j1]="Mat::zeros(rows," col,="" cv_8uc3);="" hor,="" ver="" are="" the="" nuber="" of="" horizontal="" and="" vertical="" elements="" of="" each="" array="" and="" rows,="" col="" refer="" to="" the="" number="" of="" the="" pixels="" of="" each="" individual="" image.="" when="" i="" run="" the="" program,="" the="" following="" error="" is="" issued:="" exception="" thrown="" at="" 0x00007ffcffa28bcc="" (opencv_world320d.dll)="" in="" consoleapplication1.exe:="" 0xc0000005:="" access="" violation="" reading="" location="" 0xffffffffffffffff.="" occurred="" any="" idea?<="" p="">