Code

Code: Computer Vision Demos

I was in Paris last week in order to give some lectures for a continuous training curriculum where I teach mostly 3D reconstruction and optical flow computation. Preparing these lessons has kept me busy a few nights, but we had again this year some very positive feedback about our way of teaching those sometimes complex matters. A huge part of our students satisfaction comes from the many demos that we’re using to illustrate the various formula that pop up during the lessons.

Local NL-means, a first experiment

This is (finally) a follow-up to my latest post!

Nouveaux types dans OpenCV

Etrennant une nouvelle machine, j’essayais de recompiler gentiment mon code de thèse avec la dernière version d’OpenCV obtenue depuis github. Et là, horreur, fureur et tremblement ! Les scripts de compilation se bloquent à de nombreuses reprises sur des symboles inconnus, et même llvm n’arrive pas à suggérer de substitutions pertinentes… Un tour rapide sur la page de doc suffit à voir qu’elle n’est pas alignée sur les dernières révisions… J’ai donc dû aller explorer un peu le code source.

A simple CUDA kernel + mex file (part 1)

In the previous post, I introduced the various problems that I have encountered when I had to install some external CUDA library on our Mac workstations. In this post and the next, I will take a simple example (moving data from array A to array B through the GPU) to show how I finally achieved this installation process. While the application is not really useful, it demonstrates all the various tips and tricks that we applied.

Code repo updated

Some updates I’m quietly updating the github depot associated with this blog. If you sync the code regularly, you may have already noticed the apparition of movies a few weeks ago. They will be useful when the optical flow code will be online ;-) Today’s update brings hard and soft-thresholding, and a demo on how to use them for image denoising (in the DCT domain). Being original The implementation of soft-thresholding may seem a bit awkward to people familiar with it : the soft-thresholding is implemented via a shrinkage operation on the original coefficient, without explicit sign extraction.

Ligne de commande mencoder

On commence par mes plus plates excuses : la version anglaise du blog est toujours buggée, mais malheureusement je n’ai pas le temps de m’y consacrer :-( . Ouverture synthétique Pas le temps ? Eh oui, j’ai fini par succomber à la pression1 et je fait turbiner le Mac Pro de mon bureau2 sur de la synthèse d’ouverture optique. Comme en SAR, le principe est de combiner les images de plusieurs caméras (ou plusieurs observations d’une même scène, ça revient au même) pour simuler, mathématiquement, une caméra “plus grande”.

Création du dépôt Github

Chose promise, enfin due !

Mise à jour pour cv::Mat(cv::Rect()) avec OpenCV 2.4

Au détour d’une question sur StackOverflow, j’ai découvert qu’OpenCV 2.4 avait supprimé le mot-clé const de la fonction cv::Mat(cv::Rect()). On peut donc utiliser le résultat de cette fonction comme argument de la fonction copyTo(). La syntaxe suivante est désormais valide : cv::Mat bigMat(1024, 1024, CV_32FC1); cv::Mat someSmallData(256, 256, CV_32FC1); someSmallData.copyTo(bigMat(cv::Rect(xmin, ymin, xmin+256, ymin+256)); Avant, il aurait fallu d’abord créer un objet temporaire (en fait, juste un en-tête pour accéder au bon endroit de bigMat) pour obtenir une cv::Mat non constante, puis copier dans cette matrice temporaire.

Constance, pureté, et légèreté du code

Quelques réflexions suscitées par la lecture d’une entrée de blog par John Carmack (oui, M. Wolfenstein 3D “Doom sur Wikipedia], Quake… himself) sur un blog de développeurs de jeux vidéos.