Updated segmentation algo. added basic jni image processing stub