Skip to content

Commit

Permalink
head files dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlyqing00 committed Oct 9, 2018
1 parent 0ce7084 commit 81fa521
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.o
*.d
StripeReassembly
20 changes: 13 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,28 @@ OPT_FLAGS = -O3
CXX = g++
CXX_FLAGS = $(OPT_FLAGS) --std=c++17 -Wall

LIBS = -llept -ltesseract
INCLUDES = -I./include/
OPENCV_INCS = -I/usr/include/opencv2
OPENCV_LIBS = -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_datasets -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_line_descriptor -lopencv_optflow -lopencv_video -lopencv_plot -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_rgbd -lopencv_viz -lopencv_surface_matching -lopencv_text -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml -lopencv_xphoto -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_photo -lopencv_imgproc -lopencv_core
TESSARACT_LIBS = -llept -ltesseract

src_dir = ./src/
dst_dir = ./
src = $(wildcard $(src_dir)*.cpp)
obj = $(patsubst %.cpp, %.o, $(src))
obj = $(src:.cpp=.o)
dep = $(src:.cpp=.d)

default: StripeReassembly
.PHONY: clean

StripeReassembly: $(obj)
$(CXX) $< $(LIBS) -o $(dst_dir)$@

%.o: %.cpp
$(CXX) $< $(CXX_FLAGS) $(INCLUDES) -c -o $@
$(CXX) -c $< -o $@ -MMD $(CXX_FLAGS) $(INCLUDES) $(OPENCV_INCS)

-include $(dep)

StripeReassembly: $(obj)
$(CXX) $< $(TESSARACT_LIBS) $(OPENCV_LIBS) -o $(dst_dir)$@

clean:
rm $(dst)StripeReassembly $(src_dir)*.o
rm $(dst)StripeReassembly $(obj) $(dep)

3 changes: 3 additions & 0 deletions include/generate_stripes.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#ifndef GENERATE_STRIPES_H
#define GENERATE_STRIPES_H

#include <opencv2/opencv.hpp>

class GenerateStripes {

public:
GenerateStripes();

};

#endif
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ int main()
// delete [] outText;

api->Recognize(0);
int b;
tesseract::ResultIterator* ri = api->GetIterator();
tesseract::PageIteratorLevel level = tesseract::RIL_SYMBOL;
if (ri != 0) {
Expand Down

0 comments on commit 81fa521

Please sign in to comment.