summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--].gitignore0
-rwxr-xr-x[-rw-r--r--].gitmodules0
-rwxr-xr-x[-rw-r--r--]COPYING.txt0
-rwxr-xr-x[-rw-r--r--]Makefile5
-rwxr-xr-x[-rw-r--r--]README.txt0
-rwxr-xr-x[-rw-r--r--]bin/Makefile4
-rwxr-xr-x[-rw-r--r--]inc/coins/coins.h0
-rwxr-xr-x[-rw-r--r--]inc/coins/parse.h0
-rwxr-xr-x[-rw-r--r--]share/coins/COPYRIGHT.txt0
-rwxr-xr-x[-rw-r--r--]share/coins/DISCLAIMER.txt0
-rwxr-xr-x[-rw-r--r--]share/coins/HELP.txt0
-rwxr-xr-x[-rw-r--r--]share/coins/LICENSE.txt0
-rwxr-xr-x[-rw-r--r--]share/coins/README.txt0
-rwxr-xr-x[-rw-r--r--]share/coins/USAGE.txt0
-rwxr-xr-x[-rw-r--r--]src/coins.c8
-rwxr-xr-x[-rw-r--r--]src/main.c0
-rwxr-xr-x[-rw-r--r--]src/parse.c0
-rwxr-xr-x[-rw-r--r--]tmp/Makefile17
18 files changed, 11 insertions, 23 deletions
diff --git a/.gitignore b/.gitignore
index a1a0901..a1a0901 100644..100755
--- a/.gitignore
+++ b/.gitignore
diff --git a/.gitmodules b/.gitmodules
index e69de29..e69de29 100644..100755
--- a/.gitmodules
+++ b/.gitmodules
diff --git a/COPYING.txt b/COPYING.txt
index 53d3305..53d3305 100644..100755
--- a/COPYING.txt
+++ b/COPYING.txt
diff --git a/Makefile b/Makefile
index 63aeb3c..235eded 100644..100755
--- 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
index b523695..b523695 100644..100755
--- a/README.txt
+++ b/README.txt
diff --git a/bin/Makefile b/bin/Makefile
index a068195..a204c0a 100644..100755
--- 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
index 9cc3738..9cc3738 100644..100755
--- a/inc/coins/coins.h
+++ b/inc/coins/coins.h
diff --git a/inc/coins/parse.h b/inc/coins/parse.h
index 44c687e..44c687e 100644..100755
--- a/inc/coins/parse.h
+++ b/inc/coins/parse.h
diff --git a/share/coins/COPYRIGHT.txt b/share/coins/COPYRIGHT.txt
index 64ca5ad..64ca5ad 100644..100755
--- a/share/coins/COPYRIGHT.txt
+++ b/share/coins/COPYRIGHT.txt
diff --git a/share/coins/DISCLAIMER.txt b/share/coins/DISCLAIMER.txt
index 291440a..291440a 100644..100755
--- a/share/coins/DISCLAIMER.txt
+++ b/share/coins/DISCLAIMER.txt
diff --git a/share/coins/HELP.txt b/share/coins/HELP.txt
index 000f7ef..000f7ef 100644..100755
--- a/share/coins/HELP.txt
+++ b/share/coins/HELP.txt
diff --git a/share/coins/LICENSE.txt b/share/coins/LICENSE.txt
index ad35970..ad35970 100644..100755
--- a/share/coins/LICENSE.txt
+++ b/share/coins/LICENSE.txt
diff --git a/share/coins/README.txt b/share/coins/README.txt
index b523695..b523695 100644..100755
--- a/share/coins/README.txt
+++ b/share/coins/README.txt
diff --git a/share/coins/USAGE.txt b/share/coins/USAGE.txt
index fcbbfc7..fcbbfc7 100644..100755
--- a/share/coins/USAGE.txt
+++ b/share/coins/USAGE.txt
diff --git a/src/coins.c b/src/coins.c
index f532db8..9e85ee4 100644..100755
--- 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
index 1d98765..1d98765 100644..100755
--- a/src/main.c
+++ b/src/main.c
diff --git a/src/parse.c b/src/parse.c
index 05ca2e7..05ca2e7 100644..100755
--- a/src/parse.c
+++ b/src/parse.c
diff --git a/tmp/Makefile b/tmp/Makefile
index 73f035a..cdf8bb8 100644..100755
--- 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