2020-09-06 08:33:34 -0600 | received badge | ● Nice Question (source) |
2020-08-13 22:51:08 -0600 | answered a question | How to merge nearby rectangles I found better solution without iterating through contours - by using numpy concatenate() function: concat = np.concate |
2018-09-11 04:53:46 -0600 | received badge | ● Popular Question (source) |
2017-06-08 13:01:11 -0600 | asked a question | Guide on adding new types of parameters to opencv java wrappers Dear OpenCV team! If I want to extend list of types, which are wrapped automatically by OpenCV Almighty Java Wrapper Generator (let's call it JWG), how would I do that? Is there any documentation, best practices or how-to's? Appreciate your help on this, I spent some time analyzing how this thing work and, to be honest, I would say that readability the code is not exactly the best possible. I'd like to understand the proper way of wrapping parameters in the following cases:
I would be really grateful for pointing me at the right documentation were such documentation exist. Best Regards |
2017-06-03 11:38:03 -0600 | answered a question | Java wrappers for dnn module - missing protobuf headers? I've made some progress in resolving this issue but not sure if this is the right approach or not. Seems like the problem is related to the way how include paths are configured in CMake for java module. The following changes are leading to successful compilation: In the file /opencv_contrib/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake, the following line: is to be replaced with The purpose of this change is to make the PROTOBUF_INCLUDE_DIR variable visible for the CMake script in the main repository. The next step is to locate the following line in the /opencv/modules/java/CMakeLists.txt: and insert the following code below this line: After these changes java wrappers are generated successfully for dnn module. |
2017-06-03 09:25:38 -0600 | asked a question | Java wrappers for dnn module - missing protobuf headers? Dear OpenCV team, need your help. I'm trying to generate java wrappers for dnn module. I was able to overcome some of the issues but this one is really cumbersome. I get the following exception during compilation of java wrappers: It seems like the issue is somehow related to 3rdparty protobuf library, which is building from sources along with OpenCV (BUILD_PROTOBUF=ON). I can find the missing header in the folder /opencv/build/3rdparty/protobuf/protobuf-3.1.0/src/google/protobuf/stubs/common.h but this path seems to be non-visible for the compiler. Please kindly advise what would be the correct approach to fix this problem. |
2017-05-09 03:31:52 -0600 | answered a question | Java wrappers for OpenCV Text module Ok, I've made some progress resolving this. Assume we are to wrap a C++ method like void foo(const Ptr<t>& arg). Whenever gen_java.py meets the function parameter of type const Ptr<t>&, it generates the following JNI code: java: JNI C wrapper The line noted above is leading to Java crash, However, if to replace it with the following, the crash is cured: So I guess my question can be transformed to this: what is the scenario when we need to keep the original way of wrapping of const Ptr<t> & arg? Which modules/classes/methods use it? |
2017-05-08 07:34:44 -0600 | commented question | Java wrappers for OpenCV Text module hi berak, added all components as requested. Seems like nothing extraordinary but I may be missing something ... |
2017-05-07 14:36:21 -0600 | asked a question | Java wrappers for OpenCV Text module Dear OpenCV team! Need your help again and sorry for such a long question. I'm trying to generate java wrappers for OpenCV OCR Text/Tesseract module, which is in contrib repository now. Here is what I managed so far (skipping all the trivial stuff like enabling contrib, installing tesseract etc):
The idea was to merge interfaces loadClassifierNM1 and loadClassifierNM2 with "native" createERFilterNM1 and createERFilterNM2, respectively and get rid of necessity to wrap Ptr<erfilter::callback>& type in Java.
After these 3 steps java wrapper for Text module is generated successfully. However! This code crashes java with Exception Type EXC_BAD_ACCESS (SIGABRT): private List<rect> findContours2(Mat img) { List<rect> boundRects = new ArrayList<rect>(); } The crash seems to be happening in JNI C layer. Here is the source generated for detectRegions method: It seems the Ptr pointer is used incorrectly but I can't figure out the correct way ... (more) |
2017-02-26 03:59:47 -0600 | received badge | ● Supporter (source) |
2016-12-05 14:34:05 -0600 | answered a question | fatal error: 'jni.h' file not found Found the answer. For some reason the path to old JDK was preserved in the cmake settings so it was pointing to non-existing folder. Here is the fix:
This is just in case if anybody will face the similar problem after upgrade of xcode/jdk. |
2016-12-05 14:08:18 -0600 | asked a question | fatal error: 'jni.h' file not found Hello, I encountered really strange issue, which appeared recently most likely due to XCode/Java updates. Here is my setup:
My codebase is: commit 6c12533160bc5e6de1f09847d9cd6dd548667a55 Merge: 811eb76 bec3479 Author: Alexander Alekhin [email protected] Date: Mon Oct 31 17:35:41 2016 +0000 Previously I was able to build opencv master from sources with no issues but when I'm trying to build it now, it cannot find jni.h!: Appreciate any ideas or hints how to fix this? JAVA_HOME is pointing at correct folder and also include folder is there and jni.h is where it should be ... |
2016-11-02 09:09:56 -0600 | commented question | How is OpenCV project being managed? One good example is Eclipse - I think they put a lot of good thoughts in the contribution process. |
2016-11-01 23:19:15 -0600 | commented question | How is OpenCV project being managed? Sure. Is there a list of features or may be new modules, which are planned for the next release? When is the tentative date for the next release? Is there a long-term roadmap? Is there a way for community to suggest new modules/new projects and may be vote for it? Another set of questions is related to backward compatibility with previous releases and versioning of algorithms. Take MSER as an example. Without going too deep in details - this algorithm produces totally different results in ver 3.1 compared to 3.0.0-rc-1 to say nothing about 2.4. Is there a way to understand what triggered this change and why the new implementation is better than the one in the previous versions? I ran through the commits - seems like some refactoring was going on but why it impacted results? |
2016-11-01 11:38:34 -0600 | commented question | How is OpenCV project being managed? By the way, managing roadmaps could be done using opensource tools. Some people advise Redmine - it seems to be good open source project management tool. I don't have much experience with it but it may solve at least problem of managing releases and roadmaps. Integration with git is also a big plus. |
2016-11-01 10:11:23 -0600 | asked a question | How is OpenCV project being managed? Dear OpenCV team! I have one generic question - is the opencv project being managed by anyone or not really? For example:
OpenCV is really cool staff but after playng a bit with it I got an impression (may be totally wrong) that there is no management at all; contributions are sometimes poorly explained and it is not always clear what is driving them. |
2016-11-01 09:31:17 -0600 | commented question | VideoCapture is not working after building opencv 3.1 in Java This looks like the old issue, should be already fixed in the upstream. capture.release() is not yet fixed. |
2016-10-17 13:19:22 -0600 | commented question | VideoCapture is not working after building opencv 3.1 in Java when exactly your code is crashing? Is it at the moment when the capture is released or earlier? |
2016-10-15 04:43:37 -0600 | asked a question | FAST + BRIEF test case is failing I stumbled upon this issue when trying to revive java autotests for OpenCV 3.1. The test case BruteForceHammingDescriptorMatcherTest.testRadiusMatchMatListOfListOfDMatchFloat is failing and I'm trying to understand why. I hope it was working a few releases of OpenCV ago so this may mean that we have regression issue. The test case is simple - it generates 2 similar images ("query" and "train"), calculates descriptors for them using FAST feature detection and BRIEF extractor and then applies BFMatcher with norm = BRUTEFORCE_HAMMING. Expected result is 4 matches with the radius = 50 but in fact no matches are detected on the latest build of OpenCV 3.1 (upstream/master (4ed40fd6946269ea36c58e5c76a277e7a871c269). Code generating query image: Resulting image is like this (matSize=300): Screen Shot 2016-10-15 at 12.56.20 PM.png and with detected keypoints: Screen Shot 2016-10-15 at 12.56.26 PM.png Code generating "train" image: Resulting image (matSize=300): Screen Shot 2016-10-15 at 12.55.26 PM.png and with keypoints Screen Shot 2016-10-15 at 12.55.35 PM.png The resulting descriptors for "query" and "train" both have 4 vectors, like this: query: Element size=1 Total elements=128 24.0 0.0 76.0 9.0 44.0 171.0 68.0 193.0 148.0 170.0 24.0 128.0 40.0 140.0 6.0 156.0 102.0 248.0 26.0 145.0 1.0 136.0 201.0 24.0 196.0 216.0 68.0 106.0 240.0 200.0 72.0 103.0 176.0 49.0 48.0 193.0 32.0 233.0 65.0 147.0 150.0 90.0 80.0 35.0 64.0 1.0 28.0 149.0 168.0 112.0 38.0 129.0 216.0 144.0 251.0 128.0 208.0 92.0 69.0 224.0 80.0 209.0 77.0 44.0 160.0 168.0 78.0 8.0 30.0 98.0 86.0 42.0 16.0 235.0 21.0 147.0 142.0 96.0 79.0 180.0 92.0 66.0 148.0 94.0 37.0 33.0 192.0 221.0 4.0 105.0 192.0 40.0 5.0 232.0 226.0 197.0 165.0 56.0 31.0 11.0 8.0 100.0 66.0 50.0 138.0 106.0 21.0 231.0 15.0 18.0 223.0 181.0 216.0 64 ... (more) |
2016-10-08 06:25:23 -0600 | received badge | ● Self-Learner (source) |
2016-10-08 06:23:23 -0600 | answered a question | Java tests for OpenCV 3.1 desktop Here is what I found but I'm not sure if this is the right way or not. The make process actually prints out the jar name of the junit tests for OpenCV java wrappers (opencv-test.jar). Here is how to run it.
opencv-package-name stands for the name of the corresponding opencv module, for example calib3d, core, features2d, highgui, imgproc, objdetect, photo, utils, video etc. test-class-name can be any class from that package, which inherits from OpenCVTestCase. For example: will produce the following output: ......................................... Time: 0.295 OK (41 tests) UPDATE: as expected things are much more simple than we think of them initially )) OpenCV good team did great job already - all tests including java tests can be run from the build directory by this command: more information is here. The only confusing part of documentation - seems like this command actually runs all tests so it can be used not only for performance control. |
2016-10-08 04:12:35 -0600 | commented answer | Java tests for OpenCV 3.1 desktop Thank you berak, will try to dig it a beet deeper and will let you know. |
2016-10-08 01:09:27 -0600 | commented answer | Java tests for OpenCV 3.1 desktop Thank you for the prompt answer! Is there any guideline how build and run them locally? |
2016-10-08 01:08:59 -0600 | marked best answer | Java tests for OpenCV 3.1 desktop Are there any automated tests included in nightly builds for testing java wrappers? What is the process of contributing tests to OpenCV? |