Python: wrap Algorithm::read and Algorithm::write#9247
Python: wrap Algorithm::read and Algorithm::write#9247opencv-pushbot merged 2 commits intoopencv:masterfrom
Conversation
|
thank you! it would be useful to provide some test for this functionality |
|
I could not find a testing unit for the Algorithm API to add such a test to. It seems the only the Feature2D tests are currently using the Algorithm API at all. The HOGDescriptor provides a similar API, but does not derive from Algorithm. Creating a new testing unit is beyond the scope of this PR though. |
|
or do you mean a pure python test? It would still have to depend on a random non-core algorithm implementing the API. |
|
bump |
|
bump |
|
Problem of this patch (actually in bindings generator) is here:
Renaming "read => read2" in base class (not in derived) class doesn't look as appropriate change. |
yes, but manual renaming is necessary as python does not support overloading. However we can not rename "read" in derived class as it would break the python API - therefore we must rename it in the base class. Which alternative behavior would you have in mind? An dispatcher in the bindings that emulates overloading for python? |
Emulation already exists in Python bindings, but it doesn't look into base classes. Also there is another question about Java bindings. I have some POC, but it is still very questionable. |
|
@paroj Try to apply this patch: alalek@pr9247_r2 |
|
works for me/ python3, linux. Thats an elegant way to trick the parser into doing the right thing. 👍 |
|
@paroj Thank you for checking that! |
No description provided.