threeStageParSel: Parameter Selection in Three-Stage Image Restoration

View source: R/threeStageParSel.r

threeStageParSelR Documentation

Parameter Selection in Three-Stage Image Restoration

Description

Select the bandwidth value for the image restoration method implemented in the function threeStage

Usage

threeStageParSel(image, bandwidth, edge1, edge2, nboot,
    blur = FALSE)

Arguments

image

A square matrix, no missing value allowed.

bandwidth

Bandwidth values to be chosen from. Each of these values need to be an positive integer specifying the number of pixels to use in the local smoothing.

edge1

A matrix of 0 and 1 representing the detected step edge pixels.

edge2

A matrix of 0 and 1 representing the detected roof/valley edge pixels.

nboot

Required when blur is TRUE. Unused when blur is FALSE. It must be a positive integer specifying the number of bootstraps to perform. See Qiu and Kang (2015) for details.

blur

TRUE if the image contains blur, FALSE otherwise. If TRUE, the hybrid selection method proposed in Qiu and Kang (2015) is used. If FALSE, the leave-one-out cross validation is used.

Value

A list of the selected bandwidth, and a matrix of cross-validation scores with each entry corresponding to a choice of bandwidth.

References

Qiu, P. and Kang, Y. (2015) “Blind Image Deblurring Using Jump Regression Analysis”, Statistica Sinica, 25, 879 – 899, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.5705/ss.2014.054")}.

Examples

## Not run: 
step.edges <- stepEdge(peppers, bandwidth = 9, thresh = 17) 
roof.edges <- roofEdge(peppers, bandwidth = 6, thresh = 3000,
    edge1 = step.edges) 
set.seed(24)
# Time consuming
parSel <- threeStageParSel(image = peppers, edge1 = step.edges,
    edge2 = roof.edges, bandwidth = 4, nboot = 1, blur = TRUE) 

## End(Not run)

DRIP documentation built on May 29, 2024, 4:56 a.m.

Related to threeStageParSel in DRIP...