PSMM / SLIC-Superpixels

Implementation of the SLIC superpixel algorithm to work with OpenCV
292 stars 147 forks source link

Error when compiling code in xcode #10

Open Kanzll opened 6 years ago

Kanzll commented 6 years ago

Hi, I have this error when I tryed to compile the code

OpenCV Error: Bad argument (Bad image header) in cvCloneImage, file ~/Downloads/opencv-3.4.0/modules/core/src/array.cpp, line 3121 libc++abi.dylib: terminating with uncaught exception of type cv::Exception: ~/Downloads/opencv-3.4.0/modules/core/src/array.cpp:3121: error: (-5) Bad image header in function cvCloneImage

Thank you.

satvik007 commented 6 years ago

This make file works for me fine.

`CXX = g++ -Wall -std=c++0x

CXXFLAGS = -g -Wall pkg-config --cflags opencv

CXXFLAGS = pkg-config --cflags --libs opencv

LDFLAGS = -L/usr/local/opencv-2.4.5/lib -lopencv_world -lboost_filesystem -lboost_filesystem-mt

TARGET = test_slic SOURCE = $(TARGET).cpp slic.cpp

TARGET: $(CXX) -o $(TARGET) $(SOURCE) $(CXXFLAGS)

.PHONY: clean clean: rm -f .o ~ $(TARGET)`