ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

sirasistant's profile - activity

2015-11-19 11:46:37 -0500 received badge  Good Question (source)
2015-07-20 06:51:07 -0500 received badge  Nice Question (source)
2015-06-16 05:00:56 -0500 received badge  Famous Question (source)
2014-10-07 11:57:24 -0500 received badge  Notable Question (source)
2014-10-07 11:57:24 -0500 received badge  Popular Question (source)
2014-07-30 10:11:47 -0500 commented answer How to integrate tesseract-ocr library in a catkin project?

That was it! thank you very much :D

2014-07-30 10:11:17 -0500 received badge  Supporter (source)
2014-07-30 10:11:13 -0500 received badge  Scholar (source)
2014-07-29 16:47:37 -0500 received badge  Student (source)
2014-07-29 13:23:42 -0500 edited question How to integrate tesseract-ocr library in a catkin project?

Hi, I have no idea of how to integrate the tesseract-ocr library to my project, i use qt creator to code and the library is correctly installed since Qtcreator autocompletes the lines where i use the library but this code fails to compile

#include "text_detector.h"
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <tesseract/baseapi.h>

image_transport::Subscriber sub;
image_transport::Publisher imPub;
ros::Publisher textPub;
tesseract::TessBaseAPI tess;

void onImageReceived(const sensor_msgs::ImageConstPtr& msg){

}

int main (int argc, char* argv[]){
    ros::init(argc,argv,"text_detector");
    ros::NodeHandle nh;
    ROS_INFO_STREAM("Starting text detection");
    image_transport::ImageTransport it(nh);
    imPub = it.advertise("camera_hsv",1);
    tess.Init(NULL,"eng",tesseract::OEM_DEFAULT);
    sub = it.subscribe("camera_raw",1,&onImageReceived);
   // textPub=nh.advertise<>("text",1000);
    ros::spin();
}

with this compilation error

text_detector.cpp:-1: error: undefined reference to tesseract::TessBaseAPI::TessBaseAPI()' text_detector.cpp:-1: error: undefined reference totesseract::TessBaseAPI::~TessBaseAPI()'

How can i add the library to the project in the cmakelists.txt? Thanks!