From 00a3abd67c57b820aed117bc6edb817eaa6b04cd Mon Sep 17 00:00:00 2001 From: alejandro-colomar Date: Wed, 2 Oct 2019 22:10:03 +0200 Subject: Update --- .gitignore | 0 .gitmodules | 0 COPYING.txt | 0 Makefile | 5 +---- README.txt | 0 bin/Makefile | 4 ++-- inc/coins/coins.h | 0 inc/coins/parse.h | 0 share/coins/COPYRIGHT.txt | 0 share/coins/DISCLAIMER.txt | 0 share/coins/HELP.txt | 0 share/coins/LICENSE.txt | 0 share/coins/README.txt | 0 share/coins/USAGE.txt | 0 src/coins.c | 8 ++++---- src/main.c | 0 src/parse.c | 0 tmp/Makefile | 17 ++++------------- 18 files changed, 11 insertions(+), 23 deletions(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .gitmodules mode change 100644 => 100755 COPYING.txt mode change 100644 => 100755 Makefile mode change 100644 => 100755 README.txt mode change 100644 => 100755 bin/Makefile mode change 100644 => 100755 inc/coins/coins.h mode change 100644 => 100755 inc/coins/parse.h mode change 100644 => 100755 share/coins/COPYRIGHT.txt mode change 100644 => 100755 share/coins/DISCLAIMER.txt mode change 100644 => 100755 share/coins/HELP.txt mode change 100644 => 100755 share/coins/LICENSE.txt mode change 100644 => 100755 share/coins/README.txt mode change 100644 => 100755 share/coins/USAGE.txt mode change 100644 => 100755 src/coins.c mode change 100644 => 100755 src/main.c mode change 100644 => 100755 src/parse.c mode change 100644 => 100755 tmp/Makefile diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.gitmodules b/.gitmodules old mode 100644 new mode 100755 diff --git a/COPYING.txt b/COPYING.txt old mode 100644 new mode 100755 diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index 63aeb3c..235eded --- a/Makefile +++ b/Makefile @@ -143,8 +143,6 @@ export CFLAGS ################################################################################ # libs -LIBS_STD = - LIBS_OPT = -O3 LIBS_OPT += -march=native LIBS_OPT += -flto @@ -153,8 +151,7 @@ LIBS_OPT += -fuse-linker-plugin LIBS_PKG = `pkg-config --libs libalx-cv` LIBS_PKG += `pkg-config --libs libalx-base` -LIBS = $(LIBS_STD) -LIBS += $(LIBS_OPT) +LIBS = $(LIBS_OPT) LIBS += $(LIBS_PKG) export LIBS diff --git a/README.txt b/README.txt old mode 100644 new mode 100755 diff --git a/bin/Makefile b/bin/Makefile old mode 100644 new mode 100755 index a068195..a204c0a --- a/bin/Makefile +++ b/bin/Makefile @@ -18,8 +18,8 @@ all: $(ALL) $(BIN_NAME): $(OBJS) - @echo " CC $@" - $(Q)$(CC) $(OBJS) -o $@ $(LIBS) + @echo " CXX $@" + $(Q)$(CXX) $(OBJS) -o $@ $(LIBS) size: $(BIN_NAME) @echo " SZ $(BIN_NAME)" diff --git a/inc/coins/coins.h b/inc/coins/coins.h old mode 100644 new mode 100755 diff --git a/inc/coins/parse.h b/inc/coins/parse.h old mode 100644 new mode 100755 diff --git a/share/coins/COPYRIGHT.txt b/share/coins/COPYRIGHT.txt old mode 100644 new mode 100755 diff --git a/share/coins/DISCLAIMER.txt b/share/coins/DISCLAIMER.txt old mode 100644 new mode 100755 diff --git a/share/coins/HELP.txt b/share/coins/HELP.txt old mode 100644 new mode 100755 diff --git a/share/coins/LICENSE.txt b/share/coins/LICENSE.txt old mode 100644 new mode 100755 diff --git a/share/coins/README.txt b/share/coins/README.txt old mode 100644 new mode 100755 diff --git a/share/coins/USAGE.txt b/share/coins/USAGE.txt old mode 100644 new mode 100755 diff --git a/src/coins.c b/src/coins.c old mode 100644 new mode 100755 index f532db8..9e85ee4 --- a/src/coins.c +++ b/src/coins.c @@ -231,7 +231,7 @@ int coins_positions (img_s *restrict img, ptrdiff_t nmemb, { conts_s *conts; rect_s *rect; - cont_s *cont; + const cont_s *cont; int status; ptrdiff_t x, y, w, h; @@ -245,14 +245,14 @@ int coins_positions (img_s *restrict img, ptrdiff_t nmemb, if (alx_cv_contours(img, conts)) goto out_free; - *ncoins = alx_cv_contours_size(conts); + alx_cv_extract_conts(conts, NULL, ncoins); if (*ncoins > nmemb) goto out_free; for (ptrdiff_t i = 0; i < *ncoins; i++) { - if (alx_cv_contours_contour((const cont_s **)&cont, conts, i)) + if (alx_cv_extract_conts_cont(&cont, conts, i)) goto out_free; alx_cv_bounding_rect(rect, cont); -alx_cv_draw_rect(img, rect); +//alx_cv_draw_rect(img, rect); alx_cv_extract_rect(rect, &x, &y, &w, &h); coins[i].x = x + w / 2; coins[i].y = y + h / 2; diff --git a/src/main.c b/src/main.c old mode 100644 new mode 100755 diff --git a/src/parse.c b/src/parse.c old mode 100644 new mode 100755 diff --git a/tmp/Makefile b/tmp/Makefile old mode 100644 new mode 100755 index 73f035a..cdf8bb8 --- a/tmp/Makefile +++ b/tmp/Makefile @@ -41,26 +41,17 @@ PHONY := all all: $(OBJ) -coins.s: $(COINS_SRC) $(COINS_INC) +%.s: @echo " CC coins/tmp/$@" $(Q)$(CC) $(CFLAGS) -I $(INC_DIR) -S $< -o $@ -coins.o: coins.s +%.o: %.s @echo " AS coins/tmp/$@" $(Q)$(AS) $< -o $@ -main.s: $(MAIN_SRC) $(MAIN_INC) - @echo " CC coins/tmp/$@" - $(Q)$(CC) $(CFLAGS) -I $(INC_DIR) -S $< -o $@ -main.o: main.s - @echo " AS coins/tmp/$@" - $(Q)$(AS) $< -o $@ +coins.s: $(COINS_SRC) $(COINS_INC) +main.s: $(MAIN_SRC) $(MAIN_INC) parse.s: $(PARSE_SRC) $(PARSE_INC) - @echo " CC coins/tmp/$@" - $(Q)$(CC) $(CFLAGS) -I $(INC_DIR) -S $< -o $@ -parse.o: parse.s - @echo " AS coins/tmp/$@" - $(Q)$(AS) $< -o $@ PHONY += clean -- cgit v1.2.3