Memory Problems on Arduino Uno
You are running a wireless TCP stack, an SD card interface, and a web camera with some sort of motion detection, on a less than $20 computer?  I think you should congratulate yourself and move on to the next project.

I believe you are asking too much to add more to it. At $20 a pop, I would think about adding another UNO if you really do want to add more functionality. Let the 2 talk via serial, with one processing the video, the other processing the wireless.  The TCP part uses a considerable amount of resources, both memory and processing power.