From: Alexander Alekhin Date: Sat, 22 Dec 2018 05:40:15 +0000 (+0000) Subject: Merge branch '3.4' into merge-3.4 X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1^2~365 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1dee705074bb68fde68058a92b59235ffb34660c;p=platform%2Fupstream%2Fopencv.git Merge branch '3.4' into merge-3.4 --- 1dee705074bb68fde68058a92b59235ffb34660c diff --cc modules/dnn/include/opencv2/dnn/version.hpp index 7d0f125,0000000..b41efda mode 100644,000000..100644 --- a/modules/dnn/include/opencv2/dnn/version.hpp +++ b/modules/dnn/include/opencv2/dnn/version.hpp @@@ -1,21 -1,0 +1,21 @@@ +// This file is part of OpenCV project. +// It is subject to the license terms in the LICENSE file found in the top-level directory +// of this distribution and at http://opencv.org/license.html. + +#ifndef OPENCV_DNN_VERSION_HPP +#define OPENCV_DNN_VERSION_HPP + +/// Use with major OpenCV version only. - #define OPENCV_DNN_API_VERSION 20181205 ++#define OPENCV_DNN_API_VERSION 20181221 + +#if !defined CV_DOXYGEN && !defined CV_DNN_DONT_ADD_INLINE_NS +#define CV__DNN_INLINE_NS __CV_CAT(dnn4_v, OPENCV_DNN_API_VERSION) +#define CV__DNN_INLINE_NS_BEGIN namespace CV__DNN_INLINE_NS { +#define CV__DNN_INLINE_NS_END } +namespace cv { namespace dnn { namespace CV__DNN_INLINE_NS { } using namespace CV__DNN_INLINE_NS; }} +#else +#define CV__DNN_INLINE_NS_BEGIN +#define CV__DNN_INLINE_NS_END +#endif + +#endif // OPENCV_DNN_VERSION_HPP diff --cc modules/videoio/test/test_camera.cpp index eb6fb60,d816f63..ac115b1 --- a/modules/videoio/test/test_camera.cpp +++ b/modules/videoio/test/test_camera.cpp @@@ -55,18 -56,39 +56,53 @@@ TEST(DISABLED_VideoIO_Camera, validate_ capture.release(); } +//Following test if for capture device using PhysConn_Video_SerialDigital as crossbar input pin +TEST(DISABLED_VideoIO_Camera, dshow_avermedia_capture) +{ + VideoCapture capture(0); + ASSERT_TRUE(capture.isOpened()); + capture.set(CAP_PROP_CHANNEL, 6); + std::cout << "Camera 0 via " << capture.getBackendName() << " backend" << std::endl; + std::cout << "Frame width: " << capture.get(CAP_PROP_FRAME_WIDTH) << std::endl; + std::cout << " height: " << capture.get(CAP_PROP_FRAME_HEIGHT) << std::endl; + std::cout << "Capturing FPS: " << capture.get(CAP_PROP_FPS) << std::endl; + test_readFrames(capture); + capture.release(); +} + + TEST(DISABLED_VideoIO_Camera, validate_V4L2_FrameSize) + { + VideoCapture capture(CAP_V4L2); + ASSERT_TRUE(capture.isOpened()); + std::cout << "Camera 0 via " << capture.getBackendName() << " backend" << std::endl; + std::cout << "Frame width: " << capture.get(CAP_PROP_FRAME_WIDTH) << std::endl; + std::cout << " height: " << capture.get(CAP_PROP_FRAME_HEIGHT) << std::endl; + std::cout << "Capturing FPS: " << capture.get(CAP_PROP_FPS) << std::endl; + int fourcc = (int)capture.get(CAP_PROP_FOURCC); + std::cout << "FOURCC code: " << cv::format("0x%8x", fourcc) << std::endl; + test_readFrames(capture, 30); + + EXPECT_TRUE(capture.set(CAP_PROP_FRAME_WIDTH, 640)); + EXPECT_TRUE(capture.set(CAP_PROP_FRAME_HEIGHT, 480)); + std::cout << "Frame width: " << capture.get(CAP_PROP_FRAME_WIDTH) << std::endl; + std::cout << " height: " << capture.get(CAP_PROP_FRAME_HEIGHT) << std::endl; + std::cout << "Capturing FPS: " << capture.get(CAP_PROP_FPS) << std::endl; + Mat frame640x480; + test_readFrames(capture, 30, &frame640x480); + EXPECT_EQ(640, frame640x480.cols); + EXPECT_EQ(480, frame640x480.rows); + + EXPECT_TRUE(capture.set(CAP_PROP_FRAME_WIDTH, 1280)); + EXPECT_TRUE(capture.set(CAP_PROP_FRAME_HEIGHT, 720)); + std::cout << "Frame width: " << capture.get(CAP_PROP_FRAME_WIDTH) << std::endl; + std::cout << " height: " << capture.get(CAP_PROP_FRAME_HEIGHT) << std::endl; + std::cout << "Capturing FPS: " << capture.get(CAP_PROP_FPS) << std::endl; + Mat frame1280x720; + test_readFrames(capture, 30, &frame1280x720); + EXPECT_EQ(1280, frame1280x720.cols); + EXPECT_EQ(720, frame1280x720.rows); + + capture.release(); + } + }} // namespace