2013-04-16 06:42:23 -0600 | received badge | ● Editor (source) |
2013-04-16 06:30:01 -0600 | asked a question | Reduce memory consumed by method that uses OpenCv on iOS I am using OpenCV on iOS to do some image processing on a UIImage. The method processImage is consuming too much memory. When I profile the App with allocations in Instruments. The Live Bytes peaks at 55MB to 60MB for about a second. This causes the application to crash. It used to be higher
1. ~90MB, changing int ddepth reduced this ( from CV_16S to CV_8U). While I do understand that reducing the 'desired depth of the destination image' may reduce the memory consumed, I do not understand it's inner workings to pick the best format.
2. ~ 70MB, assigning the output of The reduction in ddepth also seems to increase the execution time of the method. I wish to greatly reduce the Live Bytes peak and increase the execution time of the method. Any insights in how to achieve this would be greatly appreciated. Link to the original Stackoverflow thread. |