-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
59,034 additions
and
177,856 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
*.zip | ||
*.txt | ||
*.o | ||
*.a | ||
*.lo | ||
*.la | ||
*.so | ||
*.so.* | ||
.libs/ | ||
image_to_graph | ||
image_to_graph.out* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
-std=c++11 | ||
-stdlib=libstdc++ | ||
-I ./igraph/include |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
all: | ||
@echo "Build the dependencies, the local program and then run some tests:" | ||
@echo " make deps" | ||
@echo " make build" | ||
@echo " make tests" | ||
|
||
.PHONY: deps build tests clean cleandeps | ||
|
||
deps: | ||
@cd igraph && autoreconf -f -i && ./configure && cd .. | ||
$(MAKE) -C igraph | ||
g++ image_to_graph.cc -o image_to_graph -Wall -ligraph `pkg-config --cflags --libs opencv` | ||
|
||
config: | ||
cd igraph && ./configure && cd .. | ||
build: | ||
g++ image_to_graph.cc -o image_to_graph -Wall -I ./igraph/include -L ./igraph/src/.libs -ligraph `pkg-config --cflags --libs opencv` | ||
|
||
.PHONY: clean allclean | ||
tests: | ||
@echo "Test: Lena" | ||
LD_LIBRARY_PATH=./igraph/src/.libs ./image_to_graph assets/lena.jpg && python display_graph.py assets/lena.jpg | ||
@echo "Test: Shapes" | ||
LD_LIBRARY_PATH=./igraph/src/.libs ./image_to_graph assets/shapes.png && python display_graph.py assets/shapes.png | ||
@echo "Test: Jacobite" | ||
LD_LIBRARY_PATH=./igraph/src/.libs ./image_to_graph assets/jacobite.jpg && python display_graph.py assets/jacobite.jpg | ||
@echo "Test: Arara" | ||
LD_LIBRARY_PATH=./igraph/src/.libs ./image_to_graph assets/arara.jpg && python display_graph.py assets/arara.jpg | ||
|
||
clean: | ||
rm -f image_to_graph | ||
|
||
allclean: | ||
cleandeps: | ||
$(MAKE) -C igraph clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,23 @@ | ||
You'll need OpenCV for this. The igraph package is also needed and it's included. | ||
You'll need to have installed on your system: | ||
- automake/autoconf/autoreconf (Linux package) | ||
- OpenCV (opencv2 headers & python3 package) | ||
- Matplotlib (python3) | ||
- NetworkX (python3) | ||
- Numpy (python3) | ||
|
||
|
||
The `igraph` C library is also used and bundled together. It takes a few minutes | ||
to build (`make deps` step), so just hang in there. | ||
|
||
|
||
Compile: | ||
``` | ||
make config | ||
make | ||
make deps | ||
make build | ||
``` | ||
|
||
Run stack: | ||
|
||
Run tests: | ||
``` | ||
./image_to_graph <input_image> && python display_graph.py <input_image> | ||
make tests | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.