How to build OpenCV from source for VC14

OpenCV 2.4.11 users may have noticed that it does not provide pre-built binaries (Libs and DLLs) for VC14 (Visual Studio 2015) Unfortunately it is also the case with Qt 5.5.1 (At least it’s true at the time of writing this article) so if you are going to use either one of them you have to build it yourself.

I was also faced with this obstacle so I decided to write a guide for anyone who wishes to built OpenCV for VC14.To do that, just follow the steps below:

Continue reading “How to build OpenCV from source for VC14”

How to enumerate installed Windows Media Codecs in Qt

To get a list of all available Windows Media Codecs in Qt you have no other choice but to use C++ interfaces from Windows Media Format SDK. In this post I am sharing an example source code which allows you to do that in Qt. If you are developing using Qt and MSVC compilers for Windows then  you can definitely download this source code, build and run it for yourself.

Continue reading “How to enumerate installed Windows Media Codecs in Qt”

How to use VBScript in C++ (Using Qt)

In this article I’ll explain the process of combining C++ and VBScript codes together. There are many situations in which you find yourself in desperate need of some simple code that can handle what your program wants to do. An example that comes to my mind is using DDE Protocol in Windows. It can be heartbreaking to try and write a quick DDE handling program using C++. Well on the other hand it is extremely easy using VBScript. But I am not going to talk about DDE I this post. Search Google for “how to connect to DDE using VBScript” and combine that with what you learn from this post. So here it is:

Continue reading “How to use VBScript in C++ (Using Qt)”

How to make an application “Alway on Top” in C++ (For Qt and Win32)

I use the following method to make an application remain on top of other windows in Qt:

SetWindowPos
(
	(HWND)winId(),
	HWND_TOPMOST,
	window_top_pos,
	window_left_pos,
	window_width,
	window_height,
	SWP_SHOWWINDOW
);


Note that window_top_pos, window_left_pos, window_width and window_height are variables and you can replace them with your own.

Please be aware that this is a Win32 API function so it won’t work in Linux or MAC.

Don’t forget to add the include file to your code.

#include "windows.h"

And add the required library to your .PRO file.

LIBS += -luser32


Image Transformer (Fourier Transform App for Android)

UPDATE: This application is updated. Please read this post for more information.

My new application is a tool for for performing Fourier transformation on images. You can then apply masks to the Fourier representation of image and revert back (perform Inverse Fourier Transform) to see how the image gets affected.

For more information about Fourier Transform you can check out this link.

It is built using OpenCV and Qt and it is programmed completely in C++. I hope it would be useful for Image Processing and Machine Vision enthusiasts, researchers and students. It also contains some useful tips and tricks for programming Android applications using Qt and OpenCV such as:

  • How to open Android image gallery in Qt (Default interface)
  • How to capture images using default Android camera interface
  • How to crop images displayed on a QLabel
  • etc.



Source code (any part of it actually 🙂 ) is available upon request. Please send your requests using the Contact Me page.

Please consider supporting this application by giving a decent rating in Google Play.

For an example of Fourier transform using OpenCV please check out this link.

You can also see this link for more information about Fourier transform.

You can download this application from Google Play using the link below:

https://play.google.com/store/apps/details?id=com.amahta.ImageTransformer

trans_logo



OpenCV Feature Points Comparison Program (Executable + Source Code)

This program allows you to benchmark algorithms in OpenCV related to object detection using key points. It allows you to set all the required parameters using a simple interface and search for an object in a scene and view the results. This program is written in C++ using Qt and it uses OpenCV libraries.
Please note that this program should only be used for educational purposes. In my case I was using it for research purposes and as a tool for deciding which algorithm I should use in my programs.

Continue reading “OpenCV Feature Points Comparison Program (Executable + Source Code)”

How to connect to a COM library using Qt (An example of how to change Skype status using Qt and Skype4COM.DLL)

I wrote this program some time ago  to change my Skype status to Online and Away at different hours during the day. I decided I could share the source code because it is a good example on how to connect to a COM library using Qt.



Following should be noted about the source code provided in this post.

  • “skype4comlib” is produced using “dumpcpp” tool so you don’t need to create it yourself, and I also didn’t create it myself 🙂
    • Please refer to this link to get information on how to use dumpcpp.
  • Skype4COM library can be found here (usually)
    • C:Program Files (x86)Common FilesSkypeSkype4COM.DLL

Post a comment if there is anything confusing about the source code.

To test it just make sure Skype is running and just run the two Qt projects included in the source code.

Download