Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.4' into merge-2.4
Browse files Browse the repository at this point in the history
Conflicts:
	modules/features2d/include/opencv2/features2d/features2d.hpp
	modules/ocl/src/opencl/stereobp.cl
	modules/ocl/src/stereobp.cpp
  • Loading branch information
Roman Donchenko committed Jul 8, 2013
2 parents de58039 + 1a24588 commit c05bfe9
Show file tree
Hide file tree
Showing 15 changed files with 231 additions and 155 deletions.
25 changes: 17 additions & 8 deletions 3rdparty/tbb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,23 @@ if (WIN32 AND NOT ARM)
message(FATAL_ERROR "BUILD_TBB option supports Windows on ARM only!\nUse regular official TBB build instead of the BUILD_TBB option!")
endif()

# 4.1 update 4 - works fine
set(tbb_ver "tbb41_20130613oss")
set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130613oss_src.tgz")
set(tbb_md5 "108c8c1e481b0aaea61878289eb28b6a")
set(tbb_version_file "version_string.ver")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused-parameter)

# 4.1 update 3 dev - works fine
if (WIN32 AND ARM)
# 4.1 update 4 - The first release that supports Windows RT. Hangs on some Android devices
set(tbb_ver "tbb41_20130613oss")
set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130613oss_src.tgz")
set(tbb_md5 "108c8c1e481b0aaea61878289eb28b6a")
set(tbb_version_file "version_string.ver")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused-parameter)
else()
# 4.1 update 2 - works fine
set(tbb_ver "tbb41_20130116oss")
set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130116oss_src.tgz")
set(tbb_md5 "3809790e1001a1b32d59c9fee590ee85")
set(tbb_version_file "version_string.ver")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow)
endif()

# 4.1 update 3 dev - Hangs on some Android devices
#set(tbb_ver "tbb41_20130401oss")
#set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130401oss_src.tgz")
#set(tbb_md5 "f2f591a0d2ca8f801e221ce7d9ea84bb")
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/introduction/android_binary_package/O4A_SDK.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The structure of package contents looks as follows:
OpenCV-2.4.6-android-sdk
|_ apk
| |_ OpenCV_2.4.6_binary_pack_armv7a.apk
| |_ OpenCV_2.4.6_Manager_2.8_XXX.apk
| |_ OpenCV_2.4.6_Manager_2.9_XXX.apk
|
|_ doc
|_ samples
Expand Down Expand Up @@ -295,7 +295,7 @@ Well, running samples from Eclipse is very simple:
.. code-block:: sh
:linenos:
<Android SDK path>/platform-tools/adb install <OpenCV4Android SDK path>/apk/OpenCV_2.4.6_Manager_2.8_armv7a-neon.apk
<Android SDK path>/platform-tools/adb install <OpenCV4Android SDK path>/apk/OpenCV_2.4.6_Manager_2.9_armv7a-neon.apk
.. note:: ``armeabi``, ``armv7a-neon``, ``arm7a-neon-android8``, ``mips`` and ``x86`` stand for
platform targets:
Expand Down
6 changes: 3 additions & 3 deletions modules/features2d/include/opencv2/features2d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,11 @@ class CV_EXPORTS_W FastFeatureDetector : public FeatureDetector
};


class CV_EXPORTS GFTTDetector : public FeatureDetector
class CV_EXPORTS_W GFTTDetector : public FeatureDetector
{
public:
GFTTDetector( int maxCorners=1000, double qualityLevel=0.01, double minDistance=1,
int blockSize=3, bool useHarrisDetector=false, double k=0.04 );
CV_WRAP GFTTDetector( int maxCorners=1000, double qualityLevel=0.01, double minDistance=1,
int blockSize=3, bool useHarrisDetector=false, double k=0.04 );
AlgorithmInfo* info() const;

protected:
Expand Down
7 changes: 2 additions & 5 deletions modules/highgui/src/cap_qtkit.mm
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,8 @@ - (IplImage*)getOutput;
double sleepTime = 0.005;
double total = 0;

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

[localpool drain];

Expand Down
14 changes: 9 additions & 5 deletions modules/java/generator/src/java/android+JavaCameraView.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
private boolean mStopThread;

protected Camera mCamera;
protected JavaCameraFrame mCameraFrame;
protected JavaCameraFrame[] mCameraFrame;
private SurfaceTexture mSurfaceTexture;

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

AllocateCache();

mCameraFrame = new JavaCameraFrame(mFrameChain[mChainIdx], mFrameWidth, mFrameHeight);
mCameraFrame = new JavaCameraFrame[2];
mCameraFrame[0] = new JavaCameraFrame(mFrameChain[0], mFrameWidth, mFrameHeight);
mCameraFrame[1] = new JavaCameraFrame(mFrameChain[1], mFrameWidth, mFrameHeight);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
mSurfaceTexture = new SurfaceTexture(MAGIC_TEXTURE_ID);
Expand Down Expand Up @@ -216,8 +218,10 @@ protected void releaseCamera() {
mFrameChain[0].release();
mFrameChain[1].release();
}
if (mCameraFrame != null)
mCameraFrame.release();
if (mCameraFrame != null) {
mCameraFrame[0].release();
mCameraFrame[1].release();
}
}
}

Expand Down Expand Up @@ -318,7 +322,7 @@ public void run() {

if (!mStopThread) {
if (!mFrameChain[mChainIdx].empty())
deliverAndDrawFrame(mCameraFrame);
deliverAndDrawFrame(mCameraFrame[mChainIdx]);
mChainIdx = 1 - mChainIdx;
}
} while (!mStopThread);
Expand Down
4 changes: 2 additions & 2 deletions modules/ocl/include/opencv2/ocl/matrix_operations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ namespace cv
{
flags &= roi.width < m.cols ? ~Mat::CONTINUOUS_FLAG : -1;
offset += roi.y * step + roi.x * elemSize();
CV_Assert( 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols &&
0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows );
CV_Assert( 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.wholecols &&
0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.wholerows );
if( refcount )
CV_XADD(refcount, 1);
if( rows <= 0 || cols <= 0 )
Expand Down
Loading

0 comments on commit c05bfe9

Please sign in to comment.