SSARCandy / Coherent-Line-Drawing

🖼✨Automatically generates line drawing from a photograph
https://ssarcandy.tw/2017/06/26/Coherent-Line-Drawing/
MIT License
556 stars 61 forks source link

Linux build: GTK issues #11

Closed apple314159 closed 5 years ago

apple314159 commented 6 years ago

I did a build on Linux. When I ran the generated executable I got the error:

$ ./Coherent-Line-Drawing (Coherent-Line-Drawing:1385): Gtk-ERROR **: 17:42:02.514: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped)

Before I dig deeper into this problem, has anyone else built a Linux version?

Balupurohit23 commented 5 years ago

I did a build on Linux. When I ran the generated executable I got the error:

$ ./Coherent-Line-Drawing (Coherent-Line-Drawing:1385): Gtk-ERROR **: 17:42:02.514: GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported Trace/breakpoint trap (core dumped)

Before I dig deeper into this problem, has anyone else built a Linux version?

No, even I am having issues in the building. Have you built it?

SSARCandy commented 5 years ago

which platform you use?

SSARCandy commented 5 years ago

I have just tried it on ubuntu, here is the step by step instructions:

# install opencv pkg
$ sudo apt-get install libopencv-dev libcv-dev

# install wxwidget pkg
$ sudo apt install libwxgtk3.0-0v5-dbg libwxgtk3.0-dev

# build project
$ mkdir build
$ cd build
$ cmake ..
$ make

I didn't face any issue to run the program, can you provide your environment?

Balupurohit23 commented 5 years ago

I have just tried it on ubuntu, here is the step by step instructions:

# install opencv pkg
$ sudo apt-get install libopencv-dev libcv-dev

# install wxwidget pkg
$ sudo apt install libwxgtk3.0-0v5-dbg libwxgtk3.0-dev

# build project
$ mkdir build
$ cd build
$ cmake ..
$ make

I didn't face any issue to run the program, can you provide your environment?

Hi, I am using ubuntu 16.04 LTS 64-bit. I tried your steps but I got the following error about the scope during the last step.

Scanning dependencies of target Coherent-Line-Drawing
[ 16%] Building CXX object CMakeFiles/Coherent-Line-Drawing.dir/src/main.cpp.o
[ 33%] Building CXX object CMakeFiles/Coherent-Line-Drawing.dir/src/ETF.cpp.o
[ 50%] Building CXX object CMakeFiles/Coherent-Line-Drawing.dir/src/CLD.cpp.o
[ 66%] Building CXX object CMakeFiles/Coherent-Line-Drawing.dir/src/postProcessing.cpp.o
/home/User/Jupyter/Torch/segmentation/Coherent-Line-Drawing-master/src/postProcessing.cpp: In member function ‘void PP::FlowField(cv::Mat&, cv::Mat&)’:
/home/User/Jupyter/Torch/segmentation/Coherent-Line-Drawing-master/src/postProcessing.cpp:66:61: error: ‘arrowedLine’ was not declared in this scope
    arrowedLine(dis, p, p2, Scalar(255,0,  0), 1.5, 8, 0, 0.3);
                                                             ^
CMakeFiles/Coherent-Line-Drawing.dir/build.make:134: recipe for target 'CMakeFiles/Coherent-Line-Drawing.dir/src/postProcessing.cpp.o' failed
make[2]: *** [CMakeFiles/Coherent-Line-Drawing.dir/src/postProcessing.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/Coherent-Line-Drawing.dir/all' failed
make[1]: *** [CMakeFiles/Coherent-Line-Drawing.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
SSARCandy commented 5 years ago

think your opencv is not higher than 3.0, you can comment out that line if you cannot install opencv > 3.0

Balupurohit23 commented 5 years ago

think your opencv is not higher than 3.0, you can comment out that line if you cannot install opencv > 3.0

My OpenCV version is '3.4.4'.

SSARCandy commented 5 years ago

then it should not have the error, can you check is the opencv version you linked is correct?