Skip to content

Blog

Casting between Qt and OpenCV primitives

OpenCV & QT
OpenCV & QT.

As a follow-up to the previous post, I’d like to present some code which I think might be helpful for other Qt / OpenCV projects as well.

This code was written for Pastie. Pastie is a piece of software I wrote as part my image processing seminar. It makes use of the well known libraries:

  • Qt for the graphical user interface
  • OpenCV for image processing and computer vision

I wrote a C++ header file to facilitate the co-operation of those two libraries. This file enables the conversion / casting of OpenCV and Qt types e.g.:

#include <QImage>
#include <cv/core.hpp>
QImage qimg("filename.png");
cv::Mat cvimg = toCv(qimg);

The source code is available at Codeberg: /stv0g/snippets/c/qcv_cast.h .

The following conversions are supported:

QImagecv::Mat
QTransformcv::Mat
QPointcv::Point2i
QPointFcv::Point2f
QRectcv::Rect2i
QRectFcv::Rect2f
QSizecv::Size

You can find some examples in the real code here: /stv0g/pastie/filters/pattern.cpp and here /stv0g/pastie/cast.h .

Bachelor Thesis: Extended Abstract

Almost fourteen months ago, I started working on my bachelor thesis. Although I finished it half a year ago, it’s still part of my work as a student research assistant.

During my initial work, most of the code was written for an internal research kernel. I’m now happy that we were able to port it to an open source kernel called eduOS: /RWTH-OS/eduOS ). This minimal operating system is used for practical demo’s and assignments during the OS course at my university. There’s much more I could write about. So this will probably be another separate blog post.

The motive for this article is an abstract I wrote for the student research competition of the ASPLOS conference which is held this year in Istanbul, Turkey. Unfortunately my submission got rejected. But as a nice side-effect, I’ve now the chance to present my work to an English audience as well:

Download:Extended Abstract (PDF)

noteblok.{de,net,org,dn42}

noteblok

Dies ist das neue Logo und Name meines Blogs.

Bisher gab es hier nur wenige persönliche Beiträge. Da ich das auch so beibehalten möchte, habe ich mich entschlossen meinen Namen aus dem Titel zu streichen. Vielleicht findet so auch mal der ein oder andere Gastbeitrag seinen Weg hierher.

World IPv6 Launch Badge

Mit dem neuen Namen hat sich auch die Domain geändert. Der Blog ist nun erreichbar unter noteblok.{de,net,org,dn42}. Über meine persönliche Domain gelangt man nun direkt zu ein paar Infos über mich.

Neben den neuen Domains sind nun auch alle Webseiten/Blogs über IPv6 erreichbar 😊.

dn42 Logo

Zudem ist der Blog auf über des dn42 Darknet erreichbar. Das dn42 ist ein dezentrales und dynamisches VPN Netzwerk. Es besteht aus einem Verbund von Freiwilligen Admins, die jeweils Peer-to-Peer Verbindungen über VPNs herstellen. Es baut damit als Overlay Netzwerk auf dem bestehenden Internet auf. Zudem nutzt das dn42 mit BGP, DNS, Whois die gleichen Protokolle wie das reguläre Internet.

Als Teil von (/dev/nulll) betreibe ich das Autonome System AS4242422428 und unterhalte Peerings mit anderen Knoten des dn42 Netzwerkes.

Hier ist noch ein Screenshot meines Blog aus dem Jahr 2014:

Screenshot noteblok.net vom 2014-12-22
Screenshot noteblok.net vom 2014-12-22.

tileLED

tileLED
tileLED.

Und schon wieder habe ich ein kleines Hardwareprojekt, das ich hier vorstellen möchte. Auf eBay bin ich auf diese günstige LED Dot-Matrix Displaymodule gestoßen. Auf einer Größe von 3x3cm besitzen sie 8x8 rote oder grüne LEDs, die per Multiplexverfahren angesteuert werden.

Für diese Module habe ich eine kleine Platine designed, die nicht größer ist als das Modul selber. Die LEDs werden über einen kleinen ATmega8 Mikrocontroller direkt angesteuert. Auf Konstantstromquellen habe ich hier zugunsten der Platinengröße verzichtet. Auch wenn diese Beschaltung den ATmega etwas überlastet, funktioniert es super.

Platinen Layout
Platinen Layout.