Menu

ImageAccessCV::LoadFromFile

Help
2010-04-15
2013-05-09
  • Nobody/Anonymous

    Hello,

    I try to load a tiff image with ImageAccessCV.
    But if I try to compile this simple src code here,

    I have this error:

    /main.cpp|15|undefined reference to `ImageAccessCV::LoadFromFile(CByteImage*, char const*)'|

    #include <iostream>
    #include "Image/ImageProcessor.h"
    #include "Image/ImageProcessorCV.h"
    #include "Image/ImageAccessCV.h"
    #include "Image/ByteImage.h"
    using namespace std;
    int main(int argc,char **args)
    {
        CByteImage image;
        if(!ImageAccessCV::LoadFromFile(&image,"tool_scene.tiff")){
            printf("Fehler: konnte Bild nicht öffnen \n");
            return 1;
        }
        //convert color image to gray
        CByteImage gray_image(image.width, image.height, CByteImage::eGrayScale);
        ImageProcessor::ConvertImage(&image, &gray_image);
        gray_image.SaveToFile("output1.bmp");
       return 0;
    }
    

    I've seen this code on en example… but it's won't work.

    What do I wrong here?
    I try to compiling under ubuntu 9.10 with g++

    Thanks for your help! :)

     
  • Pedram Azad

    Pedram Azad - 2010-04-15

    Hi,

    you must set USE_OPENCV = 1 and USE_OPENCV_HIGHGUI = 1 in IVT/src/Makefile.base. Then run make in IVT/src. Then compile your application.

    Pedram

     
  • Nobody/Anonymous

    Hi,

    I forgott to say that I have set this variables. After changing this
    variables I have run this commands in /Ivt/src  :

    >make clean
    >make

    but it's not working. And make seems running without error..

     
  • Nobody/Anonymous

    I've solved it.
    I simple forgett to add the two new libs generated by make to the project proberties

    upsserla.. ;)

    Thanks!

     

Log in to post a comment.