2

Recently I was turned on to the opencv programming library for image and data processing, and over the course of trying to get the software to work I've decided I'm simply fed up with how complicated it is to get the libraries onto my computer. Is there another library or framework that allows a user to interact with cameras and image processing in c++ but doesn't require such tedious work to obtain and install as OpenCV?

Edit: The reason I am having a hard time with opencsv is because I do not wish to use an IDE to develop any of my programs, I am trying to learn to use gdb from the cmd line and vim to edit

kjh
  • 3,407
  • 8
  • 42
  • 79
  • 1
    Eclipse has plugin and installing with updating. C++, java, ... http://opencv.willowgarage.com/wiki/Eclipse http://docs.opencv.org/doc/tutorials/introduction/linux_eclipse/linux_eclipse.html – huseyin tugrul buyukisik Sep 07 '12 at 21:16
  • Who said that you need an IDE to use OpenCV? – Sassa Sep 07 '12 at 22:31
  • I know you don't, but the method for installing and using opencv without an IDE is ridiculously complicated – kjh Sep 07 '12 at 22:57
  • 2
    You can just use the binaries without having to built anything, which is very easy. Download the latest, extract it, put the bin folder in the system path and you are done. Check also [this](http://stackoverflow.com/questions/10860352/getting-started-with-opencv-2-4-and-mingw-on-windows-7) which describes it very nice with pictures. – Sassa Sep 08 '12 at 03:47

3 Answers3

2

Could you specify which platform you are using and what problems you encountered?

I suspect that many of your problems are not related to OpenCV per se, but instead are general problems you would have with any C++ lib. E.g. getting a 64-bit compiler, a decent IDE, compiling OpenCV and if needed some of its dependencies. That can actually indeed become a nuissance. What platform are you using? I find that a Linux distribution with a good package repository makes this way easier, since you can very easily setup the required tools and often install many build dependencies via the repository without having to compile them yourself.

If indeed you are having strictly OpenCV-related issues, ITK (http://www.itk.org/) may well be a good alternative.

Best,

nobody
  • 21
  • 1
  • I am using windows 7. Prior to reading this I found a way to get the programs working but it is still not quite what I want. I do have a Linux machine I can attempt to get this working on at another location, I too have found in the past that getting certain things to install on Linux is much more hassle free. Thanks for the ITK reference as well. – kjh Sep 07 '12 at 21:45
1

You can use this in 8-steps

#include <cv.h>
#include <highgui.h>

using namespace cv;

int main( int argc, char** argv )
{
  Mat image;
  image = imread( argv[1], 1 );

  if( argc != 2 || !image.data )
    {
      printf( "No image data \n" );
      return -1;
    }

  namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
  imshow( "Display Image", image );

  waitKey(0);

  return 0;
}

in Linux.

Windows also needs 8-steps.

You can call MATLAB engine from C/C++ . Matlab has image-processing too!

huseyin tugrul buyukisik
  • 11,469
  • 4
  • 45
  • 97
  • I do not wish to use an IDE for my programming, but if I were to install the opencv plugin and libraries through eclipse, would I then be able to edit and compile my programs from the command line? – kjh Sep 07 '12 at 21:23
  • There are many command-line options/parameters and Eclipse uses them. But setting the path variables could be frustrating. – huseyin tugrul buyukisik Sep 07 '12 at 21:24
0

When I did a lot of image processing I would deal with Bitmaps. Read the file into memory and make note of the BITMAPFILEHEADER. There is more information but you could just look up the offset into the pixel data. You could use Directshow as well to get frames from a webcam.

Create a wrapper to expose some user friendly functions like getPixel() etc.

Then I would look up papers + blogs etc to see if I can write the algorithms myself, sometimes it's all too easy passing some image to say a FaceTracking(ImageData data) function.

Science_Fiction
  • 3,403
  • 23
  • 27