Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix redundant func in image pre-process #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lexuszhi1990
Copy link

@lexuszhi1990 lexuszhi1990 commented Jul 30, 2020

Hi, I find a little bit to speed up the code
fix the redundant func in image pre-process to make it more efficient...
the test result below:

ori:
$ make && ./demo ../model/test.jpg
Scanning dependencies of target demo
[ 33%] Building CXX object CMakeFiles/demo.dir/cpp/DBface.cpp.o
[ 66%] Linking CXX executable demo
[100%] Built target demo
in 0 0.028716
in 0 0.068198
in 0 0.174478

current:
$ make && ./demo ../model/test.jpg
Scanning dependencies of target demo
[ 33%] Building CXX object CMakeFiles/demo.dir/cpp/DBface.cpp.o
[ 66%] Building CXX object CMakeFiles/demo.dir/demo.cpp.o
[100%] Linking CXX executable demo
[100%] Built target demo
in 0 0.028716
in 0 0.068198
in 0 0.174478

which has same results, but it didn't to enumerate all input image by

for (int i = 0; i < c; ++i) {
        for (int j = 0; j < h; ++j) {
            for (int k = 0; k < w; ++k) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant