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"); |
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 com.googlecode.javacv.CanvasFrame; | |
import com.googlecode.javacv.FrameGrabber; | |
import com.googlecode.javacv.cpp.opencv_core.*; | |
import com.googlecode.javacv.OpenCVFrameGrabber; | |
public class demo_video { | |
public static void main(String[] args) { | |
//Create canvas frame for displaying video. | |
CanvasFrame canvas = new CanvasFrame("VideoCanvas"); | |
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 static com.googlecode.javacv.cpp.opencv_imgproc.*; | |
public class circleDetection{ | |
public static void main(String[] args){ | |
IplImage src = cvLoadImage("img2.png"); | |
IplImage gray = cvCreateImage(cvGetSize(src), 8, 1); | |
cvCvtColor(src, gray, CV_BGR2GRAY); |
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
#include <iostream> | |
#include <cv.h> | |
#include <highgui.h> | |
using namespace std; | |
int main() | |
{ | |
cvNamedWindow("Hello", 1); | |
cvWaitKey(0); | |
cvDestroyWindow("Hello"); |
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
#include <iostream> | |
#include <cv.h> | |
#include <highgui.h> | |
using namespace std; | |
char key; | |
int main() | |
{ | |
IplImage* frame=cvLoadImage("img1.png",CV_LOAD_IMAGE_COLOR); //Load image in IplImage frame. | |
cvNamedWindow("window1", CV_WINDOW_AUTOSIZE); //Create window of name 'Window1' |
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
#include <iostream> | |
#include <cv.h> | |
#include <highgui.h> | |
using namespace std; | |
char key; | |
int main() | |
{ | |
IplImage* frame=cvLoadImage("img1.png",CV_LOAD_IMAGE_GRAYSCALE); //Load image in IplImage frame. | |
cvNamedWindow("window1", CV_WINDOW_AUTOSIZE); //Create window of name 'Window1' |
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 com.googlecode.javacv.CanvasFrame; | |
import com.googlecode.javacv.FrameGrabber; | |
import com.googlecode.javacv.cpp.opencv_core.*; | |
import com.googlecode.javacv.OpenCVFrameGrabber; | |
import static com.googlecode.javacv.cpp.opencv_core.cvFlip; | |
public class demo_video { | |
public static void main(String[] args) { | |
//Create canvas frame for displaying webcam. | |
CanvasFrame canvas = new CanvasFrame("Webcam"); |
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
#include <iostream> | |
#include <cv.h> | |
#include <highgui.h> | |
using namespace std; | |
char key; | |
int main() | |
{ | |
cvNamedWindow("Camera_Output", 1); //Create window | |
CvCapture* capture = cvCaptureFromCAM(CV_CAP_ANY); //Capture using any camera connected to your system |
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 com.googlecode.javacv.cpp.opencv_core.IplImage; | |
import static com.googlecode.javacv.cpp.opencv_core.*; | |
import static com.googlecode.javacv.cpp.opencv_highgui.*; | |
import static com.googlecode.javacv.cpp.opencv_objdetect.*; | |
public class FaceDetection{ | |
public static final String XML_FILE = | |
"resources/haarcascade_frontalface_default.xml"; |
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.cpp.opencv_core.*; | |
import com.googlecode.javacv.cpp.opencv_highgui.*; | |
public class getRGB{ | |
public static int x_co; | |
public static int y_co; |
OlderNewer