Comments (10)
Sorry, all telepaths are in vacation.. Without a context it's hard to say what is wrong. According to this output, there is version conflict of Qt versions (4.8.5 and 4.8.4). You configured OpenCV to use Qt, did you?
from code.
Yeah i did configure OpenCV to use Qt. But how to i remove version 4.8.4 since i am new to opencv i dont know how to solve the problem. I configured opencv according yo the instructions in http://docs.opencv.org/2.4.4/doc/tutorials/introduction/windows_install/windows_install.html#installation-by-making-your-own-libraries-from-the-source-files
which enables the Qt version. I downloaded qt-everywhere-opensource-src-4.8.5 from http://qt-project.org/downloads and extracted it in a qt folder for which i have configured according to the instruction. I really want some help cause am stuck with trying to execute the code for past three weeks. I tried to execute a simple program to check the problem. This is the sample code i tried.
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
#include <opencv2\core\core.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <opencv2/core/opengl_interop.hpp>
#include
#include "E:\OpenCV\Build\cvconfig.h"
#ifndef HAVE_OPENGL
int main()
{
std::cerr << "Library was built without OpenGL support" << std::endl;
return -1;
}
#else
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN 1
#define NOMINMAX 1
#include <windows.h>
#endif
#if defined(APPLE)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
using namespace cv;
using namespace std;
void on_opengl(void* userdata);
int main(void)
{
VideoCapture webcam(CV_CAP_ANY);
namedWindow("window", CV_WINDOW_OPENGL);
Mat frame;
ogl::Texture2D tex;
setOpenGlDrawCallback("window", on_opengl, &tex);
while(waitKey(30) < 0)
{
webcam >> frame;
tex.copyFrom(frame);
updateWindow("window");
}
setOpenGlDrawCallback("window", 0, 0);
destroyAllWindows();
return 0;
}
void on_opengl(void* userdata)
{
ogl::Texture2D* pTex = static_castogl::Texture2D*(userdata);
if (pTex->empty())
return;
glLoadIdentity();
glTranslated(0.0, 0.0, 1.0);
glRotatef( 55, 1, 0, 0 );
glRotatef( 45, 0, 1, 0 );
glRotatef( 0, 0, 0, 1 );
static const int coords[6][4][3] = {
{ { +1, -1, -1 }, { -1, -1, -1 }, { -1, +1, -1 }, { +1, +1, -1 } },
{ { +1, +1, -1 }, { -1, +1, -1 }, { -1, +1, +1 }, { +1, +1, +1 } },
{ { +1, -1, +1 }, { +1, -1, -1 }, { +1, +1, -1 }, { +1, +1, +1 } },
{ { -1, -1, -1 }, { -1, -1, +1 }, { -1, +1, +1 }, { -1, +1, -1 } },
{ { +1, -1, +1 }, { -1, -1, +1 }, { -1, -1, -1 }, { +1, -1, -1 } },
{ { -1, -1, +1 }, { +1, -1, +1 }, { +1, +1, +1 }, { -1, +1, +1 } }
};
glEnable(GL_TEXTURE_2D);
pTex->bind();
for (int i = 0; i < 6; ++i) {
glColor3ub( i*20, 100+i*10, i*42 );
glBegin(GL_QUADS);
for (int j = 0; j < 4; ++j) {
glVertex3d(0.2*coords[i][j][0], 0.2 * coords[i][j][1], 0.2*coords[i][j][2]);
}
glEnd();
}
}
#endif
The code displays an error when it reaches the line namedWindow("window", CV_WINDOW_OPENGL); and setOpenGlDrawCallback("window", on_opengl, &tex); .
The same error comes when i try for the MarkerlessAR code at the same point. Could you please help solve this error. Please.
from code.
Also i have 2 versions of Microsoft sdk
C:\Program Files\Microsoft SDKs\Windows\v6.0A (old version)
C:\Program Files\Microsoft SDKs\Windows\v6.1 (new version )
am not sure which opengl version is being conisidered
from code.
Just remove all Qt versions you have, download the base 4.8.0 and recompile OpenCV with 4.8.0.
On Windows, latest Qt makes problems, unless you switch to Linux
from code.
But where can i get 4.8.0 source code version from. I tried to search for 4.8.4 and i couldn't find the link
from code.
Also I have a doubt if i install 4.8.0 will it show compatibility problem again. Could i get some link where i can download it from
from code.
You just look on Qt website and select "previous versions". On
www.pointclouds.org in Download section there is the link to Qt 4.8.0 for
MSVC2010
Am 10.02.2014 18:13 schrieb "Reena24" [email protected]:
Also I have a doubt if i install 4.8.0 will it show compatibility problem
again. Could i get some link where i can download it fromReply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-34656152
.
from code.
Thanks a lot i reconfigured using Qt 4.8.4 and now its executing with no problems.
from code.
Glad to hear!
from code.
Thanks a lot my Markerless AR code has finally started to execute but i cant understand one thing why does the cube keep on moving when using an image and camera as input
from code.
Related Issues (20)
- Code
- chapter 3 - Cube is flying/flashing everywhere HOT 1
- what is the purpose of "Normalized dimensions" in Chapter 3?
- Test. HTML
- smtp gmail com
- Please help to solve error in this Arduino code HOT 1
- Code
- Loops
- [usb-c] to [adapter] output [3] [hdmi] in [Sony-tv hdmi] [usb-c] to [adapter] output [3] [hdmi] in [Sony-tv hdmi] [usb-c] to [adapter] output [3] [hdmi] in [Sony-tv hdmi] [usb-c] to [adapter] output [3] [hdmi] in [Sony-tv hdmi] [usb-c] to [adapter] output [3] [hdmi] in [Sony-tv hdmi] [usb-c] to [adapter] output [3] [hdmi] in [Sony-tv hdmi] [usb-c] to [adapter] output [3] [hdmi] in [Sony-tv hdmi] HOT 1
- rin [email protected]
- Hiiii
- Chapter8 FaceRecognition: Some points and questions HOT 1
- CH4 almost there, but the linking failed at 100%
- ch3 how the orthographic projection matrix computed? HOT 1
- Chapter5_NumberPlateRecognition Seed point is outside of image
- 'cstddef' file not found HOT 1
- Installing SSBA on Ubuntu
- meet an error when combine the program and running for a while
- cartoonifier and skin changer
- Chapter2_iPhoneAR/AI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from code.