How to correctly read Mat images with special characters in filename

You might have noticed that trying to read images that have special characters (such as Ü, Ö or other non-Ascii characters) with imread function in  OpenCV will lead to crash. I noticed this while trying to open files with special Turkish characters (but I assume it is the same with Spanish, French, German or any other languages.) If you are using Qt, you are lucky because there is a workaround.

Continue reading “How to correctly read Mat images with special characters in filename”

How to Open Android Image Gallery in Qt

This article describes how to open default Android Gallery in Qt using a mixture of Android’ Java and Qt (C++) code. It is specially useful if you are working with images, for example if you want to open a Mat Image in OpenCV using imread function or if you are just writing some kind of image viewer program. Unfortunately Qt does not offer this (yet) by default so I thought I could share it with you.

Continue reading “How to Open Android Image Gallery in Qt”

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”

Download Template Project – Qt for Android (with OpenCV)

I start Qt for Android projects all the time and setting up all the required folders and including libraries can take some time, assuming that I don’t make any mistakes during the initialization of the project. Previously I had posted this about how to add OpenCV libraries to your Qt for Android project but it proved to be not enough and I also receive questions about how to create a correct project with OpenCV all the time.

Continue reading “Download Template Project – Qt for Android (with OpenCV)”