Ask Your Question

zazarb's profile - activity

2018-07-12 03:53:16 -0600 commented answer cv::log issue ?

Thanks, I was indeed using v3.1 of OpenCV where the documentation seemed to be incorrect. Best,

2018-07-12 03:49:33 -0600 received badge  Enthusiast
2018-07-11 08:47:40 -0600 asked a question cv::log issue ?

cv::log issue ? Hello, I have issues with the cv::log function. The documentations says that the cv::log function takes

2015-06-09 12:09:55 -0600 asked a question cv::namedWindow with QT button AND CV_WINDOW_OPENGL ?

Hello, I am trying to use opencv with opengl support. So far, using the provided example in the documentation and some help on the web I've managed to create a callback on a window created with opengl support that displays my webcam's video as a texture inside the window (see code below). However, when I add QT buttons to a control panel with cv::createButton() the control panel does not show, even if I use CV_GUI_EXPANDED (the mouse's right button menu doesnt show up). Is there something that I am doing wrong or is it not possible to combine QT and OpenGL ? Thanks for your help.

// ***MAIN***

// create window
cv::namedWindow("video", CV_GUI_EXPANDED | CV_WINDOW_OPENGL); 

// create buttons
char* calibBtn = "calibrate camera";
cv::createButton(calibBtn, CalibCallBack, &frame, QT_PUSH_BUTTON, 1);

setOpenGlContext("video");
resizeWindow("video", frame.cols, frame.rows);

ogl::Texture2D tex;
setOpenGlDrawCallback("video", on_opengl, &tex);

for (;;){
  // Do stuff on frame
  tex.copyFrom(frame); // copy current frame to texture
  updateWindow("video");
}

//*** CALLBACK ***
void on_opengl(void* userdata){
    ogl::Texture2D* pTex = static_cast<ogl::Texture2D*>(userdata);
        cv::Rect_<double> wndRect = Rect_<double>(0.0, 0.0, 1.0, 1.0);
    cv::Rect_<double> texRect = Rect_<double>(0.0, 0.0, 1.0, 1.0);
    ogl::render(*pTex, wndRect, texRect);
}
2015-05-09 06:58:34 -0600 commented question opengl support issue?

yeah ok my bad I just needed to include

include <windows.h>

include <gl gl.h="">

...

2015-05-09 02:59:29 -0600 commented question opengl support issue?

Hello,

Thanks for your help.

I did compile with opengl support : with getBuildInformation() I get OpenGL support : Yes (glu32, opengl32)

I have a window created with opengl context with namedWindow("video", WINDOW_OPENGL). When I compile the above described code, I still get the following compilation error with glLoadIdentity all all gl functions which seem not recongized:

error C3861: 'glLoadIdentity': identifier not foun

Would you have other explanations?

Thanks

2015-05-08 14:55:20 -0600 asked a question opengl support issue?

Hello,

I am on windows 7 32bits. I have installed opencv (the latest GIT sources) with opengl support. When I launch a simple test app that displays my webcam images in real-time, everything works fine, my console displays "opengl support available". However, when I create a simple opengl callback with the samples provided in the OpenCV documentation (see end of the email), the simples opengl function glLoadIdentity() returns an error "identifier is undefined".

I suspect that this is an include problem, but it was my understanding that it wasn't necessary to have OpenGL installed on the computer on windows to have OpenGL support with OpenCV. Am I wrong? Are there specific OpenCV include files (or OpenGL include files) that need to be included in addition to highgui to have OpenGL support work ?

Sorry if my question is irrelevant, but I have been looking for help for a while from different sources and could not find an answer. Thanks for any advice you can help with!

setOpenGlDrawCallback("video", onOpenGlDraw, void * userdata = 0); // in my main

void on_opengl(void* param){ // my simplistic callback glLoadIdentity(); }