1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-28 23:03:03 +04:00

Merge remote-tracking branch 'origin/2.4' into merge-2.4

Conflicts:
	apps/CMakeLists.txt
	modules/contrib/CMakeLists.txt
	modules/core/include/opencv2/core/version.hpp
	modules/imgproc/include/opencv2/imgproc/imgproc.hpp
	modules/java/generator/gen_java.py
	modules/ocl/include/opencv2/ocl/ocl.hpp
	modules/ocl/src/cl_runtime/cl_runtime.cpp
	modules/ocl/src/columnsum.cpp
	modules/ocl/src/filtering.cpp
	modules/ocl/src/imgproc.cpp
	modules/ocl/test/main.cpp
	modules/ocl/test/test_color.cpp
	modules/ocl/test/test_imgproc.cpp
	samples/gpu/CMakeLists.txt
This commit is contained in:
Roman Donchenko
2013-10-22 14:28:00 +04:00
153 changed files with 26590 additions and 9161 deletions
+3 -3
View File
@@ -330,16 +330,16 @@ if(ENABLE_SOLUTION_FOLDERS)
endif()
if(ANDROID)
install(TARGETS ${the_module}
ocv_install_target(${the_module} EXPORT OpenCVModules
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main)
else()
if(NOT INSTALL_CREATE_DISTRIB)
install(TARGETS ${the_module}
ocv_install_target(${the_module} EXPORT OpenCVModules
RUNTIME DESTINATION ${JAR_INSTALL_DIR} COMPONENT main
LIBRARY DESTINATION ${JAR_INSTALL_DIR} COMPONENT main)
else()
install(TARGETS ${the_module}
ocv_install_target(${the_module} EXPORT OpenCVModules
RUNTIME DESTINATION ${JAR_INSTALL_DIR}/${OpenCV_ARCH} COMPONENT main
LIBRARY DESTINATION ${JAR_INSTALL_DIR}/${OpenCV_ARCH} COMPONENT main)
endif()
+16 -6
View File
@@ -806,12 +806,22 @@ public class %(jc)s {
version_suffix = ''.join( (epoch, major, minor) )
self.classes[class_name].imports.add("java.lang.String")
self.java_code[class_name]["j_code"].write("""
public static final String VERSION = "%(v)s", NATIVE_LIBRARY_NAME = "opencv_java%(vs)s";
public static final int VERSION_EPOCH = %(ep)s;
public static final int VERSION_MAJOR = %(ma)s;
public static final int VERSION_MINOR = %(mi)s;
public static final int VERSION_REVISION = %(re)s;
public static final String VERSION_STATUS = "%(st)s";
// these constants are wrapped inside functions to prevent inlining
private static String getVersion() { return "%(v)s"; }
private static String getNativeLibraryName() { return "opencv_java%(vs)s"; }
private static int getVersionEpoch() { return %(ep)s; }
private static int getVersionMajor() { return %(ma)s; }
private static int getVersionMinor() { return %(mi)s; }
private static int getVersionRevision() { return %(re)s; }
private static String getVersionStatus() { return "%(st)s"; }
public static final String VERSION = getVersion();
public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
public static final int VERSION_EPOCH = getVersionEpoch();
public static final int VERSION_MAJOR = getVersionMajor();
public static final int VERSION_MINOR = getVersionMinor();
public static final int VERSION_REVISION = getVersionRevision();
public static final String VERSION_STATUS = getVersionStatus();
""" % { 'v' : version_str, 'vs' : version_suffix, 'ep' : epoch, 'ma' : major, 'mi' : minor, 're' : revision, 'st': status } )
+16 -10
View File
@@ -10,6 +10,9 @@ set(opencv_test_java_bin_dir "${CMAKE_CURRENT_BINARY_DIR}/.build")
set(android_source_dir "${CMAKE_CURRENT_SOURCE_DIR}/../android_test")
set(java_source_dir ${CMAKE_CURRENT_SOURCE_DIR})
# make sure the build directory exists
file(MAKE_DIRECTORY "${opencv_test_java_bin_dir}")
# get project sources
file(GLOB_RECURSE opencv_test_java_files RELATIVE "${android_source_dir}" "${android_source_dir}/res/*" "${android_source_dir}/src/*.java")
# These are the files that need to be updated for pure Java.
@@ -58,14 +61,6 @@ add_custom_command(OUTPUT "${opencv_test_java_bin_dir}/build.xml"
COMMENT "Copying build.xml"
)
# Create a script for running the Java tests and place it in build/bin.
#if(WIN32)
#file(WRITE "${CMAKE_BINARY_DIR}/bin/opencv_test_java.cmd" "cd ${opencv_test_java_bin_dir}\nset PATH=${EXECUTABLE_OUTPUT_PATH}/Release;%PATH%\nant -DjavaLibraryPath=${EXECUTABLE_OUTPUT_PATH}/Release buildAndTest")
#file(WRITE "${CMAKE_BINARY_DIR}/bin/opencv_test_java_D.cmd" "cd ${opencv_test_java_bin_dir}\nset PATH=${EXECUTABLE_OUTPUT_PATH}/Debug;%PATH%\nant -DjavaLibraryPath=${EXECUTABLE_OUTPUT_PATH}/Debug buildAndTest")
#else()
#file(WRITE "${CMAKE_BINARY_DIR}/bin/opencv_test_java.sh" "cd ${opencv_test_java_bin_dir};\nant -DjavaLibraryPath=${LIBRARY_OUTPUT_PATH} buildAndTest;\ncd -")
#endif()
add_custom_command(OUTPUT "${opencv_test_java_bin_dir}/build/jar/opencv-test.jar"
COMMAND "${ANT_EXECUTABLE}" build
WORKING_DIRECTORY "${opencv_test_java_bin_dir}"
@@ -73,8 +68,19 @@ add_custom_command(OUTPUT "${opencv_test_java_bin_dir}/build/jar/opencv-test.jar
COMMENT "Build Java tests"
)
add_custom_target(${PROJECT_NAME} ALL SOURCES "${opencv_test_java_bin_dir}/build/jar/opencv-test.jar")
add_dependencies(${PROJECT_NAME} ${the_module})
# Not add_custom_command because generator expressions aren't supported in
# OUTPUT file names, and we need to generate different files for different
# configurations.
add_custom_target(${PROJECT_NAME}_properties
COMMAND "${CMAKE_COMMAND}" -E echo "opencv.lib.path = $<TARGET_FILE_DIR:${the_module}>"
> "${opencv_test_java_bin_dir}/ant-$<CONFIGURATION>.properties"
VERBATIM
)
add_custom_target(${PROJECT_NAME} ALL
DEPENDS ${the_module} ${PROJECT_NAME}_properties
SOURCES "${opencv_test_java_bin_dir}/build/jar/opencv-test.jar"
)
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "tests accuracy")
+5 -3
View File
@@ -1,4 +1,6 @@
<project>
<property file="ant-${opencv.build.type}.properties"/>
<path id="master-classpath">
<fileset dir="lib">
<include name="*.jar"/>
@@ -34,8 +36,8 @@
<target name="test">
<mkdir dir="testResults"/>
<junit printsummary="true" haltonfailure="false" haltonerror="false" showoutput="false" logfailedtests="true" maxmemory="256m">
<sysproperty key="java.library.path" path="${javaLibraryPath}"/>
<env key="PATH" path="${javaLibraryPath}"/>
<sysproperty key="java.library.path" path="${opencv.lib.path}"/>
<env key="PATH" path="${opencv.lib.path}"/>
<classpath refid="master-classpath"/>
<classpath>
<pathelement location="build/classes"/>
@@ -61,4 +63,4 @@
<antcall target="jar"/>
<antcall target="test"/>
</target>
</project>
</project>
@@ -2,7 +2,6 @@ package org.opencv.test;
import java.io.File;
import java.io.IOException;
import junit.framework.Assert;
import org.opencv.core.Mat;