Closed kalwalt closed 2 years ago
With the latest commit i have no errors in the console, but testing the sample_pyrdown.html
example, fps are very slow. Maybe something wrong with my implementation?
I'm not sure that is required the cache class. For example if we look at the resample function
https://github.com/inspirit/jsfeat/blob/4c7b336bbeeb26e6cd4cdf3c7d414abe273846f3/src/jsfeat_imgproc.js#L405-L417 it's derived from ccv library internally method resample_u8 is derived from ccv https://github.com/liuliu/ccv/blob/e058fb5d80a71c66bd39a49c4b06955c7631451c/lib/ccv_resample.c#L11 That is C code but we can do in C++ as well. Instead of allocating data with alloca
we can use STL vector's in a feasible way and avoid creating a cache class.
I'm testing the resample function, as jsfeat is heavily inspired by the ccv lib i'm trying to convert the C code to C++. I haven't created bindings for emscripten but they will be soon available.
I think i will implement a lru cache in another Pr. I will try to follow this article https://www.nextptr.com/tutorial/ta1576645374/stdlist-splice-for-implementing-lru-cache.
The sample_orb_mixed.html
not works completely, it can only train the pattern but will fail in the match_pattern
routine, infact here screen_descriptors expect the old jsfeat syntax where you can var query_u32 = screen_descriptors.buffer.i32; // cast to integer buffer
but with jsfeatCpp you can't. So i think the only way is to convert to the old syntax internally match_pattern
, but at the moment we have not such copyTo
or moveTo
function inside matrix_t jsfeatCpp, so this will be done in another moment.
I will merge this PR, leaving the tasks undone for another PRs. Now proority is to imporove matrix_t class:
matrix_t
from data_t
classcopyTo
or moveTo
functions to copy from jsfeat and not only.
I'm trying to port the orb class form jsfeat_orb into webarkit-jsfeat-cpp. I will implement other classes that is required internally, but for a working example it will be necessary also other functionalities and classes not present in in the code at the moment.
list of feature implemented