I'm learning OpenCV on Windows and I am using Code::bloks. When I call the funciotion of imshow() it will show a pop up window where is the image. The problem is that I can't zoon this windows so I can't see pixels values.
You can't zoom in an OpenCV default Window, this is not functionality built into the core OpenCV libraries
You can however build this functionality yourself, especially if you build using Qt. Here is an example
Related
Aim
To run my OpenGL application in a computer with no OpenGL set up.
Process
I start a new Win32 Console Application with Visual Studio 2013
Using C++
GLUT and OpenGL libraries are linked to my project
Display mode : GLUT_RGB | GLUT_DOUBLE
Can build without error and it runs as expected in my computer
Copy just the Project\Release\Project.exe and glut32.dll to other computers with no OpenGL set up neither Visual Studio installed.
In some computers my application runs perfectly.
In the others my application runs with black screen displayed in the OpenGL window which is expected to display graphics.
The command-line interface and the OpenGL window are both active. There are keyboard events in my application by introducing the function glutKeyboardFunc(). When I press a specific key there is an update shown in the command-line interface so I know the command-line interface and the OpenGL window are active. The latter just does not display anything but black.
Look For
Answers for why my application displays differently from computer to computer
Solutions for this
Please bear with my English and stupidity...
Solved... Thanks guys
I used gluPerspetive() and gluLookAt() in my application.
On some computers they do not have glu.dll, so the glu functions in my application are not available on them, resulting in nothing displayed.
Simply I send glu.dll and glu.lib together with my .exe and it works...
I'm trying to create a borderless window in Qt on Windows which supports native features: aero snap, DWM resize and minimization, shake, etc.
Like Office 2013 or Visual Studio 2012. But they are written in wpf.
There are a lot of examples in wpf and pure WinApi, but I wasn't able to find any Qt example.
Recently I've found Blizzard's Battle.net App(screenshot). They are using QT 4.8.5 and their main window looks and behaves exactly as I want in my app.
Does anyone know how to do that?
Thanks for your help.
I've found a workaround for this problem.
Instead of using Qt main window, i've created a simple WinAPI borderless window, like in this SO discussion. Then i added QWinWidget from QtWinMigrate project, and filled window with it.
As result, main window and resizable edges are handled by WinAPI, and everything inside main window is handled by QWinWidget. And with QWinWidget you can create Qt gui like in any other Qt app.
Here is a small example project on GitHub.
Perhaps this might help you, Windows specific Qt classes WinExtras
http://qt-project.org/doc/qt-5/qtwin.html
http://qt-project.org/doc/qt-5/qtwinextras-module.html
Besides you can use QT Quick 2.0 to design UI similar to WPF
I do not use linux x11 windows system, and keep same font family on these two OS, and turn the text to image then save it.I use tahoma.ttf font in QT,set styleStrategy to NoAntialias and set font point size to 7, but on windows
"e""a" looks pretty good on windos.
But on linux :
I am pretty sure the font size is same, because if set pointsize to 8, e will cost 5x6 pixel.
I try the freetype lib on windows not using QT. The result is almost the same with QT in window, so I wonder how to make text the same with windows style.
It looks like that QT 4.7.4 have did included freetype lib, and I try the freetype interface in Qt lib, it shows the same effect with original no modifed Qt qfontengine_ft.cpp.
I have written an openCV code and my code has following statement:
cv::imshow("Matches", matchesImg);
cv::waitKey(0);
When I run the code either in Debug or Release I am not able to see window which shows me the output.
And this is happening for every project I create.
Not able to figure out the reason, Can someone please guide me on this?
I am coding on Windows 7 and Visual studio 2010, with opencv version of 2.4.6
As I mentioned in the comments, you have to create a window first, using namedWindow with the same window name as in imshow
See this tutorial for details.
EDIT
This strongly suggest that you have to create the window beforehand.
Some may argue that it didn't work this way for previous versions of OpenCV. Then, let's say this solution apply at least to OpenCV 2.4.6, which is the version of concern here (and it solved the problem).
I am using DetourCreateProcesswithDLL in Visual Studio 2010 and providing replacement dlls for Opengl32.dll , glu32.dll and glut32.dll while creating process for abgr.exe demo application from glut demo programs.
That way I am intercepting Opengl32, glu32, glut32 libraries. The apis then call the respective apis from the system folder or usual dlls.
These dlls have all the apis defined in their respective libraries.
Problem is that wglMakeCurrent returns 0 or fails with glut demo app like abgr.exe on NVidia GTX480 on Win 7 x64 bit. It doesnt work with other demo apps either.
It does work if i change the Compatibility of the abgr.exe or the GLIntercept executable which is invoking DetourCreateProcesswithDLL. i.e. right click on exe -> change properties ->Compatilibity ->Check Run in 256 colors.
However this looks like a work around and the display doesn't look all that good. How can i use without have to do that. How to get a good value for wglMakeCurrent.
wglMakeCurrent is called from within glutCreateWindow.
This is not a problem on the AMD Fusion GPU. There wglMakeCurrent and returns a good value. The problem is only on NVIDIA GTX 480. Does anyone know how to fix this problem? I have updated the driver and shows version 4.3.790.0 on the NVIDIA Control Panel Help->About
wglCreateContext returns 0x00010000