JavaCV- Image load, smooth and save

Static Imports:
import static com.googlecode.javacv.cpp.opencv_core.*;
import static com.googlecode.javacv.cpp.opencv_imgproc.*;
import static com.googlecode.javacv.cpp.opencv_highgui.*;

Image Smoothing:
public static void smoothSave(String filename) throws Exception {
IplImage image = cvLoadImage(filename);
System.out.println(image.nSize());
if (image != null) {
cvSmooth(image, image, CV_BLUR, 3);
cvSaveImage("smoothed_" + filename, image);
cvReleaseImage(image);
}
}

4 comments :

  1. Hi i am getting executed without errors but i m not getting the smoothned image as the result...and also please complete the code..It would be helpful for sutdents like us who r beginers.

    ReplyDelete
    Replies
    1. Please try increasing filter size ( kernel size).

      Delete
    2. Find the complete code at http://ganeshtiwaridotcomdotnp.blogspot.com/2011/12/javacv-capture-save-flip-show-live.html

      Delete
  2. hi ganesh
    is there possible to make video from images in android using javacv?

    ReplyDelete

Your Comment and Question will help to make this blog better...