Ahmed Ashour
ca8a1d2cff
java: generated code inline return
2019-05-28 08:34:02 +02:00
Alexander Alekhin
166ecaeda8
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2019-05-23 19:50:20 +03:00
Ahmed Ashour
f3319f6140
java: remove redundant declaration of java.lang package
2019-05-23 14:06:34 +02:00
Alexander Alekhin
e21262deba
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2019-05-16 04:40:39 +00:00
Alexander Alekhin
8936a0f3a5
android: fix JavaCamera2View UV plane handling
2019-05-15 07:57:50 +00:00
Alexander Alekhin
e28e3c9491
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2019-05-01 08:27:45 +00:00
vdgussem
00861b668a
Changed the way Images are converted into rgba Mats so that JavaCamera2View also shows correct colors when the Image contains I420 or YV12 data
2019-04-16 01:38:59 +02:00
Dmitry Kurtaev
4c2100e02c
Merge pull request #14266 from dkurt:fix_qrcode_decode_java
...
* Fix decode and detectAndDecode Java wrappers for QRCodeDetector
* revert changes in objdetect
* java: fix wrapping of std::string type
2019-04-05 17:15:51 +03:00
Alexander Alekhin
8c0b0714e7
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2019-03-11 19:20:22 +00:00
Giles Payne
11dbd86aa3
Merge pull request #13956 from komakai:java-mat-class-improvements
...
* Expose more C++ functionality in the Java wrapper of the Mat class
In particular expose methods for handling Mat with more than 2 dimensions
* add constructors taking an array of dimension sizes
* add constructor taking an existing Mat and an array of Ranges
* add override of the create method taking an array of dimension sizes
* add overrides of the ones and zeros methods taking an array of dimension sizes
* add override of the submat method taking an array of ranges
* add overrides of put and get taking arrays of indices
* add wrapper for copySize method
* fix crash in the JNI wrapper of the reshape(int cn, int[] newshape) method
* add test for each method added to Mat.java
* Fix broken test
2019-03-10 00:11:04 +03:00
Adrian Renner
442fdfd4b2
Merge pull request #13999 from addyi:fixAndroidLintingErrors
...
* fix android lint error in BaseLoaderCallback (LongLogTag)
Lint Error that was causde by the to long TAG:
BaseLoaderCallback.java:31:
Error: The logging tag can be at most 23 characters,
was 31 (OpenCVLoader/BaseLoaderCallback) [LongLogTag]
Log.e(TAG, "Package installation failed!");
* add requested "OCV" prefix for android logging
2019-03-07 23:18:22 +03:00
Alexander Alekhin
332c37f332
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2019-03-06 11:43:16 +03:00
Alexander Alekhin
0a98bc0ee9
java: avoid enum values with references on other enums
...
declaration order is not fixed
Error message:
Core.java:97: error: illegal forward reference
Hamming_normType = NORM_HAMMING,
2019-03-01 21:32:03 +00:00
Alexander Alekhin
f5b58e5fc9
bindings: backport generator from OpenCV 4.x
...
- better handling of enum arguments
- less merge conflicts
2019-03-01 20:18:48 +00:00
Alexander Alekhin
c3cf35ab63
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2019-02-26 17:34:42 +03:00
Jaewoo Song
225bdc21c0
Making JavaCamera2View behaves in the same way as JavaCameraView
2019-02-26 14:18:29 +08:00
Dmitry Kurtaev
6fbcb283b9
Try to fix "enum struct" wrapping for Java
2018-12-19 13:16:43 +03:00
Alexander Alekhin
a574788e89
move legacy C-API constants into separate files
2018-11-17 23:47:51 +00:00
Alexander Alekhin
2c6f1ab57d
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2018-11-06 20:04:31 +00:00
berak
eaee63d96b
java: add converters, tests for MatOfRotatedRect
2018-11-06 16:40:56 +01:00
Vadim Pisarevsky
d9b8a9d90e
Merge pull request #13013 from berak:java_MatOfRotatedRect
2018-11-02 12:36:06 +00:00
Alexander Alekhin
687fa6a8ca
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2018-11-02 05:33:35 +00:00
berak
0cd14e3fb4
java: add support for MatOfRotatedRect
2018-11-01 15:37:23 +01:00
Dmitry Kurtaev
92f754c675
Add methods to reshape Mat in Java by array of shapes and retreive sizes of each dimension.
2018-10-25 10:48:23 +03:00
Alexander Alekhin
690fb0544c
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2018-10-02 14:31:05 +03:00
soonbro
9b9f38afc8
fix typo in FpsMeter.java
...
'mFramesCouner' -> 'mFramesCounter'
2018-09-29 11:36:47 +00:00
Alexander Alekhin
dca657a2fd
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2018-09-10 00:10:21 +03:00
Hamdi Sahloul
a39e0daacf
Utilize CV_UNUSED macro
2018-09-07 20:33:52 +09:00
Alexander Alekhin
d74b98c3d9
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2018-09-04 18:39:03 +00:00
Hamdi Sahloul
78835ad87a
Support enum arguments for Java binding
2018-09-01 15:04:55 +09:00
Hamdi Sahloul
f89e4e7dd0
Support parsing C++11 enum struct
and enum class
2018-09-01 15:04:54 +09:00
berak
72f422c7dc
java: fix LIST_GET macro
2018-08-30 13:06:02 +02:00
Hamdi Sahloul
900df21b7d
Support enum-type detection for binding generator
2018-08-25 01:58:42 +09:00
Alexander Alekhin
4560909a5e
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
2018-07-17 19:27:48 +03:00
Dmitry Kurtaev
f38808a39f
Add Java overloads for each default argument ( #11940 )
...
* Add Java overloads for each default argument
* Add "fisheye_" prefix for cv::fisheye:: functions and enums
2018-07-17 13:41:46 +03:00
Alexander Alekhin
c6aa97c9aa
next(android): java3 -> java4
2018-04-10 18:09:54 +03:00
Alexander Alekhin
76c40e8f0d
java: fix copy_java_files() in gen_java.py
...
- missing 'module'
- fixed '\r\n' EOL handling (blocked by '$' regex)
2018-02-28 17:58:31 +03:00
Florian Echtler
6a8f57e5d7
Merge pull request #10081 from floe:java-camera2-view
...
* add (untested) JavaCamera2View class
* initial fixes
* minor cleanup
* exclude JavaCamera2View from build for older SDK version
* fix method name typo
* add asserts + sanity checks
* fix preview format checks
* fix the memory leak
* export cvtTwoPlaneYUVtoBGR for Java usage
* add handling for two-plane YUV frames (C wrapper still missing)
* add two-plane cvtColor helper function
* fix warnings
* actually use the new cvtColorTwoPlane helper func
* fix wrong output matrix size
* fix wrong conversion type
* simplify method signature, add error condition
* minor fixes to Mat types
* remove leftover semaphore from camera api 1
* android: JavaCamera2View minor refactoring
- re-apply Java code style
- imports cleanup
- dump exceptions information
* android: JavaCamera2View: pause/resume fixes
* android: JavaCamera2View: fix mScale
2018-02-17 15:01:24 +03:00
luz.paz
d05714995c
Misc. modules/ cont. pt2
...
Found via `codespell`
2018-02-13 11:28:11 -05:00
Alexander Alekhin
a362fd80df
java: fix bindings generator
...
- fix imports override.
Problem is observed with BoostDesc.
- add Ptr<> handling (constructor is protected from other packages).
Observed in ximgproc:
Ptr<StereoMatcher> createRightMatcher(Ptr<StereoMatcher> matcher_left)"
where, "StereoMather" is from another package (calib3d)
2018-01-13 02:12:39 +00:00
Alexander Alekhin
1237faef80
java: disable highgui wrapped code
2018-01-13 02:12:39 +00:00
Alexander Alekhin
a0d9d6db5b
fixes for old CMake (2.8.12.2)
2018-01-13 02:12:39 +00:00
Alexander Alekhin
8533b45ce9
cmake: Java/Android SDK refactoring
2018-01-13 02:12:39 +00:00
Alexander Alekhin
0cad2d2a83
java: files rename
...
intermediate commit (to simplify code review)
2018-01-12 19:14:00 +00:00
SarenT
c6d9ce8fd3
Merge pull request #10489 from SarenT:offset-mat_put
...
Adding capability to parse subsections of a byte array in Java bindings (#10489 )
* Adding capability to parse subsections of a byte array in Java bindings. (Because Java lacks pointers. Therefore, reading images within a subsection of a byte array is impossible by Java's nature and limitations. Because of this, many IO functions in Java require additional parameters offset and length to define, which section of an array to be read.)
* Corrected according to the review. Previous interfaces were restored, instead internal interfaces were modified to provide subsampling of java byte arrays.
* Adding tests and test related files.
* Adding missing files for the test.
* Simplified the test
* Check was corrected according to discussion. An OutOfRangeException will be thrown instead of returning.
* java: update MatOfByte implementation checks / tests
2018-01-12 18:00:58 +03:00
Moshe
84596bff09
Bitwise "and false"
...
Bitwise "and false" is always false.
2018-01-07 10:12:53 +02:00
Alexander Alekhin
cac4a7e5b5
OpenCV version++
...
OpenCV 3.4.0-rc
2017-12-16 01:30:43 +03:00
Jcrist99
0608227e10
Merge pull request #9698 from abratchik:parse.doxygen
...
Support @deprecated tag in java wrappers (#9698 )
2017-11-16 16:48:12 +03:00
Florian Echtler
2e772510ea
Merge pull request #10050 from floe/android-studio-3.3.1
...
Add Android Mat constructor with support for native buffer (#10050 )
2017-11-10 19:35:32 +00:00
Alexander Alekhin
01519313d7
dnn: invalid bindings
2017-08-31 19:35:48 +03:00
Aleksandr Rybnikov
8b1146deb2
Added function to get timings for layers
2017-08-23 13:40:05 +03:00
Alexander Alekhin
2360291c3e
java: update source files processing, maven stuff
2017-07-19 22:39:23 +03:00
likan999
74127d44d0
More accurate condition to detect emulator
...
Previous commit, 6f39f9a
, tries to fix the color issue for emulator. But the condition for detecting emulator is incomplete, e.g. it stops working for emulators using Google Play, whose Build.BRAND=="google". https://stackoverflow.com/a/21505193 shows a more accurate condition for this.
2017-06-22 00:47:15 -07:00
abratchik
037d8fbdcd
Refactor OpenCV Java Wrapping
2017-06-15 20:35:12 +04:00
Maksim Shabunin
9f0bbdada2
Merge pull request #8386 from jtkb:feature/cmake-maven-it-module
2017-05-24 10:17:03 +00:00
Vladislav Sovrasov
bf62be7f63
java: allow to wrap functions which take cv::Ptr
2017-05-02 11:50:31 +03:00
Maksim Shabunin
8b455e8bb3
Fixed Algorithm.save and other methods work in Java
2017-04-05 17:48:38 +03:00
Kerry Billingham
d9231afa29
Changes made to the Maven build process:
...
* Introduced OSGi Blueprint XML file and Bean class too automatically load the native library.
* Introduced integration testing module to deploy to Karaf OSGi implementation.
* Clears library executable stack flag during build.
* Updated README document.
2017-03-18 10:49:02 +00:00
Kuan-Yi Li
e685dcef0b
Fix typos
2017-03-07 23:42:24 +08:00
Alexander Alekhin
990e87effb
Merge pull request #8111 from utibenkei:saliency-module-java
2017-03-06 14:39:23 +00:00
Alexander Alekhin
92c4b6ae4c
Merge pull request #8298 from delftrobotics-forks:circles-grid-parameters
2017-03-05 10:17:51 +00:00
Philipp Hasper
ec38ef9b10
CameraBridgeViewBase synchronizes on a final field
...
Synchronizing against non-final fields is advised against.
2017-03-03 16:07:10 +01:00
Jose Gómez
6f39f9a6a0
Merge pull request #8168 from jmgomezpoveda:issue_8166
...
* Use the YV12 format in the Android emulator to avoid image issues
* Removed trailing spaces
* Added exception in else case
* Removed tab
2017-03-03 13:44:11 +00:00
Hans Gaiser
11b24eb49f
Expose CirclesGridFinderParameters in findCirclesGrid.
2017-03-02 10:53:45 +01:00
utibenkei
6501d54267
Fix bug that occurs when module name and inherited class name are same.
2017-01-31 22:42:30 +09:00
utibenkei
579ffbf97e
Added Java wrapping for tracking module
2016-12-31 02:19:38 +09:00
Alexander Alekhin
d85c11e525
OpenCV version++
...
3.2.0-rc
2016-12-19 17:12:18 +03:00
Alexander Alekhin
1ae27eb696
Merge pull request #7476 from abratchik:java.wrapper.fix.3.1
2016-10-15 09:21:45 +00:00
abratchik
4207ebbce7
fix for VideoCapture crash
2016-10-15 08:16:31 +04:00
Maksim Shabunin
699c25a4be
Merge pull request #7471 from alalek:fix_java_generator
2016-10-13 15:21:39 +00:00
abratchik
084c595855
fix for legacy FeatureDetector and DescriptorMatcher classes
2016-10-13 14:45:59 +04:00
Vadim Pisarevsky
4ed40fd694
Merge pull request #7432 from abratchik:java.wrapper.fix.3.1
2016-10-12 19:54:03 +00:00
Alexander Alekhin
c16c803fe9
java: integrate code from base modules
...
To resolve undefined "Mat_to_vector_KeyPoint" error
2016-10-12 18:01:51 +03:00
abratchik
789b35d813
improved fix for java wrapper generator (gen_java.py) to avoid generation of java methods with duplicate signatures(v3)
2016-10-11 02:47:02 +04:00
Alexander Alekhin
714db4cf0d
java: fix Ptr<> code generation
...
Before:
Ptr<Dictionary>((cv::aruco::Dictionary*)dictionary_nativeObj)
After:
Ptr<cv::aruco::Dictionary>((cv::aruco::Dictionary*)dictionary_nativeObj)
2016-10-08 02:19:43 +03:00
abratchik
be028d0774
fix for #7420 , #7421
2016-10-07 23:58:57 +04:00
Jcrist99
770c69a978
fix for feature2d java wrappers as described in this post: http://ans … ( #7372 )
...
* fix for feature2d java wrappers as described in this post: http://answers.opencv.org/question/101675/surfsift-java-wrapper-for-opencv-3xosx-1011/
* fix for feature2d java wrappers as described in this post: http://answers.opencv.org/question/101675/surfsift-java-wrapper-for-opencv-3xosx-1011/
* rollback of one change as requested (similar change already merged)
2016-10-06 15:48:26 +03:00
Vadim Pisarevsky
a799cc13d9
Merge pull request #6078 from PolarNick239:master
2016-10-05 17:27:23 +00:00
mshabunin
7a7a2749e0
Fixed java wrappers
2016-09-30 16:21:04 +03:00
Marek Smigielski
1aa14e4929
fix tab for gen_java.py
2016-08-10 12:03:28 +02:00
Marek Smigielski
723b42e0da
Add namespaces and proper support of the pointers
2016-08-05 15:34:57 +02:00
Maksim Shabunin
fc890bd941
Merge pull request #6815 from smigielski:fix_6605
2016-07-14 14:36:45 +00:00
Alexander Alekhin
f9ab93bf0f
Merge pull request #6876 from janstarzy:jni-as-template-redone
2016-07-11 13:06:00 +00:00
Jan Starzynski
479f933970
get/put: more type-safety and code unification using templates
2016-07-11 09:27:59 +02:00
Marek Smigielski
ef45005056
Adding support for pointer generation. Fixes #6605
2016-05-31 08:35:50 +02:00
dharezlak
308b47ce58
Improved Java wrapper generation
...
While generating Java JNI wrappers package names with an underscore (`_`) character where not properly escaped according to https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/design.html#resolving_native_method_names (see also: https://github.com/Itseez/opencv_contrib/issues/652 ).
This fix replaces all the occurrences of `_` with `_1` resulting in proper JNI method names.
2016-05-23 11:13:18 +02:00
Philipp Hasper
cc7a1a2ab7
Deactivated two noisy camera-retrieval log messages in android
...
They were issued for every frame retrieved - even in a release build.
2016-04-13 09:17:33 +02:00
Jason von Nieda
f4b502dd03
Adds supports for the majority of features2d to the Java wrappers:
...
* Adds the main features2d header to the parse list for the generator.
* Removes the manual definition of drawKeypoints and drawMatches since these are now included in the main header.
* Updates the generator to ignore SimpleBlobDetector, FlannBasedMatcher and DescriptorMatcher as these cause conflicts with the generator. This is okay since these were not previously included in the distribution anyway, so no harm is done.
2016-03-07 00:14:53 -08:00
Nikolay Polyarniy
46e08d34dd
T-API python support implemented:
...
- cv2.UMat implemented - python thin wrapper for UMat
- no implicit copy from GPU to Host done, resulting UMat can be passed to next function without overhead
- cv2.UMat.get() - to fetch data to Host
- new tests covers: ORB, BFMatcher, goodFeaturesToTrack, calcOpticalFlowPyrLK
2016-02-09 12:33:07 +03:00
Maksim Shabunin
92387b1ef8
Fix java version++
2015-12-18 18:02:16 +03:00
Maksim Shabunin
8d1f5b5490
Version++ for android
2015-12-18 17:57:07 +03:00
Maksim Shabunin
5ebc7f0b72
Simple Moments class for Java
2015-12-16 10:53:14 +03:00
Maksim Shabunin
6e9d0d9a0c
Visual Studio 2015 warning and test fixes
2015-10-20 12:48:37 +03:00
Alexander Alekhin
441eeef319
Merge pull request #5470 from apavlenko:android_camera_gl_view
2015-10-08 13:31:51 +00:00
Andrey Pavlenko
23fea91e84
minor fixes
2015-10-08 12:37:59 +03:00
Andrey Pavlenko
15db8243ef
refactored; added Camera2, notify callbacks, front/back maxCamera sizes; disable new stuff if target API < 21
2015-10-07 15:01:32 +03:00
Alexander Alekhin
33f5ac5c15
Merge pull request #5429 from PhilLab:patch-6
2015-10-05 12:50:17 +00:00
Philipp Hasper
05846438e3
Typo in CameraBridgeViewBase.java
...
Corrected typo and unused imports
2015-10-01 15:09:14 +02:00
Alexander Alekhin
eb2e061e3f
fix Android camera datarace (mCameraFrameReady)
2015-09-22 17:03:09 +03:00
Andrey Pavlenko
8e088d38a5
draft implementation of alternative CameraBridge via GLES
...
a simple sample will look like:
```java
public class MainActivity extends Activity implements CameraGLSurfaceView.CameraTextureListener {
CameraGLSurfaceView mView;
ByteBuffer buf;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,
WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
mView = new CameraGLSurfaceView(this, null);
mView.setCameraTextureListener(this);
setContentView(mView);
buf = ByteBuffer.allocateDirect(1920*1080*4);
}
@Override
protected void onPause() {
mView.onPause();
super.onPause();
}
@Override
protected void onResume() {
super.onResume();
mView.onResume();
}
@Override
public void onCameraViewStarted(int width, int height) {
// TODO Auto-generated method stub
}
@Override
public void onCameraViewStopped() {
// TODO Auto-generated method stub
}
@Override
public boolean onCameraFrame(int texIn, int texOut, int width, int height) {
Log.i("MAIN", "onCameraFrame");
int w=width, h=height;
/*
// option 1:
// just return 'false' to display texIn on screen
retutn false;
*/
/*
// option 2:
// fast copy texIn to texOut
GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texOut);
GLES20.glCopyTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, 0, 0, w, h, 0);
return true;
*/
// option 3:
// read, modify and write back pixels
GLES20.glReadPixels(0, 0, w, h, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, buf);
buf.rewind();
// red line
for(int i=0; i<h; i++) {
buf.position(w*4*i+i*4);
buf.put((byte) -1);
buf.position(w*4*i+i*4+4);
buf.put((byte) -1);
}
buf.rewind();
GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texOut);
GLES20.glTexSubImage2D(GLES20.GL_TEXTURE_2D, 0, 0, 0, w, h, GLES20.GL_RGBA, GLES20.GL_UNSIGNED_BYTE, buf);
return true;
}
}
```
2015-09-19 16:18:02 +03:00