You may not be running into a memory leak, but instead memory fragmentation. To minimize the number of (re)allocations done, you can try something like this:
Code:
// Inside the class, outside of any methods
Image image = new RGBImage();
BinaryImage bin = new BinaryImage();
Then later:
Code:
camera.getImage(image);
NIVision.colorThreshold(bin.image, image.image, ... );
// Other processing ...