Commit Graph

13674 Commits

Author SHA1 Message Date
unknown
c2f540d090 White space fixes 2014-04-15 09:32:34 -07:00
Andrey Pavlenko
80ef1f6753 Merge pull request #2621 from arkunze:pullreq/140319-resize-b 2014-04-15 19:56:56 +04:00
Andrey Pavlenko
a26bed16e6 Merge pull request #2617 from ElenaGvozdeva:ipp_matchTemplate 2014-04-15 19:56:38 +04:00
Andrey Pavlenko
dab8e920b0 Merge pull request #2565 from apavlenko:tapi_stitching 2014-04-15 19:56:11 +04:00
Andrey Pavlenko
7ba4212529 Merge pull request #2544 from alalek:perf_report_regressions 2014-04-15 16:17:39 +04:00
Alexander Alekhin
3bb6db522d ICV: mark missed functions 2014-04-15 15:55:44 +04:00
GregoryMorse
aa3c36f545 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 and rename cap_msmf.h to cap_msmf.hpp

Update cap_msmf.cpp

Successful test - samples are grabbed

Update ppltasks_winrt.h

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

Support VS 2013 and consistency cleanup and C++/CX object creation fixed
2014-04-15 18:32:23 +08:00
Vadim Pisarevsky
6a5a0fe803 Merge pull request #2016 from pemmanuelviel:kmeansppSquareDist 2014-04-15 13:31:48 +04:00
Vadim Pisarevsky
7942494fb6 Merge pull request #2233 from palindromoroz:BGSubtract_KNN_new_code 2014-04-15 13:22:43 +04:00
Vadim Pisarevsky
20aaa8fe77 Merge pull request #2560 from akarsakov:gaussianblur_integer 2014-04-15 13:21:25 +04:00
Vadim Pisarevsky
92db6786a9 Merge pull request #2578 from akrynski:patch-1 2014-04-15 13:21:08 +04:00
Vadim Pisarevsky
4eede18027 Merge pull request #2606 from alalek:icv_downloader 2014-04-15 13:20:04 +04:00
Vadim Pisarevsky
9cdd15e141 Merge pull request #2615 from krodyush:pullreq/140319-PyrLKOpticalFlow-fix 2014-04-15 13:19:45 +04:00
Roman Donchenko
534f9623f2 Merge pull request #2616 from SpecLad:merge-2.4 2014-04-15 12:06:13 +04:00
Elena Gvozdeva
3553e9379b fixed 2014-04-15 11:41:33 +04:00
unknown
36d33dd6c2 Review comments 2014-04-14 16:10:11 -07:00
Aaron Kunze
ebbac3c66d Optimizes OpenCL resize and optical flow to use image extension. 2014-04-14 16:09:17 -07:00
Andrey Pavlenko
8176e893c0 Merge pull request #2609 from alalek:tests_fixes 2014-04-14 18:54:01 +04:00
Andrey Pavlenko
5ff59af09d Merge pull request #2610 from ilya-lavrenov:ipp_cvtcolor 2014-04-14 18:52:07 +04:00
Andrey Pavlenko
f4c5679db8 Merge pull request #2614 from ilya-lavrenov:ipp_laplacian 2014-04-14 18:51:31 +04:00
Alexander Karsakov
53bc93730c Added suppressing deprecation for ippiMulC_32f_C1IR 2014-04-14 16:38:59 +04:00
Roman Donchenko
799d2dabd6 Merge remote-tracking branch 'origin/2.4' into merge-2.4
Conflicts:
	modules/core/test/test_arithm.cpp
	modules/cuda/src/cascadeclassifier.cpp
	modules/imgproc/doc/geometric_transformations.rst
	modules/objdetect/src/hog.cpp
	modules/ocl/perf/perf_imgproc.cpp
	modules/ocl/src/gftt.cpp
	modules/ocl/src/moments.cpp
2014-04-14 16:08:02 +04:00
Ilya Lavrenov
884b706b3a fixed warning 2014-04-14 14:40:40 +04:00
Ilya Lavrenov
ad7f2311c0 cv::Laplacian 2014-04-14 14:34:28 +04:00
Ilya Lavrenov
2a051a124f cvtColor 2014-04-14 14:29:36 +04:00
Andrey Pavlenko
5522c14efc Merge pull request #2607 from ilya-lavrenov:warn_sup 2014-04-14 14:15:12 +04:00
krodyush
57992e0169 replace IPatchLocal[][] into *IPatchLocal to fix compilation error on some devices. 2014-04-14 13:23:12 +04:00
Tony
fd5e180657 Rebase branch gtk3 2014-04-13 15:52:22 +01:00
Tony
265148b974 Correction to enable compilation on platform with only GTK2 libs
modified:   CMakeLists.txt
	modified:   cmake/OpenCVFindLibsGUI.cmake
2014-04-13 11:11:05 +01:00
Tony
cb4fffc72a Fix logic error in OpenCVFindLibsGUI.cmake
When with_gtk is selected but GTK3 is not present the current logic
fails to check for GTK2. This edit corrects this.
2014-04-13 11:08:32 +01:00
Tony
c0dbc083ea Correct error with GTK3 not found selection
When GTK3 is not found, HAVE_GTK was being set to TRUE. This edit
ensures that HAVE_GTK is only set if GTK3 or GTK2 (meeting minimum
version requirements) is present.
Selection logic for printing 'GTK: No' when the libraries are not found
has also been removed so the message is printed when GTK is not found or
selected in common with other libraries.

Changes committed:
	modified:   CMakeLists.txt
	modified:   cmake/OpenCVFindLibsGUI.cmake
2014-04-13 11:08:31 +01:00
Tony
65f63421fa Change quotes around GTK headers for angle brackets
The linux buildbots have started to fail compilation due to not
finding the gtk headers. The quotes have been changed to angle brackets
to indicate to the compiler that these are system includes.
2014-04-13 11:07:38 +01:00
Tony
a28ad40c2a Fix bug in GTK+3 logic introduced by previous merge
During merging of conflicting versions of this file, I erroneously
deleted several lines in the GUI reporting section. This is repaired
in this commit.
2014-04-13 11:07:38 +01:00
Tony
f318b5bc9d Improve GTK+ library selection logic.
The new logic will select GTK+3 by default if WITH_GTK is selected. If
the GTK+3 libraries are not found, then GTK+2 libraries will be selected
if found.
This can be overridden by using WITH_GTK_2_X to force selection of GTK+2
(if found).
2014-04-13 11:04:56 +01:00
Tony
1638341270 Use GTK_VERSION_MAJOR to switch between GTK+ version two and three
specific code. As a result of this, HAVE_GTK3 no longer needs to be
exposed.

The use of HAVE_GTK, and HAVE_ GTK3 have been changed to mirror the
method used by HAVE_QT and HAVE_QT5.
 On branch gtk3
 Changes to be committed:
        modified:   CMakeLists.txt
        modified:   cmake/OpenCVFindLibsGUI.cmake
        modified:   cmake/templates/cvconfig.h.in
        modified:   modules/highgui/src/window.cpp
        modified:   modules/highgui/src/window_gtk.cpp
2014-04-13 11:04:56 +01:00
Tony
befdef9685 Merge remote-tracking branch 'upstream/master'
Rebase to lates upstream
2014-04-13 10:39:32 +01:00
Tony
512cb4fced Correction to enable compilation on platform with only GTK2 libs
modified:   CMakeLists.txt
	modified:   cmake/OpenCVFindLibsGUI.cmake
2014-04-12 22:43:42 +01:00
unknown
d2b4ee1e9b More intendation fixes 2014-04-11 21:44:12 -07:00
unknown
06df383675 Indent fixes 2014-04-11 19:14:01 -07:00
Alexander Alekhin
3a1a3da782 fix tests 2014-04-11 16:11:05 +04:00
Andrey Pavlenko
f104d5be8c Merge pull request #2600 from ilya-lavrenov:ipp_calc_hist 2014-04-11 15:18:04 +04:00
Andrey Pavlenko
fd90efc9dd Merge pull request #2593 from arkunze:pullreq/140319-color 2014-04-11 15:16:33 +04:00
Alexander Alekhin
047d285b7d ICV: added package downloader 2014-04-11 14:19:18 +04:00
Roman Donchenko
df8e28283f Merge pull request #2571 from MartinChodakowski:fix-old-python-doc-typos 2014-04-11 14:15:26 +04:00
Roman Donchenko
4c2db3d6e7 Merge pull request #2579 from maksqwe:test_operations_fix 2014-04-11 14:14:33 +04:00
Roman Donchenko
8ab224746b Merge pull request #2603 from maksqwe:unused_fix_2.4 2014-04-11 14:14:04 +04:00
Ilya Lavrenov
19d470749b added macro for denoting region for suppression of "Wdeprecated-declarations" 2014-04-11 13:45:20 +04:00
Andrey Pavlenko
925178749a removing SuppressWarning and CV_OPENCL_RUN 2014-04-11 13:09:19 +04:00
Alexander Alekhin
3578f0afe9 ocl: workaround for synchronization issue in ::map() 2014-04-11 13:09:18 +04:00
Alexander Alekhin
588658d1a3 tapi: stitching: fix documentation 2014-04-11 13:09:17 +04:00