Damiles Blog. A computer vision, OpenCV and IT technology blog.

  • Segmentation & object detection by color.

    In this tutorial i go to explain how to image segmentation or detect objects byred color, in this case by red color.

    This task is simple, but there are some things we must known.

    Now i go to explain and get a demo code for segmentation, how to determine if each image pixel is red or no, and then, i go to explain how we  can detect object, it's similar but with diferent concept.

    Read more
  • VIM how to remove ^M at the end of lines

    In unix the end of line is different than other systems. More times we edit windows files and when open in VI/VIM we see the ^M character at end of lines.

    We can remove this characters with a simply search and replace of vim with this command:


    The ^M character is not valid write first ^ character and then M it's not the valid character. To write correctly this we must push Control+v and Contro+M keys, then appear our ^M Character.

    Take care with this.

    Read more
  • Compile Opencv with Mac os Snow Leopard 10.6

    Today i try install OpenCv in my MacOs Snow Leopard 10.6 and have this error:

    error: CPU you selected does not support x86-64 instruction set

    Read more
  • The basics of background substraction

    This tutorial explain the basics of background substraction. First of all we need define what is a background and what is a foreground.

    We consider a background the pixels of image without motion. And a foreground the pixels with motion. Then the simplest background model assume each background pixel his brightness varies independently with normal distribution. Then we can calculate our statistical model of background by accumulating several dozens of frames and his squares, this is:

    $$ \displaystyle{S(x,y)=\sum_{f=1}^N p(x,y)}$$
    $$ \displaystyle{Sq(x,y)=\sum_{f=1}^N p(x,y)^2}$$

    Read more
  • BlenderOcv, "blender" can be good and powerful tool for computer vision with OpenCV

    This is the question: can be Blender a powerful tool for computer vision with OpenCv.

    Blender is now a powerful suite of 3d content creation, where have a various characteristich as animation, composit, shade, model, texture, interactive ... And OpenCV is ga powerful realtime library for computer Vision.

    Then my goal is provide a new and powerfull tool based on Blender for Computer Vision Tasks with OpenCV Library.

    How?, with a particular characteristic of Blender, the compositor node.

    Nodes are a good tool that provide a user interactive, each node is a box with inputs and outputs that implement a function. Each node have interactive parameters that user can be set.

    Read more

subscribe via RSS