Merge branch '2.4'
This commit is contained in:
@@ -283,7 +283,14 @@ if(BUILD_FAT_JAVA_LIB)
|
||||
if(__extradeps)
|
||||
list(REMOVE_ITEM __deps ${__extradeps})
|
||||
endif()
|
||||
target_link_libraries(${the_module} -Wl,-whole-archive ${__deps} -Wl,-no-whole-archive ${__extradeps} ${OPENCV_LINKER_LIBS})
|
||||
if(APPLE)
|
||||
foreach(_dep ${__deps})
|
||||
target_link_libraries(${the_module} -Wl,-force_load "${_dep}")
|
||||
endforeach()
|
||||
else()
|
||||
target_link_libraries(${the_module} -Wl,-whole-archive ${__deps} -Wl,-no-whole-archive)
|
||||
endif()
|
||||
target_link_libraries(${the_module} ${__extradeps} ${OPENCV_LINKER_LIBS})
|
||||
else()
|
||||
target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS})
|
||||
endif()
|
||||
|
@@ -14,7 +14,7 @@ ocv_list_filterout(opencv_test_java_files ".svn")
|
||||
|
||||
# copy sources out from the build tree
|
||||
set(opencv_test_java_file_deps "")
|
||||
foreach(f ${opencv_test_java_files} ${ANDROID_MANIFEST_FILE})
|
||||
foreach(f ${opencv_test_java_files} ${ANDROID_MANIFEST_FILE} ".classpath" ".project")
|
||||
add_custom_command(
|
||||
OUTPUT "${opencv_test_java_bin_dir}/${f}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${f}" "${opencv_test_java_bin_dir}/${f}"
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package org.opencv.test.features2d;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@@ -204,7 +205,17 @@ public class BruteForceHammingDescriptorMatcherTest extends OpenCVTestCase {
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloat() {
|
||||
fail("Not yet implemented");
|
||||
Mat train = getTrainDescriptors();
|
||||
Mat query = getQueryDescriptors();
|
||||
ArrayList<MatOfDMatch> matches = new ArrayList<MatOfDMatch>();
|
||||
|
||||
matcher.radiusMatch(query, train, matches, 50.f);
|
||||
|
||||
assertEquals(matches.size(), 4);
|
||||
assertTrue(matches.get(0).empty());
|
||||
assertMatEqual(matches.get(1), new MatOfDMatch(truth[1]), EPS);
|
||||
assertMatEqual(matches.get(2), new MatOfDMatch(truth[2]), EPS);
|
||||
assertTrue(matches.get(3).empty());
|
||||
}
|
||||
|
||||
public void testRadiusMatchMatListOfListOfDMatchFloatListOfMat() {
|
||||
|
@@ -54,6 +54,9 @@ public abstract class CameraBridgeViewBase extends SurfaceView implements Surfac
|
||||
public CameraBridgeViewBase(Context context, int cameraId) {
|
||||
super(context);
|
||||
mCameraIndex = cameraId;
|
||||
getHolder().addCallback(this);
|
||||
mMaxWidth = MAX_UNSPECIFIED;
|
||||
mMaxHeight = MAX_UNSPECIFIED;
|
||||
}
|
||||
|
||||
public CameraBridgeViewBase(Context context, AttributeSet attrs) {
|
||||
|
@@ -60,7 +60,6 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
|
||||
|
||||
public JavaCameraView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
Log.d(TAG, "Java camera view ctor");
|
||||
}
|
||||
|
||||
protected boolean initializeCamera(int width, int height) {
|
||||
@@ -237,10 +236,8 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
|
||||
}
|
||||
|
||||
public void onPreviewFrame(byte[] frame, Camera arg1) {
|
||||
Log.i(TAG, "Preview Frame received. Need to create MAT and deliver it to clients");
|
||||
Log.i(TAG, "Frame size is " + frame.length);
|
||||
synchronized (this)
|
||||
{
|
||||
Log.d(TAG, "Preview Frame received. Frame size: " + frame.length);
|
||||
synchronized (this) {
|
||||
mFrameChain[1 - mChainIdx].put(0, 0, frame);
|
||||
this.notify();
|
||||
}
|
||||
@@ -248,8 +245,7 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
|
||||
mCamera.addCallbackBuffer(mBuffer);
|
||||
}
|
||||
|
||||
private class JavaCameraFrame implements CvCameraViewFrame
|
||||
{
|
||||
private class JavaCameraFrame implements CvCameraViewFrame {
|
||||
public Mat gray() {
|
||||
return mYuvFrameData.submat(0, mHeight, 0, mWidth);
|
||||
}
|
||||
|
@@ -22,6 +22,12 @@ public class OpenCVLoader
|
||||
*/
|
||||
public static final String OPENCV_VERSION_2_4_4 = "2.4.4";
|
||||
|
||||
/**
|
||||
* OpenCV Library version 2.4.5.
|
||||
*/
|
||||
public static final String OPENCV_VERSION_2_4_5 = "2.4.5";
|
||||
|
||||
|
||||
/**
|
||||
* Loads and initializes OpenCV library from current application package. Roughly, it's an analog of system.loadLibrary("opencv_java").
|
||||
* @return Returns true is initialization of OpenCV was successful.
|
||||
|
@@ -16,8 +16,8 @@ public class MatOfDMatch extends Mat {
|
||||
|
||||
protected MatOfDMatch(long addr) {
|
||||
super(addr);
|
||||
if(checkVector(_channels, _depth) < 0 )
|
||||
throw new IllegalArgumentException("Incomatible Mat");
|
||||
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||
throw new IllegalArgumentException("Incomatible Mat: " + toString());
|
||||
//FIXME: do we need release() here?
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ public class MatOfDMatch extends Mat {
|
||||
|
||||
public MatOfDMatch(Mat m) {
|
||||
super(m, Range.all());
|
||||
if(checkVector(_channels, _depth) < 0 )
|
||||
throw new IllegalArgumentException("Incomatible Mat");
|
||||
if( !empty() && checkVector(_channels, _depth) < 0 )
|
||||
throw new IllegalArgumentException("Incomatible Mat: " + toString());
|
||||
//FIXME: do we need release() here?
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user