libsvm chi-2 kernel; contour extraction new method unfinished