opencv/modules
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
..
calib3d Update documentation in calib3d.hpp 2015-08-30 12:42:30 +03:00
core Merge pull request #5272 from avershov:opencl-vaapi-fallback 2015-09-14 11:54:20 +00:00
cudaarithm fixing GT and GE comparison symbol 2015-05-24 13:31:06 +02:00
cudabgsegm move obsolete algorithms from cudabgsegm to cudalegacy: 2015-01-19 14:17:00 +03:00
cudacodec Adding support for WinRT(WinPhone 8/8.1 and Win Store) via CMake 3.1 2015-03-02 22:26:43 +03:00
cudafeatures2d Adding support for WinRT(WinPhone 8/8.1 and Win Store) via CMake 3.1 2015-03-02 22:26:43 +03:00
cudafilters Adding support for WinRT(WinPhone 8/8.1 and Win Store) via CMake 3.1 2015-03-02 22:26:43 +03:00
cudaimgproc Fixes compilation errors when BUILD_CUDA_STUBS is ON 2015-07-29 08:59:38 -03:00
cudalegacy Some changes to support mingw-w64 2015-09-01 00:59:08 +03:00
cudaobjdetect changed hog to work with variable parameters and changed the hog sample to test it with more options 2015-08-12 09:16:20 +02:00
cudaoptflow Fixes namespace error on cudaoptflow 2015-07-29 14:22:45 -03:00
cudastereo Adding support for WinRT(WinPhone 8/8.1 and Win Store) via CMake 3.1 2015-03-02 22:26:43 +03:00
cudawarping Cast some image coordinates and sizes to double. 2015-04-25 18:54:53 +02:00
cudev add opencv_test_cudev to installation package 2015-07-03 13:33:36 +03:00
features2d Some changes to support mingw-w64 2015-09-01 00:59:08 +03:00
flann Fix iOS warnings about implicit conversion precision by changing double literals to float ones 2015-04-26 12:22:41 +02:00
hal v_extract universal intrinsic 2015-07-24 14:05:28 +03:00
highgui Merge pull request #5258 from sturkmen72:patch-6 2015-09-10 09:22:07 +00:00
imgcodecs Some changes to support mingw-w64 2015-09-01 00:59:08 +03:00
imgproc Fix LineAA in case of 4 channel 2015-09-12 01:42:25 +09:00
java draft implementation of alternative CameraBridge via GLES 2015-09-19 16:18:02 +03:00
ml Merge pull request #5294 from LorenaGdL:master 2015-09-09 13:41:39 +00:00
objdetect remove bindings generation for DetectionBasedTracker 2015-06-09 19:01:04 +03:00
photo typos in comments 2015-05-23 17:36:45 +02:00
python Fixing typo in variable name. 2015-08-12 20:50:05 +00:00
shape Python support 2015-03-02 18:13:00 +03:00
stitching fix cyclic deps error (world,shared) 2015-06-22 20:14:30 +03:00
superres superres: Fix return value VideoFrameSource_GPU 2015-05-26 16:54:35 +02:00
ts Fix for bug #5007: moved definition of Size_MatDepth_t and Size_MatDepth from ts_perf.hpp to perf_channels.cpp. This way they are closer to where they are needed and live in a different namespace (possibly the reason why the fix works). 2015-08-17 16:09:00 +01:00
video ocl: workaround for getUMat() 2015-09-09 18:56:14 +03:00
videoio cmake: use copy_if_different 2015-09-08 22:42:05 +03:00
videostab Added configuration changes enabling videoio WinRT support. 2015-05-15 16:29:06 +03:00
viz Added new functionalities to viz module 2015-08-15 01:03:59 +02:00
world fix tests build (win,shared,world) 2015-06-05 16:30:36 +03:00
CMakeLists.txt world fix 2014-08-05 20:12:35 +04:00