Compare commits

...

2 commits

Author SHA1 Message Date
Ruben van de Ven
50e05c631e latest visualhaar 2020-10-02 14:11:02 +02:00
Ruben van de Ven
16c37ee750 Use optimised release for visual haar 2020-10-02 14:06:53 +02:00
4 changed files with 7 additions and 7 deletions

4
.vscode/launch.json vendored
View file

@ -17,8 +17,8 @@
"request": "launch",
"program": "mirror.py",
"args": [
// "--fullscreen",
"--camera", "2",
"--fullscreen",
"--camera", "4",
],
"console": "integratedTerminal"
}

View file

@ -28,4 +28,4 @@ The installation in Windows can be done, though it is quite elaborate:
* `cd .\dnn\face_detector`
* `python.exe .\download_weights.py`
* `cd .\visualhaar`
* `cargo build --lib`
* `cargo build --lib --release`

View file

@ -344,12 +344,12 @@ def process3_haar(in_q, out_q, cascade_file):
typedef void* haarclassifier;
haarclassifier classifier_new(char *filename);
void scan_image(haarclassifier, size_t width,size_t height, char *input, char *buffer, size_t length, bool debug);
void scan_image(haarclassifier, size_t width,size_t height, char *input, char *buffer, size_t length, size_t min_face_factor, bool debug);
""")
dir_path = os.path.dirname(os.path.realpath(__file__))
lib_path = os.path.join(dir_path, "..", "visualhaar", "target", "debug")
lib_path = os.path.join(dir_path, "..", "visualhaar", "target", "release")
so_path = os.path.join(lib_path, "libvisual_haarcascades_lib.so")
dll_path = os.path.join(lib_path, "visual_haarcascades_lib.dll")
@ -404,7 +404,7 @@ def process3_haar(in_q, out_q, cascade_file):
logger.info("Start haar scan")
start = time.time()
C.scan_image(haar, width, height, buffer2, buffer, buffer_len, False)
C.scan_image(haar, width, height, buffer2, buffer, buffer_len, 5, False)
logger.info(f"Visualised scan into buffer: {buffer}")
print(f"duration: {time.time() - start}s")

@ -1 +1 @@
Subproject commit 7c7ae29bf9e1390ea304e3708e8f92f6d57f87ff
Subproject commit ac1aea1d68f346be194e64a3275629a177327f2e