Skip to content

Commit

Permalink
Merge branch 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Kamaev committed Jan 17, 2013
2 parents 867ddeb + 101e9bd commit dc0788c
Show file tree
Hide file tree
Showing 43 changed files with 1,426 additions and 332 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,11 @@ foreach(m ${OPENCV_MODULES_DISABLED_AUTO})
list(APPEND __mdeps ${d})
endif()
endforeach()
list(APPEND OPENCV_MODULES_DISABLED_AUTO_ST "${m}(deps: ${__mdeps})")
if(__mdeps)
list(APPEND OPENCV_MODULES_DISABLED_AUTO_ST "${m}(deps: ${__mdeps})")
else()
list(APPEND OPENCV_MODULES_DISABLED_AUTO_ST "${m}")
endif()
endforeach()
string(REPLACE "opencv_" "" OPENCV_MODULES_DISABLED_AUTO_ST "${OPENCV_MODULES_DISABLED_AUTO_ST}")

Expand Down
6 changes: 4 additions & 2 deletions cmake/OpenCVModule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ endmacro()

# Internal macro; partly disables OpenCV module
macro(__ocv_module_turn_off the_module)
list(REMOVE_ITEM OPENCV_MODULES_DISABLED_AUTO "${the_module}")
list(APPEND OPENCV_MODULES_DISABLED_AUTO "${the_module}")
list(REMOVE_ITEM OPENCV_MODULES_BUILD "${the_module}")
list(REMOVE_ITEM OPENCV_MODULES_PUBLIC "${the_module}")
Expand All @@ -193,7 +194,7 @@ macro(__ocv_flatten_module_required_dependencies the_module)
break()
elseif(";${OPENCV_MODULES_DISABLED_USER};${OPENCV_MODULES_DISABLED_AUTO};" MATCHES ";${__dep};")
__ocv_module_turn_off(${the_module}) # depends on disabled module
break()
list(APPEND __flattened_deps "${__dep}")
elseif(";${OPENCV_MODULES_BUILD};" MATCHES ";${__dep};")
if(";${__resolved_deps};" MATCHES ";${__dep};")
list(APPEND __flattened_deps "${__dep}") # all dependencies of this module are already resolved
Expand Down Expand Up @@ -262,6 +263,7 @@ macro(__ocv_flatten_module_dependencies)
foreach(m ${OPENCV_MODULES_BUILD})
set(HAVE_${m} ON CACHE INTERNAL "Module ${m} will be built in current configuration")
__ocv_flatten_module_required_dependencies(${m})
set(OPENCV_MODULE_${m}_DEPS ${OPENCV_MODULE_${m}_DEPS} CACHE INTERNAL "Flattened required dependencies of ${m} module")
endforeach()

foreach(m ${OPENCV_MODULES_BUILD})
Expand All @@ -286,7 +288,7 @@ macro(__ocv_flatten_module_dependencies)
ocv_list_unique(OPENCV_MODULES_BUILD_)

set(OPENCV_MODULES_PUBLIC ${OPENCV_MODULES_PUBLIC} CACHE INTERNAL "List of OpenCV modules marked for export")
set(OPENCV_MODULES_BUILD ${OPENCV_MODULES_BUILD_} CACHE INTERNAL "List of OpenCV modules included into the build")
set(OPENCV_MODULES_BUILD ${OPENCV_MODULES_BUILD_} CACHE INTERNAL "List of OpenCV modules included into the build")
set(OPENCV_MODULES_DISABLED_AUTO ${OPENCV_MODULES_DISABLED_AUTO} CACHE INTERNAL "List of OpenCV modules implicitly disabled due to dependencies")
endmacro()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Today it is common to have a digital video recording system at your disposal. Th
The source code
===============

As a test case where to show off these using OpenCV I've created a small program that reads in two video files and performs a similarity check between them. This is something you could use to check just how well a new video compressing algorithms works. Let there be a reference (original) video like :download:`this small Megamind clip <../../../../samples/cpp/tutorial_code/highgui/video-input-psnr-ssim/video/Megamind.avi>` and :download:`a compressed version of it <../../../../samples/cpp/tutorial_code/highgui/video-input-psnr-ssim/video/Megamind_bugy.avi>`. You may also find the source code and these video file in the :file:`samples/cpp/tutorial_code/highgui/video-input-psnr-ssim/` folder of the OpenCV source library.
As a test case where to show off these using OpenCV I've created a small program that reads in two video files and performs a similarity check between them. This is something you could use to check just how well a new video compressing algorithms works. Let there be a reference (original) video like :download:`this small Megamind clip <../../../../samples/cpp/tutorial_code/HighGUI/video-input-psnr-ssim/video/Megamind.avi>` and :download:`a compressed version of it <../../../../samples/cpp/tutorial_code/HighGUI/video-input-psnr-ssim/video/Megamind_bugy.avi>`. You may also find the source code and these video file in the :file:`samples/cpp/tutorial_code/HighGUI/video-input-psnr-ssim/` folder of the OpenCV source library.

.. literalinclude:: ../../../../samples/cpp/tutorial_code/HighGUI/video-input-psnr-ssim/video-input-psnr-ssim.cpp
:language: cpp
Expand Down
137 changes: 136 additions & 1 deletion doc/tutorials/highgui/video-write/video-write.rst

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions modules/contrib/doc/retina/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Retina::getMagno
Retina::getParameters
+++++++++++++++++++++

.. ocv:function:: struct Retina::RetinaParameters Retina::getParameters()
.. ocv:function:: Retina::RetinaParameters Retina::getParameters()
Retrieve the current parameters values in a *Retina::RetinaParameters* structure

Expand Down Expand Up @@ -325,7 +325,7 @@ Retina::RetinaParameters
.. ocv:struct:: Retina::RetinaParameters
This structure merges all the parameters that can be adjusted threw the **Retina::setup()**, **Retina::setupOPLandIPLParvoChannel** and **Retina::setupIPLMagnoChannel** setup methods
Parameters structure for better clarity, check explenations on the comments of methods : setupOPLandIPLParvoChannel and setupIPLMagnoChannel. ::
Parameters structure for better clarity, check explenations on the comments of methods : setupOPLandIPLParvoChannel and setupIPLMagnoChannel. ::

class RetinaParameters{
struct OPLandIplParvoParameters{ // Outer Plexiform Layer (OPL) and Inner Plexiform Layer Parvocellular (IplParvo) parameters
Expand Down
42 changes: 21 additions & 21 deletions modules/contrib/include/opencv2/contrib/retina.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class CV_EXPORTS Retina {
public:

// parameters structure for better clarity, check explenations on the comments of methods : setupOPLandIPLParvoChannel and setupIPLMagnoChannel
struct RetinaParameters{
struct RetinaParameters{
struct OPLandIplParvoParameters{ // Outer Plexiform Layer (OPL) and Inner Plexiform Layer Parvocellular (IplParvo) parameters
OPLandIplParvoParameters():colorMode(true),
normaliseOutput(true),
Expand Down Expand Up @@ -166,14 +166,14 @@ class CV_EXPORTS Retina {
virtual ~Retina();

/**
* retreive retina input buffer size
*/
Size inputSize();
* retreive retina input buffer size
*/
Size inputSize();

/**
* retreive retina output buffer size
*/
Size outputSize();
* retreive retina output buffer size
*/
Size outputSize();

/**
* try to open an XML retina parameters file to adjust current retina instance setup
Expand All @@ -190,9 +190,9 @@ class CV_EXPORTS Retina {
* => if the xml file does not exist, then default setup is applied
* => warning, Exceptions are thrown if read XML file is not valid
* @param fs : the open Filestorage which contains retina parameters
* @param applyDefaultSetupOnFailure : set to true if an error must be thrown on error
* @param applyDefaultSetupOnFailure : set to true if an error must be thrown on error
*/
void setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure=true);
void setup(cv::FileStorage &fs, const bool applyDefaultSetupOnFailure=true);

/**
* try to open an XML retina parameters file to adjust current retina instance setup
Expand All @@ -206,7 +206,7 @@ class CV_EXPORTS Retina {
/**
* @return the current parameters setup
*/
struct Retina::RetinaParameters getParameters();
Retina::RetinaParameters getParameters();

/**
* parameters setup display method
Expand Down Expand Up @@ -305,17 +305,17 @@ class CV_EXPORTS Retina {
*/
void clearBuffers();

/**
* Activate/desactivate the Magnocellular pathway processing (motion information extraction), by default, it is activated
* @param activate: true if Magnocellular output should be activated, false if not
*/
void activateMovingContoursProcessing(const bool activate);

/**
* Activate/desactivate the Parvocellular pathway processing (contours information extraction), by default, it is activated
* @param activate: true if Parvocellular (contours information extraction) output should be activated, false if not
*/
void activateContoursProcessing(const bool activate);
/**
* Activate/desactivate the Magnocellular pathway processing (motion information extraction), by default, it is activated
* @param activate: true if Magnocellular output should be activated, false if not
*/
void activateMovingContoursProcessing(const bool activate);

/**
* Activate/desactivate the Parvocellular pathway processing (contours information extraction), by default, it is activated
* @param activate: true if Parvocellular (contours information extraction) output should be activated, false if not
*/
void activateContoursProcessing(const bool activate);

protected:
// Parameteres setup members
Expand Down
Loading

0 comments on commit dc0788c

Please sign in to comment.