2017-08-27 23:32:22 -0600 | answered a question | help finding memory corruption in code that writes to a cv::Mat I found the answer. I made 3 changes: I initialized a local cv::Mat that is passed into the function with the desired |
2017-08-24 17:47:07 -0600 | asked a question | help finding memory corruption in code that writes to a cv::Mat Please note, I am not the author of the code that has the problem below. I am having trouble running the https://github.com/CMU-Perceptual-Com... that uses opencv. You can see the valgrind report here: https://github.com/CMU-Perceptual-Com... Valgrind reports that the code writes 1 byte past allocated memory in this function: https://github.com/CMU-Perceptual-Com... This code looks pretty scary because it breaks encapsulation. It would be so much cleaner if it was cvMat[y][x][c] = value or cvMat.setValue(x, y, c, value); Can you tell me if this code looks correct to you? I think the function is called many times without a memory issue being reported by valgrind. |