You can use Camera.Parameters to set the corresponding effect. More on this.
If you want to do the manipulation on your own, use the onPreviewFrame camera. This gives you the raw byte[] format of the YUV format (by default, it can also be set to other formats. See here for setting the preview format).
Now you can do whatever pixel manipulation you want on byte[] .
Hope this helps!
Vinod maurya
source share