Commit Graph

707 Commits

Author SHA1 Message Date
abratchik
f978ee613e fix for #7510, #7511 and #7512 2016-10-31 11:07:56 +04:00
abratchik
78874c568e fix java wrapper autotests 2016-10-31 10:06:32 +04: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
Alexander Alekhin
5da8d65371 eliminate compiler warnings 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
Alexander Alekhin
67a734ce73 Merge branch '2.4' into master
Commits:
67fe57a add fixed video
db0ae2c Restore 2.4 source branch for bug fix 6317.
97ac59c Fix a memory leak indirectly caused by cvDestroyWindow
eb40afa Add a workaround for FFmpeg's color conversion accessing past the end of the buffer
421fcf9 Rearrange CvVideoWriter_FFMPEG::writeFrame for better readability
912592d Remove "INSTALL_NAME_DIR lib" target property
bb1c2d7 fix bug on border at pyrUp
2016-04-21 20:15:08 +03: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
Alexander Alekhin
1f7fea9092 Merge pull request #6244 from dreifachstein:topic-cmake-install 2016-04-05 15:23:55 +00:00
Maksim Shabunin
f3127521f3 Merge pull request #6214 from vonnieda:java_features2d 2016-03-21 11:51:11 +00:00
Xiaolei Yu
40eb613bbf Make install paths relative to CMAKE_INSTALL_PREFIX 2016-03-19 16:41:51 +08:00
Alexander Alekhin
cbd0ee21d5 revert: java bindings become CMake modules (loadable plugins)
This reverts part of commit 0db10a3052
2016-03-09 12:13:46 +03: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
Alexander Alekhin
be23846c4e update osx and ios build_framework.py 2015-12-17 16:17:31 +03:00
Maksim Shabunin
5ebc7f0b72 Simple Moments class for Java 2015-12-16 10:53:14 +03:00
Alexander Alekhin
0db10a3052 fixes #5019: python and java bindings become CMake modules (loadable plugins) 2015-12-14 16:20:18 +03:00
Maksim Shabunin
eebd4cad66 Fix compilation problems with XCode 7.1.1 and cmake 3.3.2 2015-11-17 18:52:55 +03:00
Maksim Shabunin
e8bf4417ef New variant of iOS framework building, fixed some warnings for XCode 7.1.1 and cmake 3.3.2 2015-11-17 15:30:01 +03:00
Maksim Shabunin
f49936a849 Fixed cmake and build issues when using Visual Studio 2015 2015-10-29 11:50:48 +03:00
Maksim Shabunin
6e9d0d9a0c Visual Studio 2015 warning and test fixes 2015-10-20 12:48:37 +03:00
Alexander Alekhin
ddd91bcebf android: add targetSdkVersion="21" 2015-10-12 18:12:34 +03:00
Alexander Alekhin
dbcc55a196 cleanup <build>/src|gen folders to remove stalled/unused Java files 2015-10-09 17:28:50 +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
Maksim Shabunin
31fbe8caeb Merge pull request #5255 from berak:java_videowriter 2015-09-11 11:09:16 +00:00
Alexander Alekhin
b15a9d675e cmake: use copy_if_different 2015-09-08 22:42:05 +03:00