Commit Graph

52 Commits

Author SHA1 Message Date
Alexander Alekhin
14d5098ca2 Merge pull request #20903 from alalek:samples_fix_nothreads_build 2021-10-21 13:04:01 +00:00
Alexander Alekhin
805c2832c1 4.x: drop DISABLE_OPENCV_24_COMPATIBILITY macro
not used in 4.x code
2021-10-20 05:45:40 +00:00
Alexander Alekhin
6d5fdfbf73 samples: fix build without threading support 2021-10-19 09:31:12 +00:00
Alexander Alekhin
31c40fa4cc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-10-15 13:35:03 +00:00
Stanislaw Halik
3d93675ff9 fix link error on shared libs with -MT 2021-10-12 17:50:31 +02:00
Francesco Petrogalli
d29c7e7871
Merge pull request #20392 from fpetrogalli:aarch64-semihosting
AArch64 semihosting

* [ts] Disable filesystem support in the TS module.

Because of this change, all the tests loading data will file, but tat
least the core module can be tested with the following line:

    opencv_test_core --gtest_filter=-"*Core_InputOutput*:*Core_globbing.accuracy*"

* [aarch64] Build OpenCV for AArch64 semihosting.

This patch provide a toolchain file that allows to build the library
for semihosting applications [1]. Minimal changes have been applied to
the code to be able to compile with a baremetal toolchain.

[1] https://developer.arm.com/documentation/100863/latest

The option `CV_SEMIHOSTING` is used to guard the bits in the code that
are specific to the target.

To build the code:

    cmake ../opencv/ \
        -DCMAKE_TOOLCHAIN_FILE=../opencv/platforms/semihosting/aarch64-semihosting.toolchain.cmake \
        -DSEMIHOSTING_TOOLCHAIN_PATH=/path/to/baremetal-toolchain/bin/ \
        -DBUILD_EXAMPLES=ON -GNinja

A barematel toolchain for targeting aarch64 semihosting can be found
at [2], under `aarch64-none-elf`.

[2] https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads

The folder `samples/semihosting` provides two example semihosting
applications.

The two binaries can be executed on the host platform with:

    qemu-aarch64 ./bin/example_semihosting_histogram
    qemu-aarch64 ./bin/example_semihosting_norm

Similarly, the test and perf executables of the modules can be run
with:

    qemu-aarch64 ./bin/opecv_[test|perf]_<module>

Notice that filesystem support is disabled by the toolchain file,
hence some of the test that depend on filesystem support will fail.

* [semihosting] Remove blank like at the end of file. [NFC]

The spurious blankline was reported by
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31158.

* [semihosting] Make the raw pixel file generation OS independent.

Use the facilities provided by Cmake to generate the header file
instead of a shell script, so that the build doesn't fail on systems
that do not have a unix shell.

* [semihosting] Rename variable for semihosting compilation.

* [semihosting] Move the cmake configuration to a variable file.

* [semihosting] Make the guard macro private for the core module.

* [semihosting] Remove space. [NFC]

* [semihosting] Improve comment with information about semihosting. [NFC]

* [semihosting] Update license statement on top of sourvce file. [NFC]

* [semihosting] Replace BM_SUFFIX with SEMIHOSTING_SUFFIX. [NFC]

* [semihosting] Remove double space. [NFC]

* [semihosting] Add some text output to the sample applications.

* [semihosting] Remove duplicate entry in cmake configuration. [NFCI]

* [semihosting] Replace `long` with `int` in sample apps. [NFCI]

* [semihosting] Use `configure_file` to create the random pixels. [NFCI]

* [semihosting][bugfix] Fix name of cmakedefine variable.

* [semihosting][samples] Use CV_8UC1 for grayscale images. [NFCI]

* [semihosting] Add readme file.

* [semihosting] Remove blank like at the end of README. [NFC]

This fixes the failure at
https://pullrequest.opencv.org/buildbot/builders/precommit_docs/builds/31272.
2021-07-21 18:46:05 +03:00
Odianosen Ejale
862fc06b6f Fixed and updated OpenCL-VA interoperability 2020-09-25 16:11:50 +03:00
Alexander Alekhin
2129c72bc0 core(OpenCL): thread-local OpenCL execution context 2020-09-02 05:04:20 +00:00
Alexander Alekhin
aa2777ed61 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-02-10 19:40:29 +03:00
Igor Murzov
981e63d8c2 Install all CMake files required to build samples
CMakeLists.txt includes samples_utils.cmake, so the later should be
installed as well to make samples build successfully
2020-02-06 18:07:36 +03:00
Alexander Alekhin
01c1b341a8 cmake: enable C++11 implicitly 2020-02-03 17:45:37 +03:00
Giles Payne
a897fc91ec Add no_samples_build option to Android SDK build 2019-07-18 21:31:02 +09:00
Alexander Alekhin
e21262deba Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-05-16 04:40:39 +00:00
Alexander Alekhin
3201ea89d6 cmake: enable threading in samples
- moved code into separate file due issue with handling of CMake policies
2019-05-14 17:29:46 +03:00
Alexander Alekhin
4eb2966559 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-07 20:12:10 +03:00
Maksim Shabunin
df9efbbd1f Install data for samples to correct directories, do not download face_detector models in cmake 2018-08-02 14:24:05 +03:00
Alexander Alekhin
d4688e6474 cmake: require C++11 and CMake 3.5.1+ 2018-04-10 18:09:54 +03:00
Alexander Alekhin
7f9253ea0a samples: avoid using of legacy C-like API
- CV_RGB() macro is moved into opencv2/imgproc.hpp from imgproc_c.h
- samples/cpp/filestorage_base64.cpp is dropped
2018-03-26 13:42:35 +03:00
Maksim Shabunin
2d1350a9d6 Added group targets for samples (opencv_samples, opencv_samples_<group>), install samples/data inseparate component 'samples_data' 2018-02-12 18:42:36 +03:00
Maksim Shabunin
2200e13c71 cmake: refactored scripts with samples building:
- allow installing samples sources on all platforms
  even if BUILD_EXAMPLES is disabled,  fixed minor
  issues in sources installation process
- use 'example_<group>_<name>' scheme for target and binary file naming
- use single function for sample executable creation
2018-02-12 18:42:36 +03:00
tribta
98849151a2 formating style and making changes accordingly to review 2017-06-28 11:05:18 +01:00
Cartucho
fd91072990 Merge branch 'master' into compiling_java_code 2017-06-27 02:32:11 +01:00
tribta
3611396c0b Compiling the Java tutorials codes using Apache Ant. 2017-06-27 02:30:22 +01:00
Alexander Alekhin
14de8ac951 dnn: move samples 2017-06-26 14:51:12 +03:00
Alexander Alekhin
1961bb1857 cmake: add ENABLE_BUILD_HARDENING option 2017-06-08 00:39:29 +00:00
Rostislav Vasilikhin
5c969d1972 interoperability OpenVX samples added 2016-11-22 16:49:46 +03:00
Alexander Alekhin
323e24e3ef change links from samples/python2 to samples/python 2015-12-18 11:00:30 +03:00
Alexey Ershov
22bb5d1fcc implemented sample build in fallback mode without interop 2015-09-10 19:30:19 +03:00
Alexey Ershov
68a0347ff9 fallback path & sample timing implemented
fixed trailing whitespaces
renamed files *vaapi* to *va_intel*
changed names vaapi* to va_intel*
2015-09-04 02:42:49 +03:00
Alexey Ershov
a8656ea20f implemented core support & sample
fixed whitespaces
fixed issues
fixed issue
fixed module statement issues
fixed access mode
added initialization check
fixed warning
2015-08-21 02:44:03 +03:00
Alexey Ershov
3f68787051 OpenGL OpenCL sample
057cd52 first versions: cv::ogl::convertFromGLTexture2D & cv::ogl::convertToGLTexture2D
5656e94 added autogenerated stuff for cl_gl.h
765f1fd resolved CL functions in opengl.cpp
9f9fee3 implemented function cv::ogl::ocl::initializeContextFromGLTexture2D()
a792adb cv::ogl::ocl::initializeContextFromGLTexture2D() - added linux support (glx.h)
51c2869 added missing error message in function cv::ogl::ocl::initializeContextFromGLTexture2D()
513b887 fixed extension call in function cv::ogl::ocl::initializeContextFromGLTexture2D()
475a3e9 added CL-GL interop Windows sample (gpu/opengl_interop.cpp)
07af28f added building of CL-GL interop sample - Windows only
befe3a2 fixed whitespace errors & doxygen warnings (precommit_docs)
551251a changed function name to cv::ogl::ocl::initializeContextFromGL(), removed unused argument
4d5f009 changed CL_DEVICES_FOR_GL_CONTEXT_KHR to CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR
9fc3055 changed CL_DEVICES_FOR_GL_CONTEXT_KHR to CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KH
6d31cee Revert "changed CL_DEVICES_FOR_GL_CONTEXT_KHR to CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KH"
cc6a025 added texture format check in cv::ogl::convertFromGLTexture2D()
063a2c1 CL-GL sample: added Linux implementation (Xlib/GLX)
c392ae9 fixed trailing whitespace
85a80d0 fixed include files
ae23628 excluded samples/opengl from build case 2
9870ea5 added android EGL support
530b64c added doxygen documentation comments to CL-GL interop functions
2015-06-26 14:15:12 +03:00
Vladimir Dudnik
217dd63e02 OpenCV-OpenCL interop (PR #4072):
Commits:
added new function, cv::ocl::attachContext(String& platformName, void* platformID, void* context, void* deviceID) which allow to attach externally created OpenCL context to OpenCV.
add definitions of clRetainDevice, clRetainContext funcs
removed definitions for clRetainContext, clRetainDevice
fixed build issue under Linux
fixed uninitialized vars, replace dbgassert in error handling
remove function which is not ready yet
add new function, cv::ocl::convertFromBuffer(int rows, int cols, int type, void* cl_mem_obj, UMat& dst, UMatUsageFlags usageFlags = cv::USAGE_DEFAULT) which attaches user allocated OpenCL clBuffer to UMat
uncommented clGetMemObjectInfo definition (otherwise prevent opencv build)
fixed build issue on linux and android
add step parameter to cv::ocl::convertFromBuffer func
suppress compile-time warning
added sample opencl-opencv interoperability (showcase for cv::ocl::convertFromBuffer func)
CMakeLists.txt modified to not create sample build script if OpenCL SDK not found in system
fixed build issue (apple opencl include dir and spaces in CMake file)
added call to clRetainContext for attachContext func and call to clRetainMemObject for convertFromBuffer func
uncommented clRetainMemObject definition
added comments and cleanup
add local path to cmake modules search dirs (instead of replacing)
remove REQUIRED for find_package call (sample build together with opencv). need to try standalone sample build
opencl-interop sample moved to standalone build
set minimum version requirement for sample's cmake to 3.1
put cmake_minimum_required under condition, so do not check if samples not builded
remove code dups for setSize, updateContinuityFlag, and finalizeHdr
commented out cmake_minimum_required(VERSION 3.1)
add safety check for cmake version
add convertFromImage func and update opencl-interop sample
uncommented clGetImageInfo defs
uncommented clEnqueueCopyImageToBuffer defs
fixed clEnqueueCopyImageToBuffer defs
add doxygen comments
remove doxygen @fn tag
try to restart buildbot
add doxygen comments to directx interop funcs
remove internal header, use fwd declarations in affected compile units instead
2015-06-19 13:33:22 +03:00
Chris Mayo
34f0da6010 Act on INSTALL_PYTHON_EXAMPLES 2014-12-30 10:13:10 +00:00
Vadim Pisarevsky
3858f2291d removed contrib, legacy and softcsscade modules; removed latentsvm and datamatrix detector from objdetect. removed haartraining and sft apps.
some of the stuff will be moved to opencv_contrib module.
in order to make this PR pass buildbot, please, comment off opencv_legacy, opencv_contrib and opencv_softcascade test runs.
2014-06-24 19:18:51 +04:00
Ilya Lavrenov
f8dd9960af one more ocl deletion 2014-02-01 21:50:14 +04:00
Ilya Lavrenov
0f168936a0 OCL module 2 trash 2014-01-31 13:19:16 +04:00
Ilya Lavrenov
63e4af8536 added the first T-API example - CamShift tracking 2013-12-29 14:36:59 +04:00
Alexander Alekhin
11b9d5bf4d core: added DirectX interop implementation (OpenCL) with samples 2013-12-13 19:02:41 +04:00
Alexander Alekhin
74329ee416 cmake: revert CRT linkage option for MSVS 2013-10-09 17:49:11 +04:00
Alexander Alekhin
555c505b70 update cmake 'install' target for Windows platform
Allow to build samples via OpenCV binaries from distribution package
(find_package with OpenCV_DIR).
2013-10-09 17:49:10 +04:00
yao
2fed1fcbff add an ocl sample 2012-08-08 17:12:53 +08:00
Andrey Kamaev
a323da6fd5 Fixed some warnings and install problems on linux 2012-06-27 12:02:31 +00:00
Andrey Pavlenko
3804ca3e20 changing package layout after 'make install' for Android build 2012-06-27 06:22:26 +00:00
Andrey Kamaev
984eb99428 Global CMake reorganization:
[~] Automatically tracked dependencies between modules
 [+] Support for optional module dependencies
 [+] Options to choose modules to build
 [~] Removed hardcoded modules lists from OpenCVConfig.cmake, opencv.pc and OpenCV.mk
 [+] Added COMPONENTS support for FIND_PACKAGE(OpenCV)
 [~] haartraining and traincascade are moved outside of modules folder since they aren't the modules
2012-02-03 11:26:49 +00:00
Andrey Kamaev
d96f533784 Instroduced separate option for Android examples - BUILD_ANDROID_EXAMPLES 2011-07-04 08:18:02 +00:00
Andrey Kamaev
092699783a Added cmake script to build Android samples 2011-06-30 13:37:56 +00:00
Alexander Shishkov
3eef457d38 uncomment building of samples 2011-02-07 10:44:44 +00:00
Anatoly Baksheev
0747f2d863 1) NPP_staging as sources. Binaries removed.
2) NVidia tests for GPU
3) FD sample that uses NVidia's interface.
2011-02-04 15:15:25 +00:00
Vadim Pisarevsky
0de9c9fd3c opencv_zlib renamed back to zlib; make static libs work on Windows 2010-12-05 01:19:36 +00:00
Anatoly Baksheev
d6686240d5 added version detection for NPP 2010-11-24 18:44:11 +00:00