cudnn: added OpenCV libs to Linux build.

This commit is contained in:
Alexey Kamenev 2015-12-03 18:52:05 +00:00
Родитель 5618b6c77a
Коммит 74999d4fc6
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -432,6 +432,8 @@ bool ImageReader<ElemType>::GetMinibatch(std::map<std::wstring, Matrix<ElemType>
{ {
const auto& p = files[i + m_mbStart]; const auto& p = files[i + m_mbStart];
cv::Mat img{ cv::imread(p.first, cv::IMREAD_COLOR) }; cv::Mat img{ cv::imread(p.first, cv::IMREAD_COLOR) };
if (!img.data)
RuntimeError("Cannot read image file " + p.first);
for (auto& t: m_transforms) for (auto& t: m_transforms)
t->Apply(img); t->Apply(img);

Просмотреть файл

@ -405,9 +405,12 @@ IMAGEREADER:=$(LIBDIR)/ImageReader.so
ALL += $(IMAGEREADER) ALL += $(IMAGEREADER)
SRC+=$(IMAGEREADER_SRC) SRC+=$(IMAGEREADER_SRC)
INCLUDEPATH += $(OPENCV_PATH)/include
LIBPATH += $(OPENCV_PATH)/release/lib
$(IMAGEREADER): $(IMAGEREADER_OBJ) | $(CNTKMATH_LIB) $(IMAGEREADER): $(IMAGEREADER_OBJ) | $(CNTKMATH_LIB)
@echo $(SEPARATOR) @echo $(SEPARATOR)
$(CXX) $(LDFLAGS) -shared $(patsubst %,-L%, $(LIBDIR) $(LIBPATH)) $(patsubst %,$(RPATH)%, $(ORIGINDIR) $(LIBPATH)) -o $@ $^ -l$(CNTKMATH) $(CXX) $(LDFLAGS) -shared $(patsubst %,-L%, $(LIBDIR) $(LIBPATH)) $(patsubst %,$(RPATH)%, $(ORIGINDIR) $(LIBPATH)) -o $@ $^ -l$(CNTKMATH) -lopencv_core -lopencv_imgproc -lopencv_imgcodecs
endif endif
######################################## ########################################