Compare commits
No commits in common. "a2b69433e2213ae19f9f908522682cd6657e1696" and "78cca62c12aff45a590a9915d9385a239d4b6aed" have entirely different histories.
a2b69433e2
...
78cca62c12
|
@ -13,14 +13,14 @@ Mat Image::loadImage (string& image_path, uint64_t& x, uint64_t& y, uint64_t& w,
|
||||||
Mat loaded = imread(located_path, IMREAD_COLOR);
|
Mat loaded = imread(located_path, IMREAD_COLOR);
|
||||||
Mat image = getBlank();
|
Mat image = getBlank();
|
||||||
|
|
||||||
if (loaded.empty()) {
|
if (image.empty()) {
|
||||||
cerr << "Image " << loaded << " empty" << endl;
|
cerr << "Image " << image << " empty" << endl;
|
||||||
} else {
|
} else {
|
||||||
cout << "Loaded image " << image_path << endl;
|
cout << "loaded " << image_path << endl;
|
||||||
//cout << " dim " << loaded.cols << "x" << loaded.rows << endl;
|
cout << " dim " << loaded.cols << "x" << loaded.rows << endl;
|
||||||
|
|
||||||
resize(loaded, loaded, Size(h, w));
|
//resize(loaded, resized, Size(1280, 1080));
|
||||||
//cout << " image " << image.cols << "x" << image.rows << endl;
|
cout << " image " << image.cols << "x" << image.rows << endl;
|
||||||
//cout << "resized " << resized.cols << "x" << resized.rows << endl;
|
//cout << "resized " << resized.cols << "x" << resized.rows << endl;
|
||||||
//resized.copyTo(image(Rect(0, 0, resized.cols, resized.rows)));
|
//resized.copyTo(image(Rect(0, 0, resized.cols, resized.rows)));
|
||||||
loaded.copyTo(image(Rect(x, y, loaded.cols, loaded.rows)));
|
loaded.copyTo(image(Rect(x, y, loaded.cols, loaded.rows)));
|
||||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
uint16_t PORT = 8081;
|
const uint16_t PORT = 8081;
|
||||||
const uint16_t BUFFER_SIZE = 2048;
|
const uint16_t BUFFER_SIZE = 2048;
|
||||||
|
|
||||||
GLuint imageTexture = 0;
|
GLuint imageTexture = 0;
|
||||||
|
@ -68,6 +68,7 @@ void actionStop () {
|
||||||
|
|
||||||
void loadBlank () {
|
void loadBlank () {
|
||||||
Mat blank = img.getBlank();
|
Mat blank = img.getBlank();
|
||||||
|
|
||||||
glGenTextures(1, &blankTexture);
|
glGenTextures(1, &blankTexture);
|
||||||
glBindTexture(GL_TEXTURE_2D, blankTexture);
|
glBindTexture(GL_TEXTURE_2D, blankTexture);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
|
@ -236,10 +237,7 @@ uint8_t handleArgs (int argc, char** argv) {
|
||||||
cerr << "Please provide screen height as second argument" << endl;
|
cerr << "Please provide screen height as second argument" << endl;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
if (argc > 3) {
|
cout << screenWidth << "x" << screenHeight << endl;
|
||||||
PORT = (uint16_t) atoi(argv[3]);
|
|
||||||
cout << "Set port: " << PORT << endl;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +252,7 @@ int main (int argc, char** argv) {
|
||||||
|
|
||||||
glutInit(&argc, argv);
|
glutInit(&argc, argv);
|
||||||
glutInitDisplayMode(GLUT_SINGLE);
|
glutInitDisplayMode(GLUT_SINGLE);
|
||||||
glutCreateWindow("filmout_display");
|
glutCreateWindow("opengl_opencv_example");
|
||||||
glutSetCursor(GLUT_CURSOR_NONE);
|
glutSetCursor(GLUT_CURSOR_NONE);
|
||||||
glutFullScreen();
|
glutFullScreen();
|
||||||
glutDisplayFunc(display);
|
glutDisplayFunc(display);
|
||||||
|
|
Loading…
Reference in New Issue