Problems with Opencv in Qt creator

2

The program does not have any errors in the build, but when I run the code it has the following message:

  

libopencv_core.so.3.4: can not open shared object file: No such file or directory

The .pro file looks like this:

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Pixel_manipulation
TEMPLATE = app

INCLUDEPATH += /usr/local/include/opencv2
SOURCES += main.cpp\
    mainwindow.cpp

HEADERS  += mainwindow.h

FORMS    += mainwindow.ui

LIBS += -L/usr/local/lib/
LIBS += -lopencv_core
LIBS += -lopencv_highgui
LIBS += -lopencv_imgcodecs
LIBS += -lopencv_imgproc
LIBS += -lopencv_features2d
LIBS += -lopencv_calib3d
LIBS += -lz

The code I try to run:

#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>

using namespace cv;
using namespace std;
MainWindow::MainWindow(QWidget *parent) :
 QMainWindow(parent),
   ui(new Ui::MainWindow)
{
ui->setupUi(this);
Mat image;
image = imread("bolhas.jpeg",CV_LOAD_IMAGE_GRAYSCALE);
namedWindow( "Display window", WINDOW_AUTOSIZE );
  imshow("imagem",image);

}

MainWindow::~MainWindow()
{
  delete ui;
}

I'm using Ubuntu 14.04 and Opencv 3.3

    
asked by anonymous 28.12.2017 / 17:03

0 answers