Commit Graph

64 Commits

Author SHA1 Message Date
Alexander Alekhin
48d9031efb videoio(test): add FFmpeg backend check
- configure through OPENCV_TEST_VIDEOIO_BACKEND_REQUIRE_FFMPEG environment variable
2020-12-14 18:29:52 +00:00
Alexander Alekhin
962f5c9b82 videoio(test): skip GStreamer in 'frame_timestamp' tests
- CAP_PROP_POS_MSEC is not reliable
2020-12-07 21:35:01 +00:00
Jaime Rivera
2fa624aef0 Add Timestamps to MSMF Video Capture by index
Enable frame timestamp tests for MSMF

Add functional test for camera live timestamps

Remove trailing whitespace

Add timestamp test to all functional tests. Protect div by 0

Add Timestamps to MSMF Video Capture by index
2020-12-02 16:36:09 -05:00
Alexander Smorkalov
24fac5f56d Added test for VideoCapture CAP_PROP_FRAME_MSEC option.
- Suppressed FFMPEG + h264, h265 as it does not pass tests with CI configuration.
- Suppressed MediaFoundation backend as it always returns zero for now.
2020-11-30 20:08:21 +03:00
Maksim Shabunin
21a8d9569d videoio: added frameSize to MFX capture 2020-11-05 17:40:48 +03:00
Alexander Smorkalov
7ed37b3fa5 MP4 autorotation tests and various fixes for Windows
- Added test for automated rotation for  MP4 videos with metadata
- Fix 180 degrees rotation bug
- Moved rotation logic to cv::VideoCapture implementation for FFmpeg and restore binary compatibility with FFmpeg wrapper.
2020-07-23 09:30:18 +03:00
Vadim Levin
09fe66e87f
Merge pull request #16713 from VadimLevin:dev/vlevin/ffmpeg_video_capture_bitrate
* feature: Add video capture bitrate read-only property for FFMPEG backend

* test: For WIN32 property should be either expected or 0.

Added `IsOneOf` helper function, enabled only for _WIN32.
2020-03-10 16:44:22 +03:00
Maksim Shabunin
6c8f50d1f3 videoio/MSMF: refactored format handling and selection, property reading and writing 2020-02-08 00:16:41 +03:00
Pierre Letessier
0853085ec6 Merge pull request #16190 from pletessier:videocapture_skip_frames
Videocapture skip frames

* enable skipping frames

* update videoio_skip test
2020-01-26 10:19:09 +03:00
cudawarped
aff8c9bd28 videoio: retrieve encoded frames through FFmpeg backend
- backport 15290
- add extra test case
2019-11-18 19:23:19 +03:00
Alexander Alekhin
a77275e650 videoio(test): skip unstable MSMF tests (3) 2019-08-08 16:25:19 +03:00
Alexander Alekhin
a4b4432015 videoio(test): skip unstable MSMF tests (2) 2019-08-05 19:13:17 +03:00
Alexander Alekhin
406313bbc5 videoio(test): skip unstable MSMF tests 2019-08-05 16:57:26 +03:00
Alexander Alekhin
61f589ddd0 videoio(gstreamer): more .get() checks 2019-07-19 13:16:58 +03:00
Alexander Alekhin
ab24325df3 videoio(test): avoid raw ptr in ffmpeg tests
causes leaks if FFmpeg is disabled through OPENCV_VIDEOIO_PRIORITY_FFMPEG=0
2019-06-20 17:48:18 +03:00
Alexander Alekhin
baf372ad3d videoio(test): add extra videoio tests 2019-06-20 17:48:18 +03:00
Maksim Shabunin
9a81ff7315 Backported AVFoundation fixes from master branch 2019-05-07 13:57:44 +03:00
Maksim Shabunin
9c4eb20221 AVFoundation on Mac: fixed frame count and unsupported format handling 2019-01-24 16:15:08 +03:00
Alexander Alekhin
a3a3670027 videoio(test): test V4L frame size changing manual test 2018-12-20 15:14:20 +03:00
Alexey Nikolaev
8396ae6e4f Merge pull request #12893 from aleksey-nikolaev:cap-update
V4L (V4L2): Refactoring. Added missed camera properties. Fixed getting `INF` for some properties. Singlethread as always (#12893)

* cap_v4l:
1 Added cap_properties verbalization.
2 Set Get of properties elementary refactoring.
3 Removed converting parameters to/from [0,1] range.
4 Added all known conversion from V4L2_CID_* to CV_CAP_PROP_*

* cap_v4l:
1. Removed all query for parameters range.
2. Refactored capture initialization.
3. Added selecting input channel by CV_CAP_PROP_MODE. Default value -1 the channels not changed.

* cap_v4l:
1. Refactoring of Convert To RGB

* cap_v4l:
1. Fixed use of video buffer index.
2. Removed extra memcopy for grab image.
3. Removed device closing from autosetup_capture_mode_v4l2

* cap_v4l:
1. The `goto` was eliminated
2. Fixed use of temporary buffer index for V4L2_PIX_FMT_SN9C10X
3. Fixed use of the bufferIndex
4. Removed trailing spaces and unused variables.

* cap_v4l:
1. Alias for capture->buffers[capture->bufferIndex]
2. Reduced size of data for memcpy: bytesused instead of length
3. Refactoring. Code duplication. More info for debug

* cap_v4l:
1. Added the ability to grab and retrieveFrame independently several times

* cap_v4l:
1. Not need to close/open device for new capture parameters applying.
2. Removed using of device name as a flag that the capture is closed. Added sufficient function.
3. Refactoring. Added requestBuffers and createBuffers

* cap_v4l:
1. Added tryIoctl with `select` like was in mainloop_v4l2.
2. Fixed buffer request for device without closing the device.
3. Some static function moved to CvCaptureCAM_V4L
4. Removed unused defines

* cap_v4l:
1. Thread-safe now

* cap_v4l:
1. Fixed thread-safe destructor
2. Fixed FPS setting

* Missed brake

* Removed thread-safety

* cap_v4l:
1. Reverted conversion parameters to/from [0,1] by default for backward compatibility.
2. Added setting for turn off compatibility mode: set CV_CAP_PROP_MODE to 65536
3. Most static functions moved to CvCaptureCAM_V4L
4. Refactoring of icvRetrieveFrameCAM_V4L and using of frame_allocated flag

* cap_v4l:
1. Added conversion to RGB from NV12, NV21
2. Refactoring. Removed wrappers for known format conversions.

* Added `CAP_PROP_CHANNEL` to the enum VideoCaptureProperties.
CAP_V4L migrated to use VideoCaptureProperties.

* 1. Update comments.
2. Environment variable `OPENCV_VIDEOIO_V4L_RANGE_NORMALIZED` for setting default backward compatibility mode.
3. Revert getting of `CAP_PROP_MODE` as fourcc code in backward compatibility mode.

* videoio: update cap_v4l - compatibilityMode => normalizePropRange

* videoio(test): V4L2 MJPEG test

`v4l2-ctl --list-formats` should have 'MJPG' entry

* videoio: fix buffer initialization

to avoid "munmap: Invalid argument" messages
2018-11-08 21:27:45 +03:00
Alexander Alekhin
51f7eb3a3c videoio(test): add "camera" tests
- disabled due specific requirements (camera, OpenNI camera, etc)
- designed for manual validation
2018-09-18 16:19:19 +00:00
Alexander Alekhin
270cc3bcbc videoio: add routines to query information about backends API
into cv::videoio_registry namespace
2018-07-19 17:27:37 +03:00
Alexander Alekhin
5d68c8dbe7 videoio(test): fixup information dump 2018-05-31 18:54:43 +03:00
Alexander Alekhin
8f28817373 Merge pull request #11617 from alalek:ffmpeg_fix_time_base 2018-05-29 15:19:13 +00:00
Alexander Alekhin
cd9e43704e videoio: backends priority list 2018-05-29 12:06:45 +00:00
Alexander Alekhin
5128c1ff1f videoio(ffmpeg): specify stream->time_base
Using codec->time_base is deprecated to specify muxer settings.
Resolves issue with FPS value for AVI files with FFmpeg 4.0.

Related FFmpeg commits:
- 194be1f43e
- 91736025b2
2018-05-29 11:42:50 +00:00
Alexander Alekhin
84db82a329 build: fix warnings 2018-04-24 16:15:22 +03:00
Maksim Shabunin
5309832308 VideoIO: prettier test console output, gstreamer capture backend changed to C++ interface 2018-04-23 13:21:37 +03:00
Maksim Shabunin
a9bdf75c5b videoio: refactored XINE backend 2018-04-20 15:20:46 +03:00
Alexander Nesterov
c0d6f3d23e Added tests for gstreamer pipeline 2018-04-10 02:33:26 +03:00
Vitaly Tuzov
628f04ae96 Merge pull request #11092 from terfendail:msmf_videocapture
Update for MSMF-based VideoCapture and VideoWriter (#11092)

* MSMF based VideoCapture updated to handle video stream formats different from RGB24

* MSMF based VideoWriter updated to handle video frame top-bottom line ordering regardless of output format

* Fixed race condition in MSMF based VideoCapture

* Refactored MSMF based VideoCapture and VideoWriter

* Disabled frame rate estimation for MP43

* Removed test for unsupported avi container from MSMF VideoWriter tests

* Enabled MSMF-based VideoIO by default
2018-04-05 13:55:42 +03:00
Alexander Alekhin
8f0669c300 videoio: apply CV_OVERRIDE/CV_FINAL 2018-03-28 17:57:59 +03:00
Tomoaki Teshima
a9f3a7de39 add workaround of old gstreamer 2018-03-05 19:27:49 +09:00
Alexander Nesterov
df8f61877e Added avi-container with tests 2018-02-15 17:34:49 +03:00
Alexander Alekhin
4a297a2443 ts: refactor OpenCV tests
- removed tr1 usage (dropped in C++17)
- moved includes of vector/map/iostream/limits into ts.hpp
- require opencv_test + anonymous namespace (added compile check)
- fixed norm() usage (must be from cvtest::norm for checks) and other conflict functions
- added missing license headers
2018-02-03 19:39:47 +00:00
Maksim Shabunin
800294ad4b Merge pull request #10060 from allnes:videoio_tests_backend 2017-12-01 09:38:19 +00:00
Maksim Shabunin
6f48dc2482 Fixed GStreamer pipeline building on Ubuntu 17 2017-11-23 15:03:20 +03:00
Alexander Nesterov
8082011546 Update videoio tests 2017-11-23 14:57:38 +03:00
Maksim Shabunin
7628c143f4 videoio: fixed capture open order, added apiPrefernce to FFMPEG tests 2017-11-23 13:33:48 +03:00
Vladislav Sovrasov
32bf712102 cmake: disable implicit-fallthrough by default 2017-09-11 16:04:00 +03:00
Maksim Shabunin
235b00b6ee Fixed MediaSDK tests and build warnings 2017-08-31 16:50:42 +03:00
Alexander Alekhin
49e1f6b161 Merge pull request #9091 from alalek:update_ffmpeg 2017-07-14 17:25:35 +00:00
Alexander Alekhin
cc862e996e videoio: fixes for GStreamer support
- emulated frame counter (with autodetection of GStreamer broken behavior)
- skip 'seek' tests if seeking is not supported by backend
- update 'fps' and total frames checks (increase error tolerance)
- update synthetic image generation
2017-07-05 16:52:48 +03:00
Alexander Alekhin
6833b46a05 videoio(test): fix message 2017-07-05 13:45:34 +03:00
Maksim Shabunin
87b569d812 Rewritten some tests in videoio and imgcodecs modules
general:
- all iterative tests have been replaced with parameterized tests
- old-style try..catch tests have been modified to use EXPECT_/ASSERT_ gtest macros
- added temporary files cleanup
- modified MatComparator error message formatting

imgcodecs:
- test_grfmt.cpp split to test_jpg.cpp, test_png.cpp, test_tiff.cpp, etc.

videoio:
- added public HAVE_VIDEO_INPUT, HAVE_VIDEO_OUTPUT definitions to cvconfig.h
- built-in MotionJPEG codec could not be tested on some platforms (read_write test was disabled if ffmpeg is off, encoding/decoding was handled by ffmpeg otherwise).
- image-related tests moved to imgcodecs (Videoio_Image)
- several property get/set tests have been combined into one
- added MotionJPEG test video to opencv_extra
2017-06-20 18:20:41 +03:00
Maksim Shabunin
c06f3d63e8 Initial version of MediaSDK integration:
- cmake dependencies search (WITH_MFX option)
- raw H264, H265, MPEG2 encoding and decoding
- tests for supported formats
2017-06-20 12:15:10 +03:00
Alexander Alekhin
daf1879a2e test: ffmpeg: change resolution for H264 test 2016-07-21 00:20:18 +03:00
Alexander Alekhin
d86d8ed909 Merge 2.4 into master
PR #2968: cce2d99 8578f9c
Fixed bug which caused crash of GPU version of feature matcher in stitcher

The bug caused crash of GPU version of feature matcher in stitcher when
we use ORB features.

PR #3236: 5947519
Check sure that we're not already below required leaf false alarm rate before continuing to get negative samples.

PR #3190
fix blobdetector

PR #3562 (part): 82bd82e
TBB updated to 4.3u2. Fix for aarch64 support.

PR #3604 (part): 091c7a3
OpenGL interop sample reworked not ot use cvconfig.h

PR #3792: afdf319
Add -L for CUDA libs path to pkg-config

Add all dirs from CUDA_LIBS_PATH as -L linker options to
OPENCV_LINKER_LIBS. These will end up in opencv.pc.

PR #3893: 122b9f8
Turn ocv_convert_to_lib_name into a function

PR #5490: ec5244a
fixed memory leak in findHomography tests

PR #5491: 0d5b739
delete video readers

PR #5574

PR #5202
2015-12-08 10:24:54 +03:00
Maksim Shabunin
46e457d340 Fixed loop check 2015-07-22 17:54:42 +03:00
Maksim Shabunin
14d7b38613 Fixing GCC 4.9 warnings 2015-07-22 16:12:31 +03:00