Git Product home page Git Product logo

Comments (16)

JackLongKing avatar JackLongKing commented on July 17, 2024 1

if you only use opencv-python, maybe you can use pse module in python way offered by author. If you want to use pse module in C++, modify the Makefile, and my Makefile looks like:
`
CXXFLAGS = -I include -std=c++11 -O3 -I/home/gulong/mylib/opencv_ruliang/include

DEPS = lanms.h $(shell find include -xtype f)
CXX_SOURCES = adaptor.cpp include/clipper/clipper.cpp

OPENCV =-Wl,-rpath=/home/gulong/opencv_ruliang/lib/

LIB_SO = adaptor.so

$(LIB_SO): $(CXX_SOURCES) $(DEPS)
$(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(CXX_SOURCES) --shared -fPIC $(OPENCV)

clean:
rm -rf $(LIB_SO)
`
Modify the path of opencv, and make again. @ huziling

from psenet.

huziling avatar huziling commented on July 17, 2024

i uninstall opencv 4.xx and try opencv 3.4.5 and it still not work

from psenet.

huziling avatar huziling commented on July 17, 2024

i also try a opecv 3.1.0 and still not work . May you give me a adaptor.so. Thanks

from psenet.

JackLongKing avatar JackLongKing commented on July 17, 2024

I met this too! Make sure your opencv in /usr/include/ dir or modify the Makefile to config your opencv. @ @huziling

from psenet.

huziling avatar huziling commented on July 17, 2024

I met this too! Make sure your opencv in /usr/include/ dir or modify the Makefile to config your opencv. @ @huziling

my opencv is opencv-python, and i find lot`s of file like libopencvxxx.so in /usr/include/
i try pkg-config --cflags --libs opencv and the result is

-I/usr/include/opencv /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so -lopencv_calib3d /usr/lib/x86_64-linux-gnu/libopencv_contrib.so -lopencv_contrib /usr/lib/x86_64-linux-gnu/libopencv_core.so -lopencv_core /usr/lib/x86_64-linux-gnu/libopencv_features2d.so -lopencv_features2d /usr/lib/x86_64-linux-gnu/libopencv_flann.so -lopencv_flann /usr/lib/x86_64-linux-gnu/libopencv_gpu.so -lopencv_gpu /usr/lib/x86_64-linux-gnu/libopencv_highgui.so -lopencv_highgui /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so -lopencv_imgproc /usr/lib/x86_64-linux-gnu/libopencv_legacy.so -lopencv_legacy /usr/lib/x86_64-linux-gnu/libopencv_ml.so -lopencv_ml /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so -lopencv_objdetect /usr/lib/x86_64-linux-gnu/libopencv_ocl.so -lopencv_ocl /usr/lib/x86_64-linux-gnu/libopencv_photo.so -lopencv_photo /usr/lib/x86_64-linux-gnu/libopencv_stitching.so -lopencv_stitching /usr/lib/x86_64-linux-gnu/libopencv_superres.so -lopencv_superres /usr/lib/x86_64-linux-gnu/libopencv_ts.so -lopencv_ts /usr/lib/x86_64-linux-gnu/libopencv_video.so -lopencv_video /usr/lib/x86_64-linux-gnu/libopencv_videostab.so -lopencv
it`s seem my opencv is in /usr/include/ ,

thank for your reply, but i still can`t solve this problem

from psenet.

huziling avatar huziling commented on July 17, 2024

Thanks for your help!!! I will try install opencv with source code

from psenet.

soldier828 avatar soldier828 commented on July 17, 2024

当我在编译 pse相关文件的时候遇到了这个报错
adaptor.cpp:35:86: error: ‘connectedComponents’ was not declared in this scope
我的环境中的opencv 分别是pip 安装的opencv-python 版本为4.0.0 和 4.1.0
gcc g++ 版本为5.4
请问这个问题是怎么回事呢?
是否需要安装低版本的opencv 或者是需要 从源码编译opencv
@whai362

Did you solve it ?

from psenet.

huziling avatar huziling commented on July 17, 2024

hi! 我最近下载了opencv的源码 并且make了 我下载的位置在 /mnt/3T/xxx/opencv
其中有 /mnt/3T/xxx/opencv/include 和 /mnt/3T/xxx/opencv/build/lib/
这是是否意味着我应该修改Makefile 为:
CXXFLAGS = -I include -std=c++11 -O3 -I /mnt/3T/xxx/opencv/include
DEPS = lanms.h $(shell find include -xtype f)
CXX_SOURCES = adaptor.cpp include/clipper/clipper.cpp
OPENCV =-Wl,-rpath=/mnt/3T/xxx/opencv/build/lib/
LIB_SO = adaptor.so
$(LIB_SO): $(CXX_SOURCES) $(DEPS)
$(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(CXX_SOURCES) --shared -fPIC $(OPENCV)
clean:
rm -rf $(LIB_SO)
我在尝试如此修改后
会提示
/bin/sh: 1: /mnt/3T/xxx/opencv/include: Permission denied
/bin/sh: 1: /mnt/3T/xxx/opencv/build/lib/: Permission denied
cc1plus: warning: adaptor.cpp: not a directory
并且在测试时会出现dynamic module does not define init function (initadaptor)
请问你有什么见解吗
@JackLongKing @whai362

from psenet.

huziling avatar huziling commented on July 17, 2024

当我在编译 pse相关文件的时候遇到了这个报错
adaptor.cpp:35:86: error: ‘connectedComponents’ was not declared in this scope
我的环境中的opencv 分别是pip 安装的opencv-python 版本为4.0.0 和 4.1.0
gcc g++ 版本为5.4
请问这个问题是怎么回事呢?
是否需要安装低版本的opencv 或者是需要 从源码编译opencv
@whai362

Did you solve it ?
我仍未解决这个问题,只能采用了另外一个使用python版 opencv的pse,虽然比起纯python的pse快,但是仍然达不到纯c++版本的速度

from psenet.

duoduo1234 avatar duoduo1234 commented on July 17, 2024

@JackLongKing,我用你所提到,MAKE了OPENCV,然后Makefile如你所说修改,结果adaptor.so生成了。可是运行test_ic15.py的时候,又发生了错误:
ImportError: ………………/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv
我是CUDA10,PYTHON2.7

from psenet.

huziling avatar huziling commented on July 17, 2024

@JackLongKing,我用你所提到,MAKE了OPENCV,然后Makefile如你所说修改,结果adaptor.so生成了。可是运行test_ic15.py的时候,又发生了错误:
ImportError: ………………/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv
我是CUDA10,PYTHON2.7
我也遇到了这个问题,我最终的解决方法是删除了所有旧版本的opencv文件,将编译的opencv装进user/local 并写道全局路径中,然后不改动makefile

from psenet.

duoduo1234 avatar duoduo1234 commented on July 17, 2024

@huziling 那你的FPS值正常吗?

from psenet.

huziling avatar huziling commented on July 17, 2024

from psenet.

hetianduan avatar hetianduan commented on July 17, 2024

@JackLongKing,我用你所提到,MAKE了OPENCV,然后Makefile如你所说修改,结果adaptor.so生成了。可是运行test_ic15.py的时候,又发生了错误:
ImportError: ………………/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv
我是CUDA10,PYTHON2.7

你好,你的问题解决了吗 我的情况和你一样

from psenet.

pilhoon avatar pilhoon commented on July 17, 2024

try this.

  1. install opencv 3.4 from source
  2. modify pse/Makefile
    from OPENCV = pkg...blabla to OPENCV = -I/usr/local/include/opencv -I/usr/local/include -L/usr/local/lib64 -lopencv_dnn -lopencv_highgui -lopencv_ml -lopencv_objdetect -lopencv_stitching -lopencv_shape -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_videoio -lopencv_imgcodecs -lopencv_features2d -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core
  3. at command line, export LD_LIBRARY_PATH=/usr/local/lib64
  4. then make (be sure that pse/adaptor.so does not exist. After the make you will have one.)

from psenet.

HongChow avatar HongChow commented on July 17, 2024

@JackLongKing,我用你所提到,MAKE了OPENCV,然后Makefile如你所说修改,结果adaptor.so生成了。可是运行test_ic15.py的时候,又发生了错误:
ImportError: ………………/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv
我是CUDA10,PYTHON2.7

你好,你的问题解决了吗 我的情况和你一样
我的问题和你们一样, 请问你们解决了没?

from psenet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.