black_hat with non symmetric kernel

Discussion related to "under the hood" OpenMV topics.
AYahoo
Posts: 6
Joined: Thu Oct 31, 2019 12:39 pm

black_hat with non symmetric kernel

Postby AYahoo » Fri Nov 15, 2019 5:36 am

Hi, Is it possible to use the image.black_hat(size[, threshold[, mask=None]]), but use a rectangle sized kernel?
User avatar
kwagyeman
Posts: 3829
Joined: Sun May 24, 2015 2:10 pm

Re: black_hat with non symmetric kernel

Postby kwagyeman » Fri Nov 15, 2019 11:57 am

No, we just support square kernels. You can however control what is in the kernel with morph() and make sure own special kernel that gets thresholded.
Nyamekye,
AYahoo
Posts: 6
Joined: Thu Oct 31, 2019 12:39 pm

Re: black_hat with non symmetric kernel

Postby AYahoo » Sat Nov 16, 2019 12:01 pm

I know about the morph function, that is great I'm already using it.
but how hard will it be to accomplish something like black_hat & close with a rectangular matrix?
User avatar
kwagyeman
Posts: 3829
Joined: Sun May 24, 2015 2:10 pm

Re: black_hat with non symmetric kernel

Postby kwagyeman » Sat Nov 16, 2019 12:57 pm

It's not hard to do. But, I don't have the time to modify the API for this. If you want to do it please send a PR for the C code edits. Right now the code just does a square.
Nyamekye,
AYahoo
Posts: 6
Joined: Thu Oct 31, 2019 12:39 pm

Re: black_hat with non symmetric kernel

Postby AYahoo » Sat Nov 16, 2019 1:09 pm

Thanks, I'll try.

Do you think it would be possible to achieve it with the ulab libary?
User avatar
kwagyeman
Posts: 3829
Joined: Sun May 24, 2015 2:10 pm

Re: black_hat with non symmetric kernel

Postby kwagyeman » Sat Nov 16, 2019 1:27 pm

Yeah, probably. I don't know how that code works however. We were just asked to include it.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests