Skip to content

netsy/densecut

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DENSECUT

densecut

This is an extension from jasonbunk's repo of MingMing Cheng's "DenseCut".

DenseCut's Project

Compile CmCode

  • Open terminal and Go into CmLib foler
    cd CmCode/CmLib

  • Add Makefile

    PROJECT := cmcode
    CXX_SRC := $(shell find . -name "*.cpp" ! -wholename "examples/.cpp")
    OBJ_FILES := ${CXX_SRC:%.cpp=%.o}
    DYNAMIC_LIB := lib$(PROJECT).so
    STATIC_LIB := lib$(PROJECT).a
    INCLUDE_DIRS := .
    LIBRARY_DIRS :=
    LIBRARIES := COMMON_FLAGS := -Wall -O2 -std=c++11 -fopenmp
    CXX_FLAGS := $(foreach include,$(INCLUDE_DIRS),-I$(include))
    LD_FLAGS := $(foreach lib,$(LIBRARY_DIRS),-L$(lib))
    LD_FLAGS := $(foreach lib,$(LIBRARIES),-l$(lib))
    all:obj lib
    lib:$(DYNAMIC_LIB) $(STATIC_LIB)
    obj:$(OBJ_FILES)
    %.o:%.cpp
    g++ -fPIC -c -o $@ $< $(COMMON_FLAGS) $(CXX_FLAGS)
    $(DYNAMIC_LIB):$(OBJ_FILES)
    g++ -shared -o $@ $(OBJ_FILES)
    $(STATIC_LIB):$(OBJ_FILES)
    ar rcs $@ $(OBJ_FILES)

  • Compile it and you will get 'libcmcode.a' and 'libcmcode.so'. Done.
    make

Compile DenseCut

  • Open terminal and Go into 'mmcheng_densecut' folder
    cd mmcheng_densecut

  • Compile it and you will get 'densecut'. Done.
    g++ *.cpp -O2 -Wall -I. -lcmcode -L../CmCode/CmLib -I../ -Wl,-rpath,../CmCode/CmLib -std=c++11 `pkg-config --libs --cflags opencv` -lomp -o densecut

    • Some erros occured. For example, "/usr/bin/ld: cannot find -lcufft", just locate libcufft and add the path to $LD_LIBRARY_PATH or $LIBRARY_PATH in the ~/.bashrc.

Demo

  • Run demo in 'mmcheng_densecut' and see the results in 'ASD/Sal4N'.
    ./densecut ./

  • Done.

Thanks Tianli Zhao for the compilation of this code in linux.

Releases

No releases published

Packages

No packages published

Languages

  • C++ 51.3%
  • HTML 39.3%
  • JavaScript 5.2%
  • CSS 1.7%
  • C 1.6%
  • MATLAB 0.9%