HI all - I'm fairly new to openCv and where hoping you could help me with this problem.
I'm using a simple for loop to do X itterations of the same filter:
void filterwrapper(IplImage src, IplImage *dst, int filter_sel, int param1, int param2, int iterations) { int i; *dst = cvCloneImage(src); . . . for (i = 0; i < iterations; i++) { cvSmooth( *dst, *dst, CV_MEDIAN, param1, 0); } }
I'm aware i somehow have to release the memory using cvReleasimg(), but doing so inside the loop causes my program to crash. I've tried using a temporary image (IplImage *tmp) as a placeholder and releasing this each loop, but i still get an memory allocation error when running the program.
Any help would be greatly appriciated
- Kind regards