Created
October 31, 2012 15:51
-
-
Save nikhil9/3987829 to your computer and use it in GitHub Desktop.
Demo source code for Javacv Setup in Eclipse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static com.googlecode.javacv.cpp.opencv_core.*; | |
import static com.googlecode.javacv.cpp.opencv_highgui.*; | |
import com.googlecode.javacv.CanvasFrame; | |
public class demo { | |
public static void main(String[] args) { | |
//Load image img1 as IplImage | |
final IplImage image = cvLoadImage("img1.png"); | |
//create canvas frame named 'Demo' | |
final CanvasFrame canvas = new CanvasFrame("Demo"); | |
//Show image in canvas frame | |
canvas.showImage(image); | |
//This will close canvas frame on exit | |
canvas.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment