Commit Graph

20374 Commits

Author SHA1 Message Date
berak
2f7c926670 remove usage of obsolete _dataAsRows flag 2015-09-21 07:59:09 +02:00
Suleyman TURKMEN
dff9d2288b Update window_w32.cpp 2015-09-21 00:34:15 +03:00
Alexander Alekhin
d3071db0d7 add some CommandLineParser tests 2015-09-20 13:14:41 +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
Pavel Rojtberg
31da833574 ts/ts_perf: fix wrong has() usage
`has()` only tests for an argument presence which is always true for
arguments with default values. Use `get<bool>()` to check the value
instead.
2015-09-18 18:42:14 +02:00
Pavel Rojtberg
96cc618410 has() should only test for the presence of the argument
and not consider its value. treat arguments with a set default value as
present.
2015-09-18 18:42:14 +02:00
Pavel Rojtberg
08dd126f08 do not parse empty default values and improve error messages 2015-09-18 18:42:14 +02:00
Alexander Alekhin
0051208684 Merge pull request #5349 from lupustr3:pvlasov/tls_update 2015-09-18 14:39:08 +00:00
Alexander Alekhin
d2b10d8aa1 Merge pull request #5355 from renatoGarcia:master 2015-09-18 13:38:29 +00:00
Alexander Alekhin
e1b0d341e4 Merge pull request #5360 from SpecLad:test2-fail-on-failed-download 2015-09-18 12:10:52 +00:00
Alexander Alekhin
1b2c11e7b3 Merge pull request #5343 from paroj:boolean_algebra 2015-09-18 12:06:31 +00:00
Sergey Alexandrov
4094b2d7a5 Use stream argument when launching bilateral filter kernel 2015-09-18 13:12:58 +02:00
Alexander Alekhin
af0942c78f Merge pull request #5335 from Dikay900:ports_to_master 2015-09-18 11:06:08 +00:00
Pavel Rojtberg
f0282337e3 simplify error conditions
`A || !A` is `true` so write `(A && B) || !A` as `B || !A`
2015-09-18 12:12:49 +02:00
jisli
f88e9a748a update ffmpeg support
Migration have been done for these ffmpeg/libav changes:

2013-12-11 - 29c83d2 / b9fb59d,409a143 / 9431356,44967ab / d7b3ee9 - lavc 55.45.101 / 55.28.1 - avcodec.h
  av_frame_alloc(), av_frame_unref() and av_frame_free() now can and should be
  used instead of avcodec_alloc_frame(), avcodec_get_frame_defaults() and
  avcodec_free_frame() respectively. The latter three functions are deprecated.

2012-10-08 - ae77266 / 78071a1 - lavu 51.74.100 / 51.42.0 - pixfmt.h
  Rename PixelFormat to AVPixelFormat and all PIX_FMT_* to AV_PIX_FMT_*.
  To provide backwards compatibility, PixelFormat is now #defined as
  AVPixelFormat.
  Note that this can break user code that includes pixfmt.h and uses the
  'PixelFormat' identifier. Such code should either #undef PixelFormat
  or stop using the PixelFormat name.
2015-09-17 20:24:37 +03:00
Roman Donchenko
08ad3b500b test2.py: switch from urllib to urllib2
urllib2 raises an exception if an HTTP request produces an error code,
making the test fail earlier.
2015-09-17 18:24:30 +03:00
Roman Donchenko
56f17e4921 test2.py: fail if a downloaded image can't be decoded 2015-09-17 18:17:06 +03:00
Roman Donchenko
293ea03dcc test2.py: remove unused imports 2015-09-17 18:14:49 +03:00
Pavel Vlasov
aa485ccd75 TLS keys leak fix;
Disables TLS copy constructor and operator, as they can lead to errors and reservation of too much keys in TLS storage;

gather method was added to TLS to gather data from all threads;
2015-09-17 15:49:20 +03:00
StevenPuttemans
e9037644c3 add link to contributing guidelines 2015-09-17 14:15:20 +02:00
StevenPuttemans
bef1b5322e add link to contributing guidelines 2015-09-17 14:14:21 +02:00
Alexander Smorkalov
e6f3f3c029 OpenCV version++. 2015-09-17 14:02:36 +03:00
Ilya Lavrenov
7746d9b7cc fix for corrent modules dependencies
(cherry picked from commit 1c3d83df54)
2015-09-17 13:45:08 +03:00
Vladislav Vinogradov
3494d640df add extra checks to data_step_down to prevent out-of-border access
(cherry picked from commit 3ef067cc65)
2015-09-17 13:44:56 +03:00
Vladislav Vinogradov
c22cc67ba8 revert previous change in gpu::StereoBeliefPropogation
(cherry picked from commit f903192c17)
2015-09-17 13:44:33 +03:00
Vladislav Vinogradov
558054a53d fix for gpu::StereoBeliefPropogation:
use continuous memory for internal buffers

(cherry picked from commit e2a9df408f)
2015-09-17 13:44:17 +03:00
Elena Shipunova
c7b471f10f do not proceed with removing zero-length slice
(cherry picked from commit 036c3b4e6d)
2015-09-17 13:43:54 +03:00
Ilya Lavrenov
f4ffcae8d9 initialize padding of CvString with zeros
(cherry picked from commit 7b1eb3af7b)
2015-09-17 13:43:37 +03:00
Ilya Lavrenov
0422054aa1 fixed warnings in gpu module
(cherry picked from commit 6a05939e1c)
2015-09-17 13:41:51 +03:00
Ilya Lavrenov
a81f0a5123 fixed uninitialized memory writing/reading in flann
(cherry picked from commit 3934d61de7)
2015-09-17 13:41:31 +03:00
Ilya Lavrenov
c36582d2df fixed memory leak in flann index
(cherry picked from commit 32d7c1950a)
2015-09-17 13:41:16 +03:00
Ilya Lavrenov
d50c07e303 fixed "Conditional jump or move depends on uninitialised value(s)" in GBD
(cherry picked from commit 887736bcd4)
2015-09-17 13:41:03 +03:00
Ilya Lavrenov
54693b3fa7 fixed memory leak in GBTrees
(cherry picked from commit 1b8c2589c0)
2015-09-17 13:40:50 +03:00
Ilya Lavrenov
3c3bc123fc release filestorage before exception
(cherry picked from commit 3a1bb93340)
2015-09-17 13:40:36 +03:00
Ilya Lavrenov
ac33cd688c fixed memory leak in ANN
(cherry picked from commit dfb49097e3)
2015-09-17 13:40:14 +03:00
Ilya Lavrenov
b5e42d8cc1 fixed memory leak in ml module
(cherry picked from commit d7bb1025f3)
2015-09-17 13:40:02 +03:00
Ilya Lavrenov
7e4e8921bc fixed memory leak in descriptor regression tests 2015-09-17 13:39:44 +03:00
Ilya Lavrenov
6dcd455ac4 fixed memory leaks in modules/features2d/test/test_nearestneighbors.cpp 2015-09-17 13:39:34 +03:00
Vladislav Vinogradov
1d58e1a14a fix potential out-of-border access in gpu StereoBeliefPropagation 2015-09-17 13:39:17 +03:00
Roman Donchenko
d122510c4f Only conflict with packages corresponding to modules that are built 2015-09-17 13:39:03 +03:00
Roman Donchenko
6613d14261 Add missing packages to the Debian conflict list
And refactor the code to make sure that the dev and runtime package lists are
in sync.
2015-09-17 13:38:52 +03:00
a-andre
a14e524b32 fix documentation builder warnings 2015-09-17 13:38:25 +03:00
a-andre
226ff93917 install new headers like "opencv2/core.hpp" 2015-09-17 13:38:11 +03:00
Ilya Lavrenov
d28e6c9b36 fixed memory leak caused by illegal memory access
(cherry picked from commit 4722b2d0e5)
2015-09-17 13:37:52 +03:00
Ilya Lavrenov
c16f465ff5 fixed "Conditional jump or move depends on uninitialised value" warning
(cherry picked from commit f100cdb6d4)
2015-09-17 13:37:38 +03:00
Roman Donchenko
3231c2f995 NearestNeighborTest: use ts->get_rng() instead of (implicit) theRNG()
This ensures that test data is not dependent on the order the tests are
executed in.

(cherry picked from commit 1245cd1752)
2015-09-17 13:37:26 +03:00
Ilya Lavrenov
16bcc30e42 typo
(cherry picked from commit 793bdaada7)
2015-09-17 13:37:12 +03:00
Ilya Lavrenov
69c50e0181 fixed typo
(cherry picked from commit 370d1ff21a)
2015-09-17 13:37:02 +03:00
Ilya Lavrenov
486c40f578 fixed uninitialized values warning in bad arg test class
(cherry picked from commit 47cee8715b)
2015-09-17 13:36:51 +03:00
Ilya Lavrenov
08e38e9ff9 fixed memory leaks in warpAffine tests
(cherry picked from commit b70e27e076)
2015-09-17 13:36:35 +03:00