Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #356 from kyamagu/cv330
Browse files Browse the repository at this point in the history
OpenCV 3.3.0
  • Loading branch information
amroamroamro authored Aug 19, 2017
2 parents 9aefbcb + 1f5db2c commit 8d109eb
Show file tree
Hide file tree
Showing 136 changed files with 4,387 additions and 754 deletions.
3 changes: 3 additions & 0 deletions +cv/FeatureDetector.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
% `xfeatures2d` module)
% * __MSDDetector__ see cv.MSDDetector (requires
% `xfeatures2d` module)
% * __HarrisLaplaceFeatureDetector__ see
% cv.HarrisLaplaceFeatureDetector (requires
% `xfeatures2d` module)
%
% ## Options
% Refer to the constructors of each feature detector for a
Expand Down
379 changes: 284 additions & 95 deletions opencv_contrib/+cv/Net.m → +cv/Net.m

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions +cv/RTrees.m
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,43 @@ function load(this, fname_or_str, varargin)
v = RTrees_(this.id, 'getVarImportance');
end

function votes = getVotes(this, samples, varargin)
%GETVOTES Returns the result of each individual tree in the forest
%
% votes = model.getVotes(samples)
% votes = model.getVotes(..., 'OptionName',optionValue, ...)
%
% ## Input
% * __samples__ matrix containg the samples for which votes will
% be calculated.
%
% ## Output
% * __votes__ matrix of the result of the calculation.
%
% ## Options
% * __Flags__ Flags for defining the type of RTrees. For
% convenience, you can set the individual flag options
% below, instead of directly setting bits here. default 0
% * __RawOutput__ See the predict method. default false
% * __CompressedInput__ See the predict method. default false
% * __PreprocessedInput__ See the predict method. default false
% * __PredictAuto__ See the predict method. default false
% * __PredictSum__ See the predict method. default false
% * __PredictMaxVote__ See the predict method. default false
%
% In case the model is a regression problem, the method will
% return each of the trees' results for each of the sample cases,
% i.e `nsamples-by-ntrees` matrix.
% If the model is a classifier, it will return a matrix with
% `nsamples + 1` rows, where the first row gives the class number
% and the following rows return the votes each class had for each
% sample, i.e `(nsamples+1)-by-nclasses` matrix.
%
% See also: cv.RTrees.predict
%
votes = RTrees_(this.id, 'getVotes', samples, varargin{:});
end

function roots = getRoots(this)
%GETROOTS Returns indices of root nodes
%
Expand Down
16 changes: 9 additions & 7 deletions +cv/StereoSGBM.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
% Minimum possible disparity value, default 0
MinDisparity
% Maximum disparity minus minimum disparity, positive and divisble by
% 16. default 64
% 16. default 16
NumDisparities
% Matched block size, default 7
% Matched block size (SAD window size), default 3
BlockSize
% Maximum size of smooth disparity regions to consider their noise
% speckles and invalidate (when `SpeckleRange>=0` and
Expand All @@ -81,9 +81,11 @@
P2
% Algorithm Mode, default 'SGBM'
%
% * __SGBM__
% * __SGBM3Way__
% * __HH__ runs the full-scale two-pass dynamic programming algorithm
% * __SGBM__ 5-directional version of the algorithm
% * __HH__ 8-dir mode, runs the full-scale two-pass dynamic
% programming algorithm (slowest, memory intensive)
% * __SGBM3Way__ 3-dir mode (fastest)
% * __HH4__ 4-directional variation of SGBM
Mode
end

Expand All @@ -102,10 +104,10 @@
% * __NumDisparities__ Maximum disparity minus minimum disparity.
% The value is always greater than zero. In the current
% implementation, this parameter must be divisible by 16.
% default 64
% default 16
% * __BlockSize__ Matched block size. It must be an odd number >=1.
% Normally, it should be somewhere in the 3..11 range.
% default 7
% default 3
% * __P1__ The first parameter controlling the disparity
% smoothness. See `P2`. default 0 (which uses 2).
% * __P2__ The second parameter controlling the disparity
Expand Down
9 changes: 6 additions & 3 deletions +cv/VideoCapture.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,17 @@
Format
% Backend-specific value indicating the current capture mode.
Mode
% Brightness of the image (only for cameras).
% Brightness of the image (only for those cameras that support it).
Brightness
% Contrast of the image (only for cameras).
Contrast
% Saturation of the image (only for cameras).
Saturation
% Hue of the image (only for cameras).
Hue
% Gain of the image (only for cameras).
% Gain of the image (only for those cameras that support it).
Gain
% Exposure (only for cameras).
% Exposure (only for those cameras that support it).
Exposure
% Boolean flags indicating whether images should be converted to RGB.
ConvertRGB
Expand Down Expand Up @@ -220,6 +220,7 @@ function delete(this)
% Note that each video stream or IP camera feed has its
% own URL scheme. Please refer to the documentation of
% source stream to know the right URL.
% * or device name (for backends like V4L or gPhoto2)
%
% ## Output
% * __successFlag__ bool, true if the file/camera has been
Expand Down Expand Up @@ -264,6 +265,8 @@ function delete(this)
% library.
% * __Images__ OpenCV Image Sequence (e.g. `img_%02d.jpg`).
% * __Aravis__ Aravis GigE SDK.
% * __MotionJPEG__ Built-in OpenCV MotionJPEG codec.
% * __MediaSDK__ Intel MediaSDK.
%
% The method first calls cv.VideoCapture.release to close the
% already opened file or camera.
Expand Down
27 changes: 20 additions & 7 deletions +cv/VideoWriter.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,34 +78,47 @@ function delete(this)
VideoWriter_(this.id, 'delete');
end

function retval = open(this, filename, frameSize, varargin)
function successFlag = open(this, filename, frameSize, varargin)
%OPEN Initializes or reinitializes video writer
%
% retval = vid.open(filename, frameSize)
% retval = vid.open(filename, frameSize, 'OptionName',optionValue, ...)
% successFlag = vid.open(filename, frameSize)
% successFlag = vid.open(filename, frameSize, 'OptionName',optionValue, ...)
%
% ## Input
% * __filename__ Name of the output video file
% * __frameSize__ Size of the video frames `[width, height]`.
%
% ## Output
% * __retval__ bool, true if video writer has been successfully
% * __successFlag__ bool, true if video writer has been successfully
% initialized.
%
% ## Options
% * __API__ The parameter allows to specify API backends to use.
% Can be used to enforce a specific writer implementation if
% multiple are available: e.g. 'FFMPEG' or 'GStreamer'
% * __Any__ (default) Auto detect
% * __VfW__ Video For Windows
% * __QuickTime__ QuickTime
% * __AVFoundation__ AVFoundation framework for iOS
% * __MediaFoundation__ Microsoft Media Foundation
% * __GStreamer__ GStreamer
% * __FFMPEG__ FFMPEG library
% * __Images__ OpenCV Image Sequence (e.g. `img_%02d.jpg`)
% * __MotionJPEG__ Built-in OpenCV MotionJPEG codec
% * __MediaSDK__ Intel Media SDK
% * __FourCC__ 4-character code of codec used to compress the
% frames. List of codes can be obtained at [FOURCC]. FFMPEG
% backend with MP4 container natively uses other values as
% FourCC code: see [ObjectType], so you may receive a
% warning message from OpenCV about fourcc code conversion.
% Examples are:
% * __PIM1__ MPEG-1 codec
% * __MJPG__ Motion-JPEG codec
% * __MJPG__ Motion-JPEG codec (default)
% * __MP42__ MPEG-4 (Microsoft)
% * __DIV3__ DivX MPEG-4 Part 2
% * __DIVX__ DivX codec
% * __XVID__ XVID MPEG-4 Part 2
% * __U263__ H263 (default)
% * __U263__ H263
% * __I263__ ITU H.263
% * __FLV1__ Sorenson Spark (Flash Video)
% * __X264__ H.264
Expand Down Expand Up @@ -149,7 +162,7 @@ function delete(this)
%
% See also: cv.VideoWriter.VideoWriter, cv.VideoWriter.isOpened
%
retval = VideoWriter_(this.id, 'open', filename, frameSize, varargin{:});
successFlag = VideoWriter_(this.id, 'open', filename, frameSize, varargin{:});
end

function retval = isOpened(this)
Expand Down
5 changes: 3 additions & 2 deletions +cv/accumulate.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
% dst = cv.accumulate(src, dst, 'OptionName',optionValue, ...)
%
% ## Input
% * __src__ Input image as 1- or 3-channel, 8-bit or 32-bit floating-point.
% * __src__ Input image of type `uint8`, `uint16`, `single`, or `double, with
% any number of channels
% * __dst__ Input accumulator image with the same number of channels as input
% image, 32-bit or 64-bit floating-point.
% image, and a depth of `single` or `double`.
%
% ## Output
% * __dst__ Output accumulator image.
Expand Down
8 changes: 4 additions & 4 deletions +cv/accumulateProduct.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
% dst = cv.accumulateProduct(src1, src2, dst, 'OptionName',optionValue, ...)
%
% ## Input
% * __src1__ First input image, 1- or 3-channel, 8-bit or 32-bit floating
% point.
% * __src1__ First input image of type `uint8`, `uint16`, `single`, or `double,
% with any number of channels
% * __src2__ Second input image of the same type and the same size as `src1`.
% * __dst__ Input accumulator with the same number of channels as input
% images, 32-bit or 64-bit floating-point.
% * __dst__ Input accumulator image with the same number of channels as input
% images, and a depth of `single` or `double`.
%
% ## Output
% * __dst__ Output accumulator image.
Expand Down
5 changes: 3 additions & 2 deletions +cv/accumulateSquare.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
% dst = cv.accumulateSquare(src, dst, 'OptionName',optionValue, ...)
%
% ## Input
% * __src__ Input image as 1- or 3-channel, 8-bit or 32-bit floating-point.
% * __src__ Input image of type `uint8`, `uint16`, `single`, or `double, with
% any number of channels
% * __dst__ Input accumulator image with the same number of channels as input
% image, 32-bit or 64-bit floating-point.
% image, and a depth of `single` or `double`.
%
% ## Output
% * __dst__ Output accumulator image.
Expand Down
5 changes: 3 additions & 2 deletions +cv/accumulateWeighted.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
% dst = cv.accumulateWeighted(..., 'OptionName',optionValue, ...)
%
% ## Input
% * __src__ Input image as 1- or 3-channel, 8-bit or 32-bit floating-point.
% * __src__ Input image of type `uint8`, `uint16`, `single`, or `double, with
% any number of channels
% * __dst__ Input accumulator image with the same number of channels as input
% image, 32-bit or 64-bit floating-point.
% image, and a depth of `single` or `double`.
% * __alpha__ Weight of the input image. A scalar double.
%
% ## Output
Expand Down
6 changes: 6 additions & 0 deletions +cv/applyColorMap.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
%APPLYCOLORMAP Applies a GNU Octave/MATLAB equivalent colormap on a given image
%
% dst = cv.applyColorMap(src, colormap)
% dst = cv.applyColorMap(src, userColor)
% dst = cv.applyColorMap(..., 'OptionName',optionValue, ...)
%
% ## Input
Expand All @@ -19,6 +20,8 @@
% * __Pink__ Pastel shades of pink color map.
% * __Hot__ Black-red-yellow-white color map.
% * __Parula__ Blue-green-orange-yellow color map.
% * __userColor__ The colormap to apply of type `uint8` (1 or 3 channels) and
% length 256.
%
% ## Output
% * __dst__ The result is the colormapped source image. Same row/column size
Expand All @@ -34,6 +37,9 @@
% OpenCV now comes with various colormaps to enhance the visualization in your
% computer vision application.
%
% The second variant of the function applies a user-defined colormap on the
% given image.
%
% ## Example
%
% In OpenCV you only need cv.applyColorMap to apply a colormap on a given
Expand Down
4 changes: 4 additions & 0 deletions +cv/calibrateCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
% default false.
% * __ZeroTangentDist__ Tangential distortion coefficients `p1` and `p2` are
% set to zeros and stay fixed. default false.
% * __FixTangentDist__ The tangential distortion coefficients are not
% changed during the optimization. If `UseIntrinsicGuess` is set, the
% coefficient from the supplied `DistCoeffs` matrix is used. Otherwise,
% it is set to 0. default false.
% * __FixK1__, ..., __FixK6__ The corresponding radial distortion coefficient
% is not changed during the optimization. If `UseIntrinsicGuess` is set,
% the coefficient from the supplied `DistCoeffs` matrix is used.
Expand Down
4 changes: 3 additions & 1 deletion +cv/cvtColor.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@
% * __BayerBG2BGR__, __BayerGB2BGR__, __BayerRG2BGR__, __BayerGR2BGR__,
% __BayerBG2RGB__, __BayerGB2RGB__, __BayerRG2RGB__, __BayerGR2RGB__,
% __BayerBG2GRAY__, __BayerGB2GRAY__, __BayerRG2GRAY__,
% __BayerGR2GRAY__: Demosaicing
% __BayerGR2GRAY__, __BayerBG2BGRA__, __BayerGB2BGRA__,
% __BayerRG2BGRA__, __BayerGR2BGRA__, __BayerBG2RGBA__,
% __BayerGB2RGBA__, __BayerRG2RGBA__, __BayerGR2RGBA__: Demosaicing
% * **BayerBG2BGR_VNG**, **BayerGB2BGR_VNG**, **BayerRG2BGR_VNG**,
% **BayerGR2BGR_VNG**, **BayerBG2RGB_VNG**, **BayerGB2RGB_VNG**,
% **BayerRG2RGB_VNG**, **BayerGR2RGB_VNG**: Demosaicing using
Expand Down
4 changes: 4 additions & 0 deletions +cv/dft.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
% inverse transformation is executed, the function treats the input as a
% packed complex-conjugate symmetrical array, and the output will also
% be a real array). default false
% * __ComplexInput__ specifies that input is complex input. If this flag is
% set, the input must have 2 channels. On the other hand, for backwards
% compatibility reason, if input has 2 channels, input is already
% considered complex. default false
% * __NonzeroRows__ when the parameter is not zero, the function assumes that
% only the first `NonzeroRows` rows of the input array (`Inverse` is not
% set) or only the first `NonzeroRows` of the output array (`Inverse` is
Expand Down
19 changes: 19 additions & 0 deletions +cv/findCirclesGrid.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,25 @@
% optional parameters used to construct the specified feature detector.
% See cv.FeatureDetector for possible types.
% default is to use cv.SimpleBlobDetector with its default parameters.
% * __FinderParameters__ Parameters for finding circles in a grid pattern.
% You can specify the parameters as a cell-array that starts with the
% grid type followed by pairs of key-value options
% `{'Symmetric', 'key',val, ...}`, or as a structure where the fields
% are the options `struct('GridType','Symmetric', 'key',val, ...)`.
% * __GridType__ one of 'Symmetric' (default) or 'Asymmetric'
% * __DensityNeighborhoodSize__ default [16,16]
% * __MinDensity__ default 10.0
% * __KmeansAttempts__ default 100
% * __MinDistanceToAddKeypoint__ default 20
% * __KeypointScale__ default 1
% * __MinGraphConfidence__ default 9.0
% * __VertexGain__ default 1.0
% * __VertexPenalty__ default -0.6
% * __ExistingVertexGain__ default 10000.0
% * __EdgeGain__ default 1.0
% * __EdgePenalty__ default -0.6
% * __ConvexHullFactor__ default 1.1
% * __MinRNGEdgeSwitchDist__ default 5.0
%
% The function attempts to determine whether the input image contains a grid
% of circles. If it is, the function locates centers of the circles. The
Expand Down
4 changes: 2 additions & 2 deletions +cv/findTransformECC.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
% * __Mask__ An optional mask to indicate valid values of `inputImage`.
% Not set by default.
% * __InputWarp__ Initial estimate for `warpMatrix`. See the notes
% below. Default `eye(2,3)`
% below. Default `eye(2,3)` or `eye(3,3)` depending on motion type.
%
% The function estimates the optimum transformation (`warpMatrix`) with
% respect to ECC criterion ([EP08]), that is:
Expand All @@ -55,7 +55,7 @@
% cv.findTransformECC implements an area-based alignment that builds on
% intensity similarities. In essence, the function updates the initial
% transformation that roughly aligns the images. If this information is
% missing, the identity warp (unity matrix) should be given as input. Note
% missing, the identity warp (unity matrix) is used as an initialization. Note
% that if images undergo strong displacements/rotations, an initial
% transformation that roughly aligns the images is necessary (e.g., a simple
% euclidean/similarity transform that allows for the images showing the same
Expand Down
2 changes: 2 additions & 0 deletions +cv/imdecode.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
% default true
% * __Grayscale__ If set, always convert image to the single channel grayscale
% image. default false
% * __IgnoreOrientation__ If set, do not rotate the image according to EXIF's
% orientation flag. default false
% * __Flags__ Advanced option to directly set the flag specifying the depth
% and color type of a loaded image. Note that setting this integer flag
% overrides all the other flag options. Not set by default:
Expand Down
11 changes: 6 additions & 5 deletions +cv/imwrite.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@
% * __JpegChromaQuality__ Separate chroma quality level, 0 - 100,
% default is 0 (don't use).
% * __PngCompression__ For PNG, it can be the compression level from 0 to 9.
% A higher value means a smaller size and longer compression time.
% Default value is 3. Also strategy is changed to `Default`.
% A higher value means a smaller size and longer compression time. If
% specified, `PngStrategy` is changed to `Default`. Default value is 1
% (best speed setting).
% * __PngStrategy__ For PNG; used to tune the compression algorithm. These
% flags will be modify the way of PNG image compression and will be
% passed to the underlying zlib processing stage. The strategy parameter
% only affects the compression ratio but not the correctness of the
% compressed output even if it is not set appropriately. One of:
% * __Default__ (default) Use this value for normal data.
% * __Default__ Use this value for normal data.
% * __Filtered__ Use this value for data produced by a filter (or
% predictor). Filtered data consists mostly of small values with a
% somewhat random distribution. In this case, the compression
Expand All @@ -46,8 +47,8 @@
% `HuffmanOnly`.
% * __HuffmanOnly__ Use this value to force Huffman encoding only
% (no string match).
% * __RLE__ Use this value to limit match distances to one (run-length
% encoding). `RLE` is designed to be almost as fast as
% * __RLE__ (default) Use this value to limit match distances to one
% (run-length encoding). `RLE` is designed to be almost as fast as
% `HuffmanOnly`, but give better compression for PNG image data.
% * __Fixed__ Using this value prevents the use of dynamic Huffman
% codes, allowing for a simpler decoder for special applications.
Expand Down
Loading

0 comments on commit 8d109eb

Please sign in to comment.