MATLAB File Help: cv.StructuredEdgeDetection/StructuredEdgeDetection Index
cv.StructuredEdgeDetection/StructuredEdgeDetection

The only constructor

obj = cv.StructuredEdgeDetection(model)
obj = cv.StructuredEdgeDetection(model, howToGetFeatures)

Input

Example

The following is an example of a custom feature extractor MATLAB function:

% This function extracts feature channels from src. The
% StructureEdgeDetection uses this feature space to detect
% edges.
function features = myRFFeatureGetter(src, opts)
    % src: source image to extract features
    % features: output n-channel floating-point feature matrix
    % opts: struct of options
    gnrmRad = opts.gradientNormalizationRadius;
    gsmthRad = opts.gradientSmoothingRadius;
    shrink = opts.shrinkNumber;
    outNum = opts.numberOfOutputChannels;
    gradNum = opts.numberOfGradientOrientations;

    nsize = [size(src,1) size(src,2)] ./ shrink;
    features = zeros([nsize outNum], 'single');
    % ... here your feature extraction code
end

TODO: Custom extractor is not internally used in the current cv.StructuredEdgeDetection implementation. See http://docs.opencv.org/3.1.0/d2/d59/tutorial_ximgproc_training.html for more information about training your own structured forest (it uses an external MATLAB toolbox for the training part).

See also