Merge pull request #9332 from csukuangfj:improve-documentation

pull/9324/merge
Alexander Alekhin 7 years ago
commit c9fb1434c0
  1. 8
      CMakeLists.txt
  2. 4
      modules/core/include/opencv2/core/persistence.hpp
  3. 2
      modules/imgproc/src/deriv.cpp

@ -29,9 +29,9 @@ else()
cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR) cmake_minimum_required(VERSION "${MIN_VER_CMAKE}" FATAL_ERROR)
endif() endif()
# Following block can broke build in case of cross-compilng # Following block can break build in case of cross-compilng
# but CMAKE_CROSSCOMPILING variable will be set only on project(OpenCV) command # but CMAKE_CROSSCOMPILING variable will be set only on project(OpenCV) command
# so we will try to detect crosscompiling by presense of CMAKE_TOOLCHAIN_FILE # so we will try to detect cross-compiling by presense of CMAKE_TOOLCHAIN_FILE
if(NOT DEFINED CMAKE_INSTALL_PREFIX) if(NOT DEFINED CMAKE_INSTALL_PREFIX)
if(NOT CMAKE_TOOLCHAIN_FILE) if(NOT CMAKE_TOOLCHAIN_FILE)
# it _must_ go before project(OpenCV) in order to work # it _must_ go before project(OpenCV) in order to work
@ -43,7 +43,7 @@ if(NOT DEFINED CMAKE_INSTALL_PREFIX)
else(NOT CMAKE_TOOLCHAIN_FILE) else(NOT CMAKE_TOOLCHAIN_FILE)
#Android: set output folder to ${CMAKE_BINARY_DIR} #Android: set output folder to ${CMAKE_BINARY_DIR}
set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are compiled to" ) set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are compiled to" )
# any crosscompiling # any cross-compiling
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory") set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Installation Directory")
endif(NOT CMAKE_TOOLCHAIN_FILE) endif(NOT CMAKE_TOOLCHAIN_FILE)
endif() endif()
@ -141,7 +141,7 @@ include(cmake/OpenCVDownload.cmake)
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
if(NOT CMAKE_SIZEOF_VOID_P GREATER 0) if(NOT CMAKE_SIZEOF_VOID_P GREATER 0)
message(FATAL_ERROR "CMake fails to deterimine the bitness of target platform. message(FATAL_ERROR "CMake fails to deterimine the bitness of target platform.
Please check your CMake and compiler installation. If you are crosscompiling then ensure that your CMake toolchain file correctly sets the compiler details.") Please check your CMake and compiler installation. If you are cross-compiling then ensure that your CMake toolchain file correctly sets the compiler details.")
endif() endif()
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------

@ -108,7 +108,7 @@ XML/YAML/JSON file storages. {#xml_storage}
Writing to a file storage. Writing to a file storage.
-------------------------- --------------------------
You can store and then restore various OpenCV data structures to/from XML (<http://www.w3c.org/XML>), You can store and then restore various OpenCV data structures to/from XML (<http://www.w3c.org/XML>),
YAML (<http://www.yaml.org>) or JSON (<http://www.json.org/>) formats. Also, it is possible store YAML (<http://www.yaml.org>) or JSON (<http://www.json.org/>) formats. Also, it is possible to store
and load arbitrarily complex data structures, which include OpenCV data structures, as well as and load arbitrarily complex data structures, which include OpenCV data structures, as well as
primitive data types (integer and floating-point numbers and text strings) as their elements. primitive data types (integer and floating-point numbers and text strings) as their elements.
@ -155,7 +155,7 @@ Here is an example:
return 0; return 0;
} }
@endcode @endcode
The sample above stores to XML and integer, text string (calibration date), 2 matrices, and a custom The sample above stores to YML an integer, a text string (calibration date), 2 matrices, and a custom
structure "feature", which includes feature coordinates and LBP (local binary pattern) value. Here structure "feature", which includes feature coordinates and LBP (local binary pattern) value. Here
is output of the sample: is output of the sample:
@code{.yaml} @code{.yaml}

@ -444,7 +444,7 @@ void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy,
if( scale != 1 ) if( scale != 1 )
{ {
// usually the smoothing part is the slowest to compute, // usually the smoothing part is the slowest to compute,
// so try to scale it instead of the faster differenciating part // so try to scale it instead of the faster differentiating part
if( dx == 0 ) if( dx == 0 )
kx *= scale; kx *= scale;
else else

Loading…
Cancel
Save