Skip to content

Commit c05bfe9

Browse files
author
Roman Donchenko
committed
Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts: modules/features2d/include/opencv2/features2d/features2d.hpp modules/ocl/src/opencl/stereobp.cl modules/ocl/src/stereobp.cpp
2 parents de58039 + 1a24588 commit c05bfe9

File tree

15 files changed

+231
-155
lines changed

15 files changed

+231
-155
lines changed

3rdparty/tbb/CMakeLists.txt

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,23 @@ if (WIN32 AND NOT ARM)
55
message(FATAL_ERROR "BUILD_TBB option supports Windows on ARM only!\nUse regular official TBB build instead of the BUILD_TBB option!")
66
endif()
77

8-
# 4.1 update 4 - works fine
9-
set(tbb_ver "tbb41_20130613oss")
10-
set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130613oss_src.tgz")
11-
set(tbb_md5 "108c8c1e481b0aaea61878289eb28b6a")
12-
set(tbb_version_file "version_string.ver")
13-
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused-parameter)
14-
15-
# 4.1 update 3 dev - works fine
8+
if (WIN32 AND ARM)
9+
# 4.1 update 4 - The first release that supports Windows RT. Hangs on some Android devices
10+
set(tbb_ver "tbb41_20130613oss")
11+
set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130613oss_src.tgz")
12+
set(tbb_md5 "108c8c1e481b0aaea61878289eb28b6a")
13+
set(tbb_version_file "version_string.ver")
14+
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused-parameter)
15+
else()
16+
# 4.1 update 2 - works fine
17+
set(tbb_ver "tbb41_20130116oss")
18+
set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130116oss_src.tgz")
19+
set(tbb_md5 "3809790e1001a1b32d59c9fee590ee85")
20+
set(tbb_version_file "version_string.ver")
21+
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow)
22+
endif()
23+
24+
# 4.1 update 3 dev - Hangs on some Android devices
1625
#set(tbb_ver "tbb41_20130401oss")
1726
#set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130401oss_src.tgz")
1827
#set(tbb_md5 "f2f591a0d2ca8f801e221ce7d9ea84bb")

doc/tutorials/introduction/android_binary_package/O4A_SDK.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The structure of package contents looks as follows:
5151
OpenCV-2.4.6-android-sdk
5252
|_ apk
5353
| |_ OpenCV_2.4.6_binary_pack_armv7a.apk
54-
| |_ OpenCV_2.4.6_Manager_2.8_XXX.apk
54+
| |_ OpenCV_2.4.6_Manager_2.9_XXX.apk
5555
|
5656
|_ doc
5757
|_ samples
@@ -295,7 +295,7 @@ Well, running samples from Eclipse is very simple:
295295
.. code-block:: sh
296296
:linenos:
297297
298-
<Android SDK path>/platform-tools/adb install <OpenCV4Android SDK path>/apk/OpenCV_2.4.6_Manager_2.8_armv7a-neon.apk
298+
<Android SDK path>/platform-tools/adb install <OpenCV4Android SDK path>/apk/OpenCV_2.4.6_Manager_2.9_armv7a-neon.apk
299299
300300
.. note:: ``armeabi``, ``armv7a-neon``, ``arm7a-neon-android8``, ``mips`` and ``x86`` stand for
301301
platform targets:

modules/features2d/include/opencv2/features2d.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,11 @@ class CV_EXPORTS_W FastFeatureDetector : public FeatureDetector
535535
};
536536

537537

538-
class CV_EXPORTS GFTTDetector : public FeatureDetector
538+
class CV_EXPORTS_W GFTTDetector : public FeatureDetector
539539
{
540540
public:
541-
GFTTDetector( int maxCorners=1000, double qualityLevel=0.01, double minDistance=1,
542-
int blockSize=3, bool useHarrisDetector=false, double k=0.04 );
541+
CV_WRAP GFTTDetector( int maxCorners=1000, double qualityLevel=0.01, double minDistance=1,
542+
int blockSize=3, bool useHarrisDetector=false, double k=0.04 );
543543
AlgorithmInfo* info() const;
544544

545545
protected:

modules/highgui/src/cap_qtkit.mm

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,8 @@ - (IplImage*)getOutput;
275275
double sleepTime = 0.005;
276276
double total = 0;
277277

278-
NSDate *loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
279-
while (![capture updateImage] && (total += sleepTime)<=timeOut &&
280-
[[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode
281-
beforeDate:loopUntil])
282-
loopUntil = [NSDate dateWithTimeIntervalSinceNow:sleepTime];
278+
while (![capture updateImage] && (total += sleepTime)<=timeOut)
279+
usleep((int)(sleepTime*1000));
283280

284281
[localpool drain];
285282

modules/java/generator/src/java/android+JavaCameraView.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
3838
private boolean mStopThread;
3939

4040
protected Camera mCamera;
41-
protected JavaCameraFrame mCameraFrame;
41+
protected JavaCameraFrame[] mCameraFrame;
4242
private SurfaceTexture mSurfaceTexture;
4343

4444
public static class JavaCameraSizeAccessor implements ListItemAccessor {
@@ -180,7 +180,9 @@ protected boolean initializeCamera(int width, int height) {
180180

181181
AllocateCache();
182182

183-
mCameraFrame = new JavaCameraFrame(mFrameChain[mChainIdx], mFrameWidth, mFrameHeight);
183+
mCameraFrame = new JavaCameraFrame[2];
184+
mCameraFrame[0] = new JavaCameraFrame(mFrameChain[0], mFrameWidth, mFrameHeight);
185+
mCameraFrame[1] = new JavaCameraFrame(mFrameChain[1], mFrameWidth, mFrameHeight);
184186

185187
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
186188
mSurfaceTexture = new SurfaceTexture(MAGIC_TEXTURE_ID);
@@ -216,8 +218,10 @@ protected void releaseCamera() {
216218
mFrameChain[0].release();
217219
mFrameChain[1].release();
218220
}
219-
if (mCameraFrame != null)
220-
mCameraFrame.release();
221+
if (mCameraFrame != null) {
222+
mCameraFrame[0].release();
223+
mCameraFrame[1].release();
224+
}
221225
}
222226
}
223227

@@ -318,7 +322,7 @@ public void run() {
318322

319323
if (!mStopThread) {
320324
if (!mFrameChain[mChainIdx].empty())
321-
deliverAndDrawFrame(mCameraFrame);
325+
deliverAndDrawFrame(mCameraFrame[mChainIdx]);
322326
mChainIdx = 1 - mChainIdx;
323327
}
324328
} while (!mStopThread);

modules/ocl/include/opencv2/ocl/matrix_operations.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ namespace cv
211211
{
212212
flags &= roi.width < m.cols ? ~Mat::CONTINUOUS_FLAG : -1;
213213
offset += roi.y * step + roi.x * elemSize();
214-
CV_Assert( 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols &&
215-
0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows );
214+
CV_Assert( 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.wholecols &&
215+
0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.wholerows );
216216
if( refcount )
217217
CV_XADD(refcount, 1);
218218
if( rows <= 0 || cols <= 0 )

0 commit comments

Comments
 (0)