Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How load and display images with java using opencv

I am working with java usign opencv. Basically I want to read and display an image using opencv functions. I wanted to translate the next code from c++ to java but i dont find the same opencv functions for java.

include "opencv2/highgui/highgui.hpp"

include "iostream"

using namespace cv; using namespace std; int main(){ Mat img = imread("lena.png", CV_LOAD_IMAGE_COLOR); if (img.empty()){ cout << "Cannot load image!" << endl; return -1; } namedWindow("image", CV_WINDOW_AUTOSIZE); imshow("image", img); waitKey(0); return 0; }

How load and display images with java using opencv

I am working with java usign opencv. Basically I want to read and display an image using opencv functions. I wanted to translate the next code from c++ to java but i dont find the same opencv functions for java.

 include "opencv2/highgui/highgui.hpp"

"opencv2/highgui/highgui.hpp" include "iostream"

"iostream" using namespace cv; using namespace std; int main(){ Mat img = imread("lena.png", CV_LOAD_IMAGE_COLOR); if (img.empty()){ cout << "Cannot load image!" << endl; return -1; } namedWindow("image", CV_WINDOW_AUTOSIZE); imshow("image", img); waitKey(0); return 0; }

}
click to hide/show revision 3
retagged

updated 2014-04-10 01:49:36 -0600

berak gravatar image

How load and display images with java using opencv

I am working with java usign opencv. Basically I want to read and display an image using opencv functions. I wanted to translate the next code from c++ to java but i dont find the same opencv functions for java.


include "opencv2/highgui/highgui.hpp"
include "iostream"
using namespace cv;
using namespace std;
int main(){
Mat img = imread("lena.png", CV_LOAD_IMAGE_COLOR);
    if (img.empty()){
    cout << "Cannot load image!" << endl;
    return -1;
    }
namedWindow("image", CV_WINDOW_AUTOSIZE);
imshow("image", img);
waitKey(0);
return 0;
}
 

How load and display images with java using opencvopencv [SOLVED]

I am working with java usign opencv. Basically I want to read and display an image using opencv functions. I wanted to translate the next code from c++ to java but i dont find the same opencv functions for java.


include "opencv2/highgui/highgui.hpp"
include "iostream"
using namespace cv;
using namespace std;
int main(){
Mat img = imread("lena.png", CV_LOAD_IMAGE_COLOR);
    if (img.empty()){
    cout << "Cannot load image!" << endl;
    return -1;
    }
namedWindow("image", CV_WINDOW_AUTOSIZE);
imshow("image", img);
waitKey(0);
return 0;
}