Computer Vision with OpenCV

Codes and executables for Windows, openFrameworks 0.074, Visual Studio Express 2010 C++: Download

Motion detection

Image Filtering

Image Filtering

Perspective distortion removing

Perspective Removing Perspective removing

Searching bright objects

Optical flow and video morphing

5 thoughts on “Computer Vision with OpenCV

  1. Rodrigo Torres

    Hi, I’m hacking your example code of optical flow but when I use the texture from flowX (an IplImage) via it’s getTextureReference() method to put it in a shader or to draw it I only get one direction, apparently only the positive values.

    Did you have the same isue? some idea?


    BTW Congrats for your book.

    1. perevalovds Post author

      Hi, thanks for the question!
      The issue is that getTextureReference() returns 8-bit texture (even for float-valued images), so it represents just positive values and truncates negatives to zero.
      To solve the issue you need to build float-values texture directly:

      ofFloatPixels &pixelsF = flowX.getFloatPixelsRef();
      ofTexture textureF;

      best regards,


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s