-
Notifications
You must be signed in to change notification settings - Fork 376
imgproc: Morphology erode and dilate #18
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
base: master
Are you sure you want to change the base?
Conversation
|
hi |
|
The problem is that I want to initialize the new buffer with the data contained in the src, taking advantage of the fast memory copy allowed by slice: I don't see how I could do that with the existing jsfeat buffer types. |
|
ahh i see now. |
Could you elaborate on that ? I'd be happy to remove one full copy if I can ... |
|
well u still need to create a copy of src matrix if it === dst |
|
Got it. I will post an updated patch. |
|
@inspirit this discussion above looks good. why was this not merged yet? |
|
Added the dilate function (applyKernel) manually since this still does not seem merged. Works great! Rounding it off with findContours and approxPolyDP functions would give a good chunk of what most CV projects would need without the overhead of the massive OpenCV JS port. |
|
@krhoyt Do you have a repository with the merged changes available? |
Hi,
I have added two morphology functions based on a partial Open CV port to Javascript located here:
http://code.google.com/p/js-handtracking/
I have allowed in place modifications of data_t by allocating a temporary array buffer copied from the source using the ArrayBuffer.slice method.
You may want to change that to use a matrix_t/data_t 'slice' method that would hide the fact that ArrayBuffer.slice is not supported in IE.
Cheers
David