diff --git a/modules/videoio/include/opencv2/videoio.hpp b/modules/videoio/include/opencv2/videoio.hpp index c38875f7d2..458e63d843 100644 --- a/modules/videoio/include/opencv2/videoio.hpp +++ b/modules/videoio/include/opencv2/videoio.hpp @@ -556,6 +556,20 @@ enum { CAP_PROP_GPHOTO2_PREVIEW = 17001, //!< Capture only preview fro //! @} gPhoto2 + +/** @name Images backend + @{ +*/ + +/** @brief Images backend properties + +*/ +enum { CAP_PROP_IMAGES_BASE = 18000, + CAP_PROP_IMAGES_LAST = 19000 // excluding + }; + +//! @} Images + //! @} videoio_flags_others diff --git a/modules/videoio/src/cap_images.cpp b/modules/videoio/src/cap_images.cpp index 455418624b..f87c5544d2 100644 --- a/modules/videoio/src/cap_images.cpp +++ b/modules/videoio/src/cap_images.cpp @@ -393,9 +393,13 @@ bool CvVideoWriter_Images::open( const char* _filename ) bool CvVideoWriter_Images::setProperty( int id, double value ) { - params.push_back( id ); - params.push_back( static_cast( value ) ); - return true; + if (id >= cv::CAP_PROP_IMAGES_BASE && id < cv::CAP_PROP_IMAGES_LAST) + { + params.push_back( id - cv::CAP_PROP_IMAGES_BASE ); + params.push_back( static_cast( value ) ); + return true; + } + return false; // not supported }