Commit Graph

176 Commits

Author SHA1 Message Date
tribta
6512a4b7e3 OpenCV Java Highgui Class
The objective is to:

    *Reduce greatly the number of lines of code in the Java codes;
    *Make it easy for Java users to add a trackbar and show the results;
    *Get the code more similar between C++, Java and Python, making the tutorials more uniform.
2017-07-01 11:07:20 +01:00
Alexander Alekhin
a9cc87636f build: update modules descriptions 2017-06-20 15:45:23 +03:00
Vladislav Sovrasov
ad7cf58450 highgui: add ROI selector 2017-04-21 13:29:35 +03:00
Vadim Pisarevsky
a57d144076 Merge pull request #7462 from alalek:cpu_multi_target 2017-03-21 19:51:32 +00:00
Maksim Shabunin
9333f82be0 Reduce dependencies between modules 2017-03-15 17:58:52 +03:00
Alexander Alekhin
e16227b53c cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00
Alexander Alekhin
8633ef451e cmake: cleanup unused defines 2017-02-10 15:18:29 +03:00
Alexander Alekhin
063ac74369 fix modules deps 2016-08-25 14:57:12 +03:00
Gregory Morse
5427ede6a1 WinRT consistency 2015-12-31 14:31:26 +01:00
Alexander Alekhin
aa871ca506 fix wrong usage of status(), remove useless message in videoio 2015-07-10 19:18:07 +03:00
Maxim Kostin
face069874 Added support for highgui module on WinRT 8.1+
Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
2015-06-26 23:41:25 +03:00
Maxim Kostin
6724a0b8cd Added dummy highgui WinRT implementation 2015-06-15 15:59:16 +03:00
Maksim Shabunin
3863dc5b2b Updated pkg-config generation, added sample makefile 2015-05-22 16:09:07 +03:00
Vadim Pisarevsky
6820292256 Merge pull request #3700 from MSOpenTech:winrt-cmake-contrib 2015-03-03 12:52:03 +00:00
Maxim Kostin
cdd23440c9 Adding support for WinRT(WinPhone 8/8.1 and Win Store) via CMake 3.1
- Substituted HAVE_WINRT with WINRT
- Fixed compilation issues in ocl.cpp and parallel.cpp
- Fixed compiler issue for WP8: "C2678: binary '+' : no operator found which takes a left-hand - Fixed gitignore
- Added #ifdef HAVE_OPENCL to remove compiler warnings in ocl.cpp
- Used NO_GETENV similar to '3rdparty\libjpeg\jmemmgr.c;
- Added ole32.lib for core module (for WindowsStore 8.0 builds)
- Made OpenCV_ARCH aware of ARM

Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
2015-03-02 22:26:43 +03:00
Maksim Shabunin
37c74e38f4 Python support 2015-03-02 18:13:00 +03:00
Maksim Shabunin
630eddf25a Extracted repeated cmake instruction block 2014-10-17 18:14:53 +04:00
Alexander Alekhin
55188fe991 world fix 2014-08-05 20:12:35 +04:00
vbystricky
fd51c133df Add depends from highgui to imgcodecs and videoio. And include header from imgcodecs and videoio to imgcodecs 2014-07-21 15:10:41 +04:00
vbystricky
d58f736935 Split highgui module to videoio and highgui 2014-07-14 23:16:47 +04:00
vbystricky
4286f60387 Extract imgcodecs module from highgui 2014-07-07 16:28:08 +04:00
Tony
46ba9d30b9 Merge remote-tracking branch 'upstream/master' 2014-03-25 20:44:06 +00:00
Roman Donchenko
b70332d806 Merge pull request #1986 from GregoryMorse:patch-3 2014-03-18 16:18:33 +04:00
GregoryMorse
90920c2376 Update cap_msmf.cpp
Add support for WinRT in the MF capture framework by removing the disallowed calls to enumerate devices and create a sample grabber sink and adding framework for the MediaCapture interface and a custom sink which interfaces with the sample grabber callback interface. The change requires discussion for making it completely functional as redundancy is required given that if the source is a video file, the old code pathways must be used. Otherwise all IMFMediaSession, IMFMediaSource, and IMFActivate code must use a MediaCapture code path and all sink code must use the CMediaSink custom sink.

Support for the custom sink is extended to non-WinRT not for compatibility as Windows Vista client is a minimum regardless, but because it offers more flexibility, could be faster and is able to be used as an optionally different code path during sink creation based on a future configuration parameter.

My discussion and proposal to finish this change:
 Devices are so easily enumerated through WinRT Windows.Devices namespace that wrapping the calls in a library is quite a chore for little benefit though to get the various modes and formats could still be a worthwhile project. For now conditional compilation to remove videodevices and any offending non-video file related activity in videodevice. In my opinion, this is a different , far less fundamental and important change which can possibly be done as a future project and also much more easily implemented in C++/CX.

ImageGrabber has the IMFSampleGrabberSinkCallback replaced with a base class (SharedSampleGrabber) which also be is base class for ImageGrabberRT. This change is necessary as the custom sink does not require a thread to pump events which is done through MediaCapture already. IMFSampleGrabberSinkCallback is the common element between both models and that piece can be shared. Initializing the new ImageGrabberRT is as simple as passing an already initialized MediaCapture object and any video format/encoding parameters.

The concurrency event is necessary to wait for completion and is the way the underlying, IAsyncAction wrappers in the task library work as well. Native WIN32 event objects would be an option if HAVE_CONCURRENCY is not defined. I could even imagine doing it with sleep/thread yield and InterlockedCompareExchange yet I am not enthusiastic about that approach either. Since there is a specific compiler HAVE_ for concurrency, I do not like pulling it in though I think for WinRT it is safe to say we will always have it available though should probably conditionally compile with the Interlocked option as WIN32 events would require HAVE_WIN32.

It looks like C++/CX cannot be used for the IMediaExtension sink (which should not be a problem) as using COM objects requires WRL and though deriving from IMediaExtension can be done, there is little purpose without COM. Objects from C++/CX can be swapped to interact with objects from native C++ as Inspectable* can reinterpret_cast to the ref object IInspectable^ and vice-versa. A solution to the COM class with C++/CX would be great so we could have dual support. Also without #define for every WRL object in use, the code will get quite muddy given that the */^ would need to be ifdef'd everywhere.

Update cap_msmf.cpp

Fixed bugs and completed the change.  I believe the new classes need to be moved to a header file as the file has become to large and more classes need to be added for handling all the asynchronous problems (one wrapping IAsyncAction in a task and another for making a task out of IAsyncAction).  Unfortunately, blocking on the UI thread is not an option in WinRT so a synchronous architecture is considered "illegal" by Microsoft's standards even if implementable (C++/CX ppltasks library throws errors if you try it).  Worse, either by design or a bug in the MF MediaCapture class with Custom Sinks causes a crash if stop/start previewing without reinitializing (spPreferredPreviewMediaType is fatally nulled).  After decompiling Windows.Media.dll, I worked around this in my own projects by using an activate-able custom sink ID which strangely assigns 1 to this pointer allowing it to be reinitialized in what can only be described as a hack by Microsoft.  This would add additional overhead to the project to implement especially for static libraries as it requires IDL/DLL exporting followed by manifest declaration.  Better to document that it is not supported.

Furthermore, an additional class for IMFAttributes should be implemented to make clean architecture for passing around attributes as opposed to directly calling non-COM interface calls on the objects and making use of SetProperties which would also be a set up for an object that uses the RuntimeClass activation ID.

The remaining changes are not difficult and will be complete soon along with debug tracing messages.

Update cap_msmf.cpp

Create cap_msmf.h

Update cap_msmf.cpp

Update cap_msmf.h

Update cap_msmf.cpp

Update cap_msmf.h

Update and rename cap_msmf.h to cap_msmf.hpp

Update cap_msmf.cpp

Update CMakeLists.txt

Update cap_msmf.hpp

Update cap_msmf.cpp

Update cap_msmf.cpp

Update cap_msmf.cpp

Update cap_msmf.hpp

Update cap_msmf.hpp

Update cap_msmf.cpp

Successful test - samples are grabbed

Update cap_msmf.cpp

Update cap_msmf.hpp

Update cap_msmf.cpp

Update cap_msmf.hpp

Update cap_msmf.hpp

Update cap_msmf.cpp

Update cap_msmf.hpp

Update cap_msmf.cpp

Update cap_msmf.hpp

Update cap_msmf.cpp

Update cap_msmf.hpp

Create ppltasks_winrt.h

Update cap_msmf.hpp

Update cap_msmf.hpp

Update cap_msmf.cpp

Update ppltasks_winrt.h

Library updated and cleaned up with comments, marshaling, exceptions and linker settings

Update ppltasks_winrt.h

Fixed trailing whitespace
2014-03-04 01:52:17 +08:00
Roman Donchenko
bbc35d609d Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts:
	cmake/OpenCVDetectPython.cmake
	cmake/OpenCVModule.cmake
	modules/core/src/gpumat.cpp
	modules/cudaimgproc/test/test_hough.cpp
	modules/gpu/CMakeLists.txt
	modules/gpu/src/cuda/generalized_hough.cu
	modules/gpu/src/generalized_hough.cpp
	modules/python/CMakeLists.txt
2014-01-27 15:28:14 +04:00
Alexander Smorkalov
b75cbfde45 All installed files marked with component names for install customization. 2014-01-21 20:34:36 +04:00
Roman Donchenko
3c4b24d531 Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts:
	CMakeLists.txt
	modules/highgui/src/cap.cpp
	modules/nonfree/src/surf.ocl.cpp
	modules/ocl/include/opencv2/ocl/ocl.hpp
	modules/ocl/src/color.cpp
	modules/ocl/src/gftt.cpp
	modules/ocl/src/imgproc.cpp
	samples/ocl/facedetect.cpp
2013-12-23 18:50:17 +04:00
Vladimir Bystricky
cc08e00876 Fix notes about cmake files. Fix build warning. 2013-12-17 16:13:55 +04:00
Vladimir Bystricky
e8d2a9752b Add support Creative Senz3D camera by Intel Perceptual Computing SDK 2013-12-13 17:25:16 +04:00
Roman Donchenko
9c2272d520 Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts:
	.gitignore
	CMakeLists.txt
	doc/CMakeLists.txt
	modules/calib3d/src/stereosgbm.cpp
	modules/core/include/opencv2/core/mat.hpp
	modules/highgui/src/cap_openni.cpp
	modules/ml/include/opencv2/ml/ml.hpp
	modules/objdetect/src/hog.cpp
	modules/ocl/perf/perf_color.cpp
	modules/ocl/src/arithm.cpp
	modules/ocl/src/filtering.cpp
	modules/ocl/src/imgproc.cpp
	modules/ocl/src/optical_flow_farneback.cpp
	platforms/scripts/camera_build.conf
	platforms/scripts/cmake_android_all_cameras.py
	samples/cpp/Qt_sample/main.cpp
	samples/cpp/tutorial_code/introduction/windows_visual_studio_Opencv/Test.cpp
2013-11-26 15:05:26 +04:00
Philippe FOUBERT
05d9375759 Trailing whitespace removal. 2013-11-11 10:26:28 +01:00
Philippe FOUBERT
8b0fc04d93 Fix the build of OpenCV with XIMEA on Windows 64 bits:
- crosses initializations in "cap_ximea.cpp" (which also contained some awfull "goto" instructions)
  - the "CMAKE_CL_64" variable is not initialized when using mingw

PR#1039 modified to be able to merge on branch 2.4
2013-11-10 17:46:59 +01:00
Alexander Alekhin
e845184843 Merge remote-tracking branch 'upstream/2.4' into merge-2.4
* #1538 from StevenPuttemans:bugfix_3283
* #1545 from alalek:ocl_test_fix_rng
* #1551 from alalek:cmake_install_win
* #1570 from ilya-lavrenov:ipp_warn_fix
* #1573 from alalek:perf_simple_strategy
* #1574 from alalek:svm_workaround
* #1576 from alalek:ocl_fix_cl_double
* #1577 from ilya-lavrenov:ocl_setto_opencl12
* #1578 from asmorkalov:android_fd_cp_fix
* #1579 from ilya-lavrenov:ocl_norm
* #1582 from sperrholz:ocl-arithm-additions
* #1586 from ilya-lavrenov:ocl_setto_win_fix
* #1589 from ilya-lavrenov:pr1582_fix
* #1591 from alalek:ocl_remove_cl_hpp_h
* #1592 from alalek:ocl_program_cache_update
* #1593 from ilya-lavrenov:ocl_war_on_double
* #1594 from ilya-lavrenov:ocl_perf
* #1595 from alalek:cl_code_cleanup
* #1596 from alalek:test_fix_run_py
* #1597 from alalek:ocl_fix_cleanup
* #1598 from alalek:ocl_fix_build_mac
* #1599 from ilya-lavrenov:ocl_mac_kernel_warnings
* #1601 from ilya-lavrenov:ocl_fix_tvl1_and_sparse
* #1602 from alalek:ocl_test_dump_info
* #1603 from ilya-lavrenov:ocl_disable_svm_noblas
* #1605 from alalek:ocl_fixes
* #1606 from ilya-lavrenov:ocl_imgproc
* #1607 from ilya-lavrenov:ocl_fft_cleanup
* #1608 from alalek:fix_warn_upd_haar
* #1609 from ilya-lavrenov:ocl_some_optimization
* #1610 from alalek:ocl_fix_perf_kalman
* #1612 from alalek:ocl_fix_string_info
* #1614 from ilya-lavrenov:ocl_svm_misprint
* #1616 from ilya-lavrenov:ocl_cvtColor
* #1617 from ilya-lavrenov:ocl_info
* #1622 from a0byte:2.4
* #1625 from ilya-lavrenov:to_string

Conflicts:
	cmake/OpenCVConfig.cmake
	cmake/OpenCVDetectPython.cmake
	cmake/OpenCVGenConfig.cmake
	modules/core/CMakeLists.txt
	modules/nonfree/src/surf.ocl.cpp
	modules/ocl/include/opencv2/ocl/ocl.hpp
	modules/ocl/include/opencv2/ocl/private/util.hpp
	modules/ocl/perf/main.cpp
	modules/ocl/src/arithm.cpp
	modules/ocl/src/cl_operations.cpp
	modules/ocl/src/cl_programcache.cpp
	modules/ocl/src/color.cpp
	modules/ocl/src/fft.cpp
	modules/ocl/src/filtering.cpp
	modules/ocl/src/gemm.cpp
	modules/ocl/src/haar.cpp
	modules/ocl/src/imgproc.cpp
	modules/ocl/src/matrix_operations.cpp
	modules/ocl/src/pyrlk.cpp
	modules/ocl/src/split_merge.cpp
	modules/ocl/src/svm.cpp
	modules/ocl/test/main.cpp
	modules/ocl/test/test_fft.cpp
	modules/ocl/test/test_moments.cpp
	modules/ocl/test/test_objdetect.cpp
	modules/ocl/test/test_optflow.cpp
	modules/ocl/test/utility.hpp
	modules/python/CMakeLists.txt
	modules/ts/include/opencv2/ts.hpp
	modules/ts/src/ts_perf.cpp
	samples/android/face-detection/jni/DetectionBasedTracker_jni.cpp
2013-10-15 20:08:52 +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
Tony
81d6842b8e These changes introduce Gtk3 support into the highgui module.
A new option WITH_GTK3 has been added to the cmake configure system to enable compilation under Gtk version 3.The flag HAVE_GTK3 is also introduced to select the new Gtk3 code in the source files. (Gtk2 is disbled when Gtk3 is selected).

window_gtk.cpp has been modified to remove obsolete (and deleted from libgtk 3) and introduce new Gtk3 code in its place when compiled for Gtk3.

To compile for Gtk2, disable WITH_GTK3 in cmake. To build for Gtk3 both WITH_GTK and WITH_GTK3 must be selected.
2013-10-02 21:16:40 +01:00
Fedor Morozov
f99be6bda6 Mergin itseez 2013-09-18 18:55:12 +04:00
Roman Donchenko
6fed0e85c2 Cut down on the use of ZLIB_LIBRARY/ZLIB_INCLUDE_DIR.
They're not listed in the documentation for the FindZLIB module,
so we shouldn't use them unless necessary.
2013-08-22 18:17:19 +04:00
Roman Donchenko
f76dd99299 Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts:
	cmake/OpenCVModule.cmake
	doc/tutorials/calib3d/camera_calibration/camera_calibration.rst
	doc/tutorials/features2d/feature_detection/feature_detection.rst
	doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.rst
	doc/tutorials/features2d/feature_homography/feature_homography.rst
	modules/core/include/opencv2/core/operations.hpp
	modules/core/src/arithm.cpp
	modules/gpu/perf/perf_video.cpp
	modules/imgproc/include/opencv2/imgproc/imgproc.hpp
	modules/java/generator/gen_java.py
	modules/java/generator/src/cpp/VideoCapture.cpp
	modules/nonfree/src/opencl/surf.cl
	modules/ocl/include/opencv2/ocl/ocl.hpp
	modules/ocl/perf/perf_haar.cpp
	modules/ocl/perf/perf_precomp.hpp
	modules/ocl/src/color.cpp
	modules/ocl/src/filtering.cpp
	modules/ocl/test/test_color.cpp
	modules/ocl/test/test_objdetect.cpp
	modules/python/src2/cv2.cpp
	samples/gpu/CMakeLists.txt
	samples/gpu/super_resolution.cpp
2013-08-19 19:02:36 +04:00
kamjagin
7ff07e94a3 Fix for bug Bug #3215. Added HAVE_QTKIT as a separate mode from HAVE_QUICKTIME 2013-08-14 13:34:34 +02:00
Roman Donchenko
d9f71b762f Deleted almost all of the precomp.cpp files.
Looks like we don't actually use them; when creating precompiled headers
with Visual C++, a dummy .cpp is created at build time.
2013-08-08 12:43:07 +04:00
Roman Donchenko
168e2a4ccb Removed CMake version checks that we don't need anymore. 2013-08-08 12:03:41 +04:00
Roman Donchenko
dcaf923517 Merge remote-tracking branch 'origin/2.4'
Conflicts:
	3rdparty/ffmpeg/ffmpeg_version.cmake
	cmake/OpenCVFindLibsGrfmt.cmake
	cmake/templates/cvconfig.h.cmake
	modules/bioinspired/doc/retina/index.rst
	modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst
	modules/calib3d/src/precomp.hpp
	modules/contrib/src/inputoutput.cpp
	modules/contrib/src/precomp.hpp
	modules/core/include/opencv2/core/internal.hpp
	modules/core/include/opencv2/core/types_c.h
	modules/core/src/drawing.cpp
	modules/core/src/precomp.hpp
	modules/core/src/system.cpp
	modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst
	modules/features2d/doc/common_interfaces_of_feature_detectors.rst
	modules/features2d/include/opencv2/features2d/features2d.hpp
	modules/features2d/src/precomp.hpp
	modules/flann/src/precomp.hpp
	modules/gpu/doc/camera_calibration_and_3d_reconstruction.rst
	modules/gpu/doc/image_filtering.rst
	modules/gpu/doc/image_processing.rst
	modules/gpu/doc/video.rst
	modules/gpu/perf/perf_imgproc.cpp
	modules/gpu/perf4au/main.cpp
	modules/gpu/src/imgproc.cpp
	modules/gpu/src/precomp.hpp
	modules/gpu/test/test_imgproc.cpp
	modules/highgui/CMakeLists.txt
	modules/highgui/test/test_precomp.hpp
	modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst
	modules/imgproc/src/precomp.hpp
	modules/java/generator/src/cpp/Mat.cpp
	modules/legacy/src/precomp.hpp
	modules/ml/doc/k_nearest_neighbors.rst
	modules/ml/src/precomp.hpp
	modules/nonfree/doc/feature_detection.rst
	modules/nonfree/src/precomp.hpp
	modules/objdetect/include/opencv2/objdetect/objdetect.hpp
	modules/objdetect/src/cascadedetect.cpp
	modules/objdetect/src/hog.cpp
	modules/objdetect/src/precomp.hpp
	modules/objdetect/test/test_latentsvmdetector.cpp
	modules/ocl/src/hog.cpp
	modules/ocl/src/opencl/objdetect_hog.cl
	modules/ocl/src/precomp.hpp
	modules/photo/src/precomp.hpp
	modules/stitching/src/precomp.hpp
	modules/superres/perf/perf_precomp.hpp
	modules/superres/src/optical_flow.cpp
	modules/superres/src/precomp.hpp
	modules/superres/test/test_precomp.hpp
	modules/ts/include/opencv2/ts.hpp
	modules/video/src/precomp.hpp
	modules/videostab/src/precomp.hpp
	modules/world/src/precomp.hpp
2013-08-06 13:56:49 +04:00
Andrey Pavlenko
af8a03e17f Merge pull request #1222 from philippefoubert:branch_2.4_pvapi 2013-08-05 10:20:25 +04:00
Philippe FOUBERT
9c04db554f Rename PVAPI_DECLARATIONS to PVAPI_DEFINITIONS 2013-07-20 15:03:30 +02:00
Roman Donchenko
e2ef2a5781 Refactored image format library finding logic.
Now the HAVE_* macros are set in cvconfig.h. Most of them already were there,
but were nonfunctional.
2013-07-11 12:40:16 +04:00
Roman Donchenko
ca8b621b4f Refactored detecting several Apple-related technologies.
Now the HAVE_* macros are set using cvconfig.h. Previously most
of them already were there, but were always undefined. One,
HAVE_COCOA, I had to add.

This also makes the CMake code more consistent; now, WITH_* variables
are always checked in cmake/*, while HAVE_* variables are checked in
modules/highgui/CMakeLists.txt.
2013-07-10 19:45:56 +04:00
Roman Donchenko
4cf9990d4e Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts:
	doc/tutorials/definitions/noContent.rst
	doc/tutorials/gpu/gpu-basics-similarity/gpu-basics-similarity.rst
	doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.rst
	doc/tutorials/introduction/how_to_write_a_tutorial/how_to_write_a_tutorial.rst
	modules/core/include/opencv2/core/core.hpp
	modules/core/include/opencv2/core/internal.hpp
	modules/core/include/opencv2/core/version.hpp
	modules/gpu/CMakeLists.txt
	modules/highgui/perf/perf_output.cpp
	modules/highgui/test/test_video_io.cpp
	modules/ocl/include/opencv2/ocl/ocl.hpp
	modules/ocl/perf/main.cpp
	modules/ocl/src/hog.cpp
	modules/ocl/src/initialization.cpp
	modules/ocl/src/moments.cpp
	modules/ocl/src/opencl/moments.cl
	modules/ocl/test/main.cpp
	modules/ocl/test/test_moments.cpp
	modules/python/test/test.py
	modules/ts/include/opencv2/ts/ts_perf.hpp
	modules/ts/src/precomp.hpp
	modules/ts/src/ts_perf.cpp
2013-07-03 19:53:21 +04:00
Philippe FOUBERT
639450efdc PvAPI support on Windows with MinGW (PR #1038 applied to the branch 2.4) 2013-07-03 00:19:22 +02:00
Alexander Shishkov
7b06592dea added conversions between UIImage and cv::Mat 2013-06-28 13:26:54 +04:00
Fedor Morozov
7469c935f3 HDR formats support and HDR making. Code only. 2013-06-23 14:19:09 +04:00