Title: | Discontinuous Regression and Image Processing |
---|---|
Description: | A collection of functions that perform jump regression and image analysis such as denoising, deblurring and jump detection. The implemented methods are based on the following research: Qiu, P. (1998) <doi:10.1214/aos/1024691468>, Qiu, P. and Yandell, B. (1997) <doi: 10.1080/10618600.1997.10474746>, Qiu, P. (2009) <doi: 10.1007/s10463-007-0166-9>, Kang, Y. and Qiu, P. (2014) <doi: 10.1080/00401706.2013.844732>, Qiu, P. and Kang, Y. (2015) <doi: 10.5705/ss.2014.054>, Kang, Y., Mukherjee, P.S. and Qiu, P. (2018) <doi: 10.1080/00401706.2017.1415975>, Kang, Y. (2020) <doi: 10.1080/10618600.2019.1665536>. |
Authors: | Yicheng Kang [aut, cre], Peihua Qiu [aut, ctb] |
Maintainer: | Yicheng Kang <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.3 |
Built: | 2024-12-22 06:21:08 UTC |
Source: | CRAN |
This file contains data of a brain image. It has 217x217 pixels. Gray levels are in the range [0, 255]. In the data file, observations are listed as a 217 x217 matrix. This image has blur involved.
brain
brain
A matrix containing 217x217 pixels.
Yicheng Kang
Kang, Y., Mukherjee, P.S. and Qiu, P. (2018) “Efficient Blind Image Deblurring Using Nonparametric Regression and Local Pixel Clustering”, Technometrics, 60(4), 522 – 531, doi:10.1080/00401706.2017.1415975.
This file contains the circles image. It has 256x256 pixels. Gray levels are in the range [0, 255]. In the data file, observations are listed as a 256x256 matrix.
circles
circles
A matrix of 256x256 pixels.
Yicheng Kang
Qiu, P. (2005) Image Processing and Jump Regression Analysis. New Jersey: Wiley.
Select the leave-one-out cross validation bandwidth for local
linear kernel smoothing and estimates the noise level in the
input image. Both the bandwidth parameter and the noise level
are required inputs for the blind image deblurring procedure
jpex
.
cv.jpex(image, bandwidths, ncpus = 1)
cv.jpex(image, bandwidths, ncpus = 1)
image |
A blurry input image. |
bandwidths |
A vector of positive integers that specify the size of the neighborhood for local smoothing. |
ncpus |
The number of CPUs allocated for parallel computing. |
LLK |
The estimated surface by local linear kernel (LLK) smoothing, using the CV selected bandwidth. |
sigma |
The estimated noise level, defined as the square root of the mean squared error (MSE) between LLK and the input image. |
cv_scores |
A vector of the same length as that of the input bandwidths. Each element in the vector is the leave-one-out CV score associated with the corresponding bandwidth value. |
input |
The bandwidth parameters input by user. |
bandwidth |
The bandwidth parameter that results in the smallest CV score. |
Yicheng Kang
Kang, Y. (2020) “Consistent Blind Image Deblurring Using Jump-Preserving Extrapolation”, Journal of Computational and Graphical Statistics, 29(2), 372 – 382, doi:10.1080/10618600.2019.1665536.
out <- cv.jpex(stopsign, c(2,3))
out <- cv.jpex(stopsign, c(2,3))
Compute the dissimilarity measure between two sets of edge pixels. It is used as a performance measure for step or roof edge detectors.
dKQ(edge1, edge2)
dKQ(edge1, edge2)
edge1 |
One set of pixels. |
edge2 |
The other set of pixels. |
The mathematical definition of is as follows.
, where
and
are two point sets, and
denotes the Euclidean distance.
Value of the
Yicheng Kang
Kang, Y. and Qiu, P., "Jump Detection in Blurred Regression Surfaces," Technometrics, 56, 2014, 539-550, doi:10.1080/00401706.2013.844732.
mat1 <- matrix(c(1, rep(0, 3)), ncol = 2) mat2 <- matrix(c(rep(0, 3), 1), ncol = 2) dKQ(mat1, mat2)
mat1 <- matrix(c(1, rep(0, 3)), ncol = 2) mat2 <- matrix(c(rep(0, 3), 1), ncol = 2) dKQ(mat1, mat2)
Take in any square matrix (noisy blurry image) and deblur it.
jpex(image, bandwidth, alpha, sigma)
jpex(image, bandwidth, alpha, sigma)
image |
A square matrix representing a blurry image. |
bandwidth |
A positive integer that specifies the size of the neighborhood for local smoothing. |
alpha |
A numeric between 0 and 1. This is the significance level for the Chi-square hypothesis test. The null hypothesis is that a given pixel is in a continuity region and not affected by the blur. |
sigma |
A positive numeric value for the noise level in the blurred image. It is used in the Chi-square test. |
deblurred |
A square matrix representing the deblurred image. |
edge |
A square matrix, the element of which is the value
of the Chi-square test statistic at a pixel location. One can
classify a given pixel as a blurry pixel if
|
Yicheng Kang
Kang, Y. (2020) “Consistent Blind Image Deblurring Using Jump-Preserving Extrapolation”, Journal of Computational and Graphical Statistics, 29(2), 372 – 382, doi:10.1080/10618600.2019.1665536.
out <- jpex(image = stopsign, bandwidth = as.integer(2), sigma = 0.00623, alpha = 0.001)
out <- jpex(image = stopsign, bandwidth = as.integer(2), sigma = 0.00623, alpha = 0.001)
Estimate surface using piecewise local linear kernel smoothing. The bandwidth is chosen by leave-one-out cross validation.
JPLLK_surface(image, bandwidth, plot = FALSE)
JPLLK_surface(image, bandwidth, plot = FALSE)
image |
A square matrix, no missing value allowed. |
bandwidth |
A numeric vector of positive integers, which specifies the number of pixels used in the local smoothing. The final fitted surface uses the optimal bandwidth chosen from those provided by users. |
plot |
If plot = TRUE, the image of the fitted surface is plotted. |
At each pixel, the gradient is estimated by a local linear
kernel smoothing procedure. Next, the local neighborhood is
divided into two halves along the direction perpendicular to
(,
). Then the one-
sided local linear kernel (LLK) estimates are obtained in the
two half neighborhoods respectively. Among these two one-sided
estimates, the one with smaller weighted mean square error is
chosen to be the final estimate of the regression surface at the
pixel.
A list of fitted values, residuals, chosen bandwidth and estimated sigma.
Yicheng Kang
Qiu, P. (2009) "Jump-Preserving Surface Reconstruction from Noisy Data", Annals of the Institute of Statistical Mathematics, 61(3), 715 – 751, doi:10.1007/s10463-007-0166-9.
fit <- JPLLK_surface(image = sar, bandwidth = c(3, 4))
fit <- JPLLK_surface(image = sar, bandwidth = c(3, 4))
This file contains the kid image. The image has 387x387 pixels. Gray levels are in the range [0, 255]. In the data file, observations are listed as a 387x387 matrix. This image has spatially variant blur involved.
kid
kid
A matrix of 387x387 pixels.
Yicheng Kang
Kang, Y. and Qiu, P. (2014) "Jump Detection in Blurred Regression Surfaces," Technometrics, 56(4), 539 – 550, doi:10.1080/00401706.2013.844732.
This file contains the Lena image. It has 512x512 pixels. Gray levels are in the range [0, 255]. In the data file, observations are listed as a 512x512 matrix.
lena
lena
A 512x512 matrix.
Yicheng Kang
November 1972 issue of Playboy magazine.
Modify detected edges to make them thin.
modify1(bandwidth, image, edge, plot)
modify1(bandwidth, image, edge, plot)
image |
A matrix that represents the image. |
bandwidth |
A positive integer that specifies the number of pixels to use in the local smoothing. |
edge |
A matrix of 0 and 1 represents detected edge pixels. |
plot |
If plot = TRUE, images of detected edges before and after the modification are plotted. |
A local-smoothing based edge detection algorithm may flag deceptive edge
pixel candidates. One kind of such candidates consists of those close
to the real edges. They occur due to the nature of local
smoothing. That is, if the point is flagged,
then its neighboring pixels will be flagged with high probability.
This kind of deceptive candidates can make the detected edges
thick. This modification procedure makes the detected edges
thin.
A matrix of zeros and ones of the same size as the input image.
Yicheng Kang
Qiu, P. and Yandell, B. (1997) "Jump Detection in Regression Surfaces," Journal of Computational and Graphical Statistics 6(3), 332-354, doi:10.1080/10618600.1997.10474746.
edge <- stepEdge(sar, bandwidth = 4, thresh = 20, degree = 0) out <- modify1(4, sar, edge)
edge <- stepEdge(sar, bandwidth = 4, thresh = 20, degree = 0) out <- modify1(4, sar, edge)
Delete deceptive edge pixels that are scattered in the design space.
modify2(bandwidth, edge, plot)
modify2(bandwidth, edge, plot)
bandwidth |
A positive integer that specifies the number of pixels to use in the local smoothing. |
edge |
A matrix of 0 and 1 representing the detected edge pixels. |
plot |
If plot = TRUE, images of the detected edges before and after the modification are plotted. |
A local-smoothing based edge detection algorithm may flag deceptive edge
pixel candidates. One kind of such candidates existis due to the nature of hypothesis
testing, on which the threshold value of the edge detection criterion is
based. That is, a point could be flagged as a edge
pixel with certain probability, even if it is actually not a edge pixel.
Deceptive candidates of this kind are scattered in the whole design
space. This modification procedure deletes scattered edge pixel candidates.
A matrix of zeros and ones of the same size as the input image.
Yicheng Kang
Qiu, P. and Yandell, B. (1997) "Jump Detection in Regression Surfaces," Journal of Computational and Graphical Statistics 6(3), 332-354, doi:10.1080/10618600.1997.10474746.
edge <- stepEdge(sar, bandwidth = 4, thresh = 20, degree = 0) out <- modify2(4, edge)
edge <- stepEdge(sar, bandwidth = 4, thresh = 20, degree = 0) out <- modify2(4, edge)
This file contains the peppers image. It has 512x512 pixels. Gray levels are in the range [0, 255]. In the data file, observations are listed as a 512x512 matrix.
peppers
peppers
A matrix of 512x512 pixels.
Yicheng Kang
Kang, Y. (2020) “Consistent Blind Image Deblurring Using Jump-Preserving Extrapolation”, Journal of Computational and Graphical Statistics, 29(2), 372 – 382, doi:10.1080/10618600.2019.1665536.
Plot the results of a JPEX parameter selection procedure.
## S3 method for class 'JPEX_Parameters' plot(x, ...)
## S3 method for class 'JPEX_Parameters' plot(x, ...)
x |
A JPEX parameter selection object. |
... |
Further arguments passed to or from other methods. |
Plot the cross-validation scores against the bandwidth values.
A plot of cross-validation scores is produced.
Yicheng Kang
Kang, Y. (2020) “Consistent Blind Image Deblurring Using Jump-Preserving Extrapolation”, Journal of Computational and Graphical Statistics, 29(2), 372 – 382, doi:10.1080/10618600.2019.1665536.
cv.jpex
, print.JPEX_Parameters
,
summary.JPEX_Parameters
parSel <- cv.jpex(stopsign, c(2,3)) plot(parSel)
parSel <- cv.jpex(stopsign, c(2,3)) plot(parSel)
Plot the residual image from a JPLLK parameter selection object where the bandwidth is chosen by cross validation.
## S3 method for class 'JPLLK_Parameters' plot(x, ...)
## S3 method for class 'JPLLK_Parameters' plot(x, ...)
x |
A JPLLK parameter selection object. |
... |
Further arguments passed to or from other methods. |
Plot the residual image from a JPLLK parameter selection object. The bandwidth used in producing the residual image is chosen by cross validation.
A residual image is produced.
Yicheng Kang
Qiu, P. (2009) "Jump-Preserving Surface Reconstruction from Noisy Data", Annals of the Institute of Statistical Mathematics, 61(3), 715 – 751, doi:10.1007/s10463-007-0166-9.
JPLLK_surface
, print.JPLLK_Parameters
,
summary.JPLLK_Parameters
fit <- JPLLK_surface(image=sar, bandwidth=c(3, 4)) plot(fit)
fit <- JPLLK_surface(image=sar, bandwidth=c(3, 4)) plot(fit)
Plot information about a clustering-based surface estimation parameter selection object.
## S3 method for class 'Surface_Cluster_Parameters' plot(x, ...)
## S3 method for class 'Surface_Cluster_Parameters' plot(x, ...)
x |
A clustering-based surface estimation parameter selection object. |
... |
Further arguments passed to or from other methods. |
Plot some information about a clustering-based surface estimation parameter selection object. In particular, it plots the cross-validation (no blur) or modified cross-validation (there is blur involved) scores against the specified bandwidth values.
A plot of (modified) cross-validation scores is produced.
Yicheng Kang
Kang, Y., Mukherjee, P.S. and Qiu, P. (2018) "Efficient Blind Image Deblurring Using Nonparametric Regression and Local Pixel Clustering", Technometrics, 60(4), 522 – 531, doi:10.1080/00401706.2017.1415975.
Qiu, P. (2009) "Jump-Preserving Surface Reconstruction from Noisy Data", Annals of the Institute of Statistical Mathematics, 61, 715 – 751, doi:10.1007/s10463-007-0166-9.
surfaceCluster_bandwidth
, print.Surface_Cluster_Parameters
,
summary.Surface_Cluster_Parameters
data(brain) bandwidth_select <- surfaceCluster_bandwidth(image = brain, bandwidths = c(3:4), sig.level = .9995, blur = FALSE) plot(bandwidth_select)
data(brain) bandwidth_select <- surfaceCluster_bandwidth(image = brain, bandwidths = c(3:4), sig.level = .9995, blur = FALSE) plot(bandwidth_select)
Plot information about a 3-stage estimation bandwidth selection object.
## S3 method for class 'Three_Stage_Parameters' plot(x, ...)
## S3 method for class 'Three_Stage_Parameters' plot(x, ...)
x |
A three-stage estimation bandwidth selection object. |
... |
Further arguments passed to or from other methods. |
It plots the cross-validation (no blur involved) or modified cross-validation (there is blur involved) scores against the specified bandwidth values.
A plot of the (modified) cross-validation scores is produced.
Yicheng Kang
Qiu, P. and Kang, Y. (2015) “Blind Image Deblurring Using Jump Regression Analysis”, Statistica Sinica, 25, 879 – 899, doi:10.5705/ss.2014.054.
threeStageParSel
, print.Three_Stage_Parameters
,
summary.Three_Stage_Parameters
## 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 = 3:4, nboot = 1, blur = TRUE) plot(parSel) ## End(Not run)
## 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 = 3:4, nboot = 1, blur = TRUE) plot(parSel) ## End(Not run)
Display information about an edge detection parameter selection object.
## S3 method for class 'Edge_Parameters' print(x, type = "all", ...)
## S3 method for class 'Edge_Parameters' print(x, type = "all", ...)
x |
An edge detection parameter selection object. |
type |
The type of information to display. The "matrix"
option prints the bootstrap version of |
... |
Further arguments passed to or from other methods. |
Prints some information about an edge detection parameter
selection object. In particular, this method prints the
values based on bootstrap samples, the selected bandwidth and
threshold.
A display of parameter selection results in edge detection.
Yicheng Kang
Kang, Y. and Qiu, P. (2014) "Jump Detection in Blurred Regression Surfaces," Technometrics, 56(4), 539 – 550, doi:10.1080/00401706.2013.844732.
stepEdgeParSel
, roofEdgeParSel
set.seed(24) parSel <- stepEdgeParSel(image = sar, bandwidth = 5, thresh = c(17, 21), nboot = 1) print(parSel, type = "all")
set.seed(24) parSel <- stepEdgeParSel(image = sar, bandwidth = 5, thresh = c(17, 21), nboot = 1) print(parSel, type = "all")
Display information about a JPEX parameter selection object.
## S3 method for class 'JPEX_Parameters' print(x, type = "all", ...)
## S3 method for class 'JPEX_Parameters' print(x, type = "all", ...)
x |
A JPEX parameter selection object. |
type |
The type of information to display. The "cv_scores" option prints the cross-validation scores for each bandwidth. The "bandwidth" option prints the selected bandwidth. The "sigma" option prints the estimated noise level. The "all" option prints all the information. |
... |
Further arguments passed to or from other methods. |
Prints some information about a JPEX parameter selection object. In particular, this method prints the cross-validation scores, the selected bandwidth and estimated noise level.
A display of parameter selection results in JPEX estimation.
Yicheng Kang
Kang, Y. (2020) “Consistent Blind Image Deblurring Using Jump-Preserving Extrapolation”, Journal of Computational and Graphical Statistics, 29(2), 372 – 382, doi:10.1080/10618600.2019.1665536.
parSel <- cv.jpex(stopsign, c(2,3)) print(parSel, type = "all")
parSel <- cv.jpex(stopsign, c(2,3)) print(parSel, type = "all")
Display information about a JPLLK parameter selection object.
## S3 method for class 'JPLLK_Parameters' print(x, type = "all", ...)
## S3 method for class 'JPLLK_Parameters' print(x, type = "all", ...)
x |
A JPLLK parameter selection object. |
type |
The type of information to display. The "bandwidth" option prints the selected bandwidth. The "sigma" option prints the estimated noise level. The "all" option prints all the information. |
... |
Further arguments passed to or from other methods. |
Prints some information about a JPLLK parameter selection object. In particular, this method prints the selected bandwidth and estimated noise level.
A display of parameter selection results in JPLLK estimation.
Yicheng Kang
Qiu, P. (2009) "Jump-Preserving Surface Reconstruction from Noisy Data", Annals of the Institute of Statistical Mathematics, 61(3), 715 – 751, doi:10.1007/s10463-007-0166-9.
fit <- JPLLK_surface(image = sar, bandwidth = c(3, 4)) print(fit, type = "bandwidth")
fit <- JPLLK_surface(image = sar, bandwidth = c(3, 4)) print(fit, type = "bandwidth")
Display information about a clustering-based surface estimation parameter selection object.
## S3 method for class 'Surface_Cluster_Parameters' print(x, type = "all", ...)
## S3 method for class 'Surface_Cluster_Parameters' print(x, type = "all", ...)
x |
A clustering-based surface estimation parameter selection object. |
type |
The type of information to display. The "cv_scores" option prints the cross-validation or modified cross-validation scores for each bandwidth. The "sigma" option prints the estimated noise level. The "phi0" option prints the estimated value of the error density at 0. The "mean_std_abs" option prints the estimated mean of absolute error. The "all" option prints all the information. |
... |
Further arguments passed to or from other methods. |
Prints some information about a clustering-based surface estimation parameter selection object. In particular, this method prints the cross- validation or modified cross-validation scores, the selected bandwidth, the estimated noise level, the estimated value of the error density at 0 and the estimated mean of absolute error.
A display of parameter selection results in clustering-based surface estimation.
Yicheng Kang
Kang, Y., Mukherjee, P.S. and Qiu, P. (2018) "Efficient Blind Image Deblurring Using Nonparametric Regression and Local Pixel Clustering", Technometrics, 60(4), 522 – 531, doi:10.1080/00401706.2017.1415975.
Qiu, P. (2009) "Jump-Preserving Surface Reconstruction from Noisy Data", Annals of the Institute of Statistical Mathematics, 61, 715 – 751, doi:10.1007/s10463-007-0166-9.
surfaceCluster_bandwidth
,
summary.Surface_Cluster_Parameters
,
plot.Surface_Cluster_Parameters
data(brain) bandwidth_select <- surfaceCluster_bandwidth(image = brain, bandwidths = c(3:4), sig.level = .9995, blur = FALSE) print(bandwidth_select, type = "cv_scores")
data(brain) bandwidth_select <- surfaceCluster_bandwidth(image = brain, bandwidths = c(3:4), sig.level = .9995, blur = FALSE) print(bandwidth_select, type = "cv_scores")
Display information about a three-stage estimation bandwidth selection object.
## S3 method for class 'Three_Stage_Parameters' print(x, type = "all", ...)
## S3 method for class 'Three_Stage_Parameters' print(x, type = "all", ...)
x |
A three-stage estimation bandwidth selection object. |
type |
The type of information to display. The "cv_scores" option prints the cross-validation or modified cross-validation scores for each bandwidth. The "bandwidth" option prints the selected the bandwidth. The "all" option prints all the information. |
... |
Further arguments passed to or from other methods. |
Prints some information about a three-stage estimation bandwidth selection object. In particular, this method prints the cross-validation or modified cross-validation scores and the selected bandwidth.
Display (modified) cross-validation scores and the selected bandwidth.
Yicheng Kang
Qiu, P. and Kang, Y. (2015) “Blind Image Deblurring Using Jump Regression Analysis”, Statistica Sinica, 25, 879 – 899, doi:10.5705/ss.2014.054.
threeStageParSel
, summary.Three_Stage_Parameters
,
plot.Three_Stage_Parameters
## 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 = 3:4, nboot = 1, blur = TRUE) print(parSel, type = "all") ## End(Not run)
## 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 = 3:4, nboot = 1, blur = TRUE) print(parSel, type = "all") ## End(Not run)
Compute the difference between two one-sided gradient estimates.
roofDiff(image, bandwidth, blur)
roofDiff(image, bandwidth, blur)
image |
A square matrix, no missing value allowed. |
bandwidth |
A positive integer that specifies the number of pixels to use in the local smoothing. |
blur |
If blur = TRUE, besides the conventional 2-D kernel function, a univariate kernel function is used to address the issue of blur. |
At each pixel, the second-order derivarives (i.e., ,
and
) are estimated by
a local quadratic kernel smoothing procedure. Next, the local
neighborhood is first divided into two halves along the direction
perpendicular to (
,
).
Then the one-sided estimates of
and
are obtained respectively by local linear kernel smoothing. The
estimates of
and
are obtained by the
same procedure except that the neighborhood is divided along the
direction perpendicular to (
,
).
A matrix where each entry is the maximum of the differences:
and
at each pixel location.
Yicheng Kang
Qiu, P. and Kang, Y. (2015) "Blind Image Deblurring Using Jump Regression Analysis", Statistica Sinica, 25, 879 – 899, doi:10.5705/ss.2014.054.
diff <- roofDiff(image = peppers, bandwidth = 8)
diff <- roofDiff(image = peppers, bandwidth = 8)
Detect roof/valley edges in an image using piecewise local quadratic kernel smoothing.
roofEdge(image, bandwidth, thresh, edge1, blur, plot)
roofEdge(image, bandwidth, thresh, edge1, blur, plot)
image |
A square matrix, no missing value allowed. |
bandwidth |
A positive integer that specifies the number of pixels to use in the local smoothing. |
thresh |
Threshold value to use in the edge detection criterion. |
edge1 |
A square matrix representing the image's step edges. The function excludes step edges when detects roof edges. |
blur |
If blur = TRUE, besides the conventional 2-D kernel function, a univariate kernel function is used in the local smoothing to address the issue of blur. |
plot |
If plot = TRUE, an image of detected edges is plotted. |
At each pixel, the second-order derivarives (i.e., ,
, and
) are estimated by a local
quadratic kernel smoothing procedure. Next, the local neighborhood
is first divided into two halves along the direction perpendicular
to (
,
). Then the
one-sided estimates of
and
are obtained
respectively by local linear kernel smoothing. The estimates of
and
are obtained by the same procedure
except that the neighborhood is divided along the direction perpendicular
to (
,
). The pixel is
flagged as a roof/valley edge pixel if
the
specified threshold and there is no step edge pixels in the neighborhood.
A matrix of zeros and ones of the same size as the input image.
Yicheng Kang
Qiu, P. and Kang, Y. (2015) “Blind Image Deblurring Using Jump Regression Analysis”, Statistica Sinica, 25, 879 – 899, doi:10.5705/ss.2014.054.
## Not run: step.edges <- stepEdge(peppers, bandwidth = 6, thresh = 25, degree = 1) roof.edges <- roofEdge(image = peppers, bandwidth = 9, thresh = 3000, edge1 = step.edges, blur = FALSE, plot = FALSE) # Time consuming edges <- step.edges + roof.edges par(mfrow = c(2, 2)) image(1 - step.edges, col = gray(0:1)) image(1 - roof.edges, col = gray(0:1)) image(1 - edges, col = gray(0:1)) image(peppers, col = gray(c(0:255)/255)) ## End(Not run)
## Not run: step.edges <- stepEdge(peppers, bandwidth = 6, thresh = 25, degree = 1) roof.edges <- roofEdge(image = peppers, bandwidth = 9, thresh = 3000, edge1 = step.edges, blur = FALSE, plot = FALSE) # Time consuming edges <- step.edges + roof.edges par(mfrow = c(2, 2)) image(1 - step.edges, col = gray(0:1)) image(1 - roof.edges, col = gray(0:1)) image(1 - edges, col = gray(0:1)) image(peppers, col = gray(c(0:255)/255)) ## End(Not run)
Select bandwidth and threshold value for the roof/valley edge detector using bootstrap.
roofEdgeParSel(image, bandwidth, thresh, nboot, edge1, blur = FALSE)
roofEdgeParSel(image, bandwidth, thresh, nboot, edge1, blur = FALSE)
image |
A square matrix object of size n by n, no missing value allowed. |
bandwidth |
Positive integers to specify the number of pixels used in the local smoothing. These are the bandwidth parameters to be chosen from. |
thresh |
Threshold values to be chosen from. |
nboot |
Number of bootstrap samples. |
edge1 |
Step edges. The function excludes step edges when detect roof/valley edges. |
blur |
TRUE if the image contains blur, FALSE otherwise. |
If blur=TRUE, then a conventional local linear kernel smoothing is
applied to estimate the blurred surface; Bootstrap samples are obtained by
drawing with replacement from the residuals and the is computed
for the detected edges of the original sample and those of the bootstrap
samples. If blur=FALSE, the procedure is the same as when blur=TRUE
except that a jump-preserving kernel smoothing procedure is used to obtain
residuals.
Returns a list of the selected bandwdith, the selected threshold value,
and a matrix of values with each entry corresponding to each combination
of bandwdith and threshold.
Yicheng Kang
Qiu, P. and Kang, Y. (2015) “Blind Image Deblurring Using Jump Regression Analysis”, Statistica Sinica, 25, 879-899, doi:10.5705/ss.2014.054
## Not run: step.edges <- stepEdge(peppers, bandwidth = 9, thresh = 17) set.seed(24) parSel <- roofEdgeParSel(image = peppers, bandwidth = 5, thresh = 5000, nboot = 1, edge1 = step.edges, blur = TRUE) # Time Consuming ## End(Not run)
## Not run: step.edges <- stepEdge(peppers, bandwidth = 9, thresh = 17) set.seed(24) parSel <- roofEdgeParSel(image = peppers, bandwidth = 5, thresh = 5000, nboot = 1, edge1 = step.edges, blur = TRUE) # Time Consuming ## End(Not run)
This file contains the synthetic aperture radar (SAR) image of an area near Thetford forest, England. The image has 250x250 pixels. Gray levels are in the range [0, 255]. In the data file, observations are listed as a 250x250 matrix. This image is noisy.
sar
sar
A matrix of 250x250 pixels.
Yicheng Kang
https://users.phhp.ufl.edu/pqiu/research/book/data/index.html
Qiu, P. (2005) Image Processing and Jump Regression Analysis. New Jersey: Wiley.
Compute difference between two one-sided local kernel estimates along the gradient direction.
stepDiff(image, bandwidth, degree = 1, blur = FALSE, plot = FALSE)
stepDiff(image, bandwidth, degree = 1, blur = FALSE, plot = FALSE)
image |
A square matrix, no missing value allowed. |
bandwidth |
A positive integer that specifies the number of pixels to use in the local smoothing. |
degree |
An integer equal to 0 for local constant kernel smoothing or 1 for local linear kernel smoothing. The default value is 1. |
blur |
If blur = TRUE, in addition to a conventional 2-D kernel function, a 1-D kernel is used in local smoothing to address the issue of blur. The default value is FALSE. |
plot |
If plot = TRUE, an image of the detection statistics at each pixel is plotted. |
At each pixel, the gradient is estimated by a local linear
kernel smoothing procedure. Next, the local neighborhood is
divided into two halves along the direction perpendicular to
(,
). Then the one-
sided local kernel estimates are obtained in the two half
neighborhoods respectively.
A matrix of the estimated difference, ,
at each pixel.
Yicheng Kang
Kang, Y. and Qiu, P. (2014) "Jump Detection in Blurred Regression Surfaces," Technometrics, 56(4), 539 – 550, doi:10.1080/00401706.2013.844732.
diff <- stepDiff(image = sar, bandwidth = 4, degree = 0)
diff <- stepDiff(image = sar, bandwidth = 4, degree = 0)
Detect step edges in an image.
stepEdge(image, bandwidth, thresh, degree = 1, blur = FALSE, plot = FALSE)
stepEdge(image, bandwidth, thresh, degree = 1, blur = FALSE, plot = FALSE)
image |
A square matrix, no missing value allowed. |
bandwidth |
A positive integer that specifies the number of pixels to use in the local smoothing. |
thresh |
The threshold value to use in the edge detection criterion. Must be a positive value. |
degree |
An integer equal to 0 for local constant kernel smoothing or 1 for local linear kernel smoothing. The default value is 1. |
blur |
If blur = TRUE, in addition to a conventional 2-D kernel function, a 1-D kernel is used in local smoothing to address the issue of blur. The default value is FALSE. |
plot |
If plot = TRUE, an image of the detected edges is plotted. |
At each pixel, the gradient is estimated by a local kernel
smoothing procedure. Next, the local neighborhood is divided
into two halves along the direction perpendicular to
(,
). Then the
one-sided local kernel estimates are obtained in the two half
neighborhoods respectively. The pixel is flagged as a step
edge pixel if
, where
is the specified threshold value.
A matrix of zeros and ones. Ones represent the detected edge pixels and zeros represent the non-edge pixels.
Yicheng Kang
Kang, Y. and Qiu, P. (2014) "Jump Detection in Blurred Regression Surfaces," Technometrics, 56(4), 539 – 550, doi:10.1080/00401706.2013.844732.
data(sar) edges <- stepEdge(image = sar, bandwidth = 4, degree = 0, thresh = 16)
data(sar) edges <- stepEdge(image = sar, bandwidth = 4, degree = 0, thresh = 16)
Select the bandwidth and threshold parameters for step edge detection.
stepEdgeParSel(image, bandwidth, thresh, nboot, degree = 1, blur = FALSE)
stepEdgeParSel(image, bandwidth, thresh, nboot, degree = 1, blur = FALSE)
image |
A square matrix, no missing value allowed. |
bandwidth |
A positive integer that specifies the number of pixels to use in the local smoothing. |
thresh |
The threshold value to use in the edge detection criterion. Must be a positive value. |
nboot |
Number of bootstrap samples to use in estimating
|
degree |
An integer equal to 0 for local constant kernel smoothing or 1 for local linear kernel smoothing. The default value is 1. |
blur |
If blur = TRUE, in addition to a conventional 2-D kernel function, a 1-D kernel is used in local smoothing to address the issue of blur. The default value is FALSE. |
A jump-preserving local linear kernel smoothing is applied to
estimate the discontinuous regression surface; Bootstrap
samples are obtained by drawing with replacement from the
residuals and the is computed for the detected
edges of the original sample and those of the bootstrap samples.
A list of the selected bandwidth, the selected threshold value
and a matrix of values with each entry
corresponding to each combination of bandwidth and threshold.
Yicheng Kang
Kang, Y. and Qiu, P. (2014) "Jump Detection in Blurred Regression Surfaces," Technometrics, 56(4), 539 – 550, doi:10.1080/00401706.2013.844732.
set.seed(24) parSel <- stepEdgeParSel(image = sar, bandwidth = 5, thresh = c(17, 21), nboot = 1)
set.seed(24) parSel <- stepEdgeParSel(image = sar, bandwidth = 5, thresh = c(17, 21), nboot = 1)
This file contains the stop sign image. The image has 160x160 pixels. Gray levels are in the range [0, 255]. In the data file, observations are listed as a 160x160 matrix. This image has much blurring involved.
stopsign
stopsign
A matrix of 160x160 pixels.
Yicheng Kang
Kang, Y. (2020) “Consistent Blind Image Deblurring Using Jump-Preserving Extrapolation”, Journal of Computational and Graphical Statistics, 29(2), 372 – 382, doi:10.1080/10618600.2019.1665536.
Summarize and display some key information about an edge detection parameter selection object.
## S3 method for class 'Edge_Parameters' summary(object, ...)
## S3 method for class 'Edge_Parameters' summary(object, ...)
object |
An edge detection parameter selection object. |
... |
Further arguments passed to or from other methods. |
Summarize results about an edge detection parameter
selection object. In particular, it shows the
values based on bootstrap samples for combinations of bandwidth and
threshold values.
A brief display of parameter selection results in edge detection.
Yicheng Kang
Kang, Y. and Qiu, P. (2014) "Jump Detection in Blurred Regression Surfaces," Technometrics, 56(4), 539 – 550, doi:10.1080/00401706.2013.844732.
stepEdgeParSel
, roofEdgeParSel
,
print.Edge_Parameters
set.seed(24) parSel <- stepEdgeParSel(image = sar, bandwidth = 5, thresh = c(17, 21), nboot = 1) summary(parSel)
set.seed(24) parSel <- stepEdgeParSel(image = sar, bandwidth = 5, thresh = c(17, 21), nboot = 1) summary(parSel)
Summarize and display key information about a JPEX parameter selection object.
## S3 method for class 'JPEX_Parameters' summary(object, ...)
## S3 method for class 'JPEX_Parameters' summary(object, ...)
object |
A JPEX parameter selection object. |
... |
Further arguments passed to or from other methods. |
Summarize some key information about a JPEX parameter selection object. In particular, it displays the chosen bandwidth and estimated noise level.
A brief display of parameter selection results in JPEX estimation.
Yicheng Kang
Kang, Y. (2020) “Consistent Blind Image Deblurring Using Jump-Preserving Extrapolation”, Journal of Computational and Graphical Statistics, 29(2), 372 – 382, doi:10.1080/10618600.2019.1665536.
cv.jpex
, print.JPEX_Parameters
,
plot.JPEX_Parameters
parSel <- cv.jpex(stopsign, c(2,3)) summary(parSel)
parSel <- cv.jpex(stopsign, c(2,3)) summary(parSel)
Summarize and display some key information about a JPLLK parameter selection object.
## S3 method for class 'JPLLK_Parameters' summary(object, ...)
## S3 method for class 'JPLLK_Parameters' summary(object, ...)
object |
A JPLLK parameter selection object. |
... |
Further arguments passed to or from other methods. |
Summarize some information about a JPLLK parameter selection object. In particular, it displays the selected bandwidth and estimated noise level.
A brief summary of parameter selection results in JPLLK estimation.
Yicheng Kang
Qiu, P. (2009) "Jump-Preserving Surface Reconstruction from Noisy Data", Annals of the Institute of Statistical Mathematics, 61(3), 715 – 751, doi:10.1007/s10463-007-0166-9.
JPLLK_surface
, print.JPLLK_Parameters
,
plot.JPLLK_Parameters
fit <- JPLLK_surface(image=sar, bandwidth=c(3, 4)) summary(fit)
fit <- JPLLK_surface(image=sar, bandwidth=c(3, 4)) summary(fit)
Summarize and display some key information about a clustering-based surface estimation parameter selection object.
## S3 method for class 'Surface_Cluster_Parameters' summary(object, ...)
## S3 method for class 'Surface_Cluster_Parameters' summary(object, ...)
object |
A clustering-based surface estimation parameter selection object. |
... |
Further arguments passed to or from other methods. |
Summarize some information about a clustering-based surface estimation parameter selection object. In particular, it displays the selected bandwidth, the estimated noise level, the estimated value of the error density at 0 and the estimated mean of absolute error.
A brief display of parameter selection results in clustering-based estimation.
Yicheng Kang
Kang, Y., Mukherjee, P.S. and Qiu, P. (2018) "Efficient Blind Image Deblurring Using Nonparametric Regression and Local Pixel Clustering", Technometrics, 60(4), 522 – 531, doi:10.1080/00401706.2017.1415975.
Qiu, P. (2009) "Jump-Preserving Surface Reconstruction from Noisy Data", Annals of the Institute of Statistical Mathematics, 61, 715 – 751, doi:10.1007/s10463-007-0166-9.
surfaceCluster_bandwidth
, print.Surface_Cluster_Parameters
,
plot.Surface_Cluster_Parameters
data(brain) bandwidth_select <- surfaceCluster_bandwidth(image = brain, bandwidths = c(3:4), sig.level = .9995, blur = FALSE) summary(bandwidth_select)
data(brain) bandwidth_select <- surfaceCluster_bandwidth(image = brain, bandwidths = c(3:4), sig.level = .9995, blur = FALSE) summary(bandwidth_select)
Summarize and display key information about a 3-stage estimation bandwidth selection object.
## S3 method for class 'Three_Stage_Parameters' summary(object, ...)
## S3 method for class 'Three_Stage_Parameters' summary(object, ...)
object |
A three-stage estimation bandwidth selection object. |
... |
Further arguments passed to or from other methods. |
Summarize some information about a three-stage estimation bandwidth selection object. In particular, this method prints the cross-validation or modified cross-validation scores and the selected bandwidth.
A brief display of bandwidth selection results in three-stage estimation.
Yicheng Kang
Qiu, P. and Kang, Y. (2015) “Blind Image Deblurring Using Jump Regression Analysis”, Statistica Sinica, 25, 879 – 899, doi:10.5705/ss.2014.054.
threeStageParSel
, print.Three_Stage_Parameters
,
plot.Three_Stage_Parameters
## 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 = 3:4, nboot = 1, blur = TRUE) summary(parSel) ## End(Not run)
## 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 = 3:4, nboot = 1, blur = TRUE) summary(parSel) ## End(Not run)
Estimate surface using local pixel clustering and kernel smoothing. The bandwidth parameter is specified by the user.
surfaceCluster(image, bandwidth, sig.level, sigma, phi0, mean_std_abs, cw=3, blur = FALSE, plot = FALSE)
surfaceCluster(image, bandwidth, sig.level, sigma, phi0, mean_std_abs, cw=3, blur = FALSE, plot = FALSE)
image |
A square matrix, no missing value allowed. |
bandwidth |
A positive integer that specifies the number of pixels to use in the local smoothing. |
sig.level |
The significance level for the hypothesis test deciding whether to cluster pixels or not. |
sigma |
The noise level (i.e., standard deviation of the error distribution). It is used for computing the asymptotic threshold for residuals, which are defined to be the difference between the local linear kernel smoothing output and the center weighted median filter output. If not specified by the user, a jump-preserving local linear kernel smoothing surface estimation (Qiu 2009) is used to obtain an estimated sigma. |
phi0 |
The density of the standardized error distribution at 0. It is used for computing the asymptotic threshold for residuals, whose definition is given above. If not specified by the user, a jump-preserving local linear kernel smoothing surface estimation (Qiu 2009) is used to obtain an estimated value. |
mean_std_abs |
The mean of absolute value of the standardized error. It is used for computing the asymptotic threshold for residuals, whose definition is given above. If not specified by the user, a jump-preserving local linear kernel smoothing surface estimation (Qiu 2009) is used to obtain an estimated value. |
cw |
The center weight for the center weighted median filter. It must be a positive integer. |
blur |
If blur = TRUE, besides a conventional 2-D kernel function, a univariate increasing kernel function is used in the local kernel smoothing to address the issue with blur. |
plot |
If plot = TRUE, the image of the fitted surface is plotted |
A list of 'estImg', the restored image, 'sigma', the estimated standard deviation of the random error, 'phi0', the estimated density of the error distribution at 0, and 'mean_std_abs', the estimated absolute mean of the error distribution.
Yicheng Kang
Kang, Y., Mukherjee, P.S. and Qiu, P. (2018) "Efficient Blind Image Deblurring Using Nonparametric Regression and Local Pixel Clustering", Technometrics, 60(4), 522 – 531, doi:10.1080/00401706.2017.1415975.
Qiu, P. (2009) "Jump-Preserving Surface Reconstruction from Noisy Data", Annals of the Institute of Statistical Mathematics, 61, 715 – 751, doi:10.1007/s10463-007-0166-9.
fit <- surfaceCluster(image = brain, bandwidth = 4, sig.level = .9995, cw = 3, blur = FALSE)
fit <- surfaceCluster(image = brain, bandwidth = 4, sig.level = .9995, cw = 3, blur = FALSE)
Select the bandwidth parameter for the function
surfaceCluster
using cross validation. In the
cases when there is no blur involved (i.e., denoising only),
leave-one-out cross validation is used. In the cases when there
is blur involved, a modified cross validation is used.
surfaceCluster_bandwidth(image, bandwidths, sig.level, sigma, phi0, mean_std_abs, relwt = 0.5, cw = 3, blur = FALSE)
surfaceCluster_bandwidth(image, bandwidths, sig.level, sigma, phi0, mean_std_abs, relwt = 0.5, cw = 3, blur = FALSE)
image |
A square matrix, no missing value allowed. |
bandwidths |
An array of positive integers that specifies the candidate bandwidth parameters. All the array elements must be positive integers because the bandwidth is specified in terms of number of pixels. |
sig.level |
The significance level for the hypothesis test deciding whether to cluster pixels or not. |
sigma |
The noise level (i.e., standard deviation of the error distribution). It is used for computing the asymptotic threshold for residuals, which are defined to be the difference between the local linear kernel smoothing output and the center weighted median filter output. If not specified by the user, a jump-preserving local linear kernel smoothing surface estimation (Qiu 2009) is used to obtain an estimated sigma. |
phi0 |
The density of the standardized error distribution at 0. It is used for computing the asymptotic threshold for residuals, whose definition is given above. If not specified by the user, a jump-preserving local linear kernel smoothing surface estimation (Qiu 2009) is used to obtain an estimated value. |
mean_std_abs |
The mean of absolute value of the standardized error. It is used for computing the asymptotic threshold for residuals, whose definition is given above. If not specified by the user, a jump-preserving local linear kernel smoothing surface estimation (Qiu 2009) is used to obtain an estimated value. |
relwt |
The relative weight assigned to the cross validation score in the continuity region. That is, 1 - relwt is assigned to the cross validation score around the step edges. It is used only when there is blur involved. |
cw |
The center weight for the center weighted median filter. It must be a positive integer. |
blur |
If blur = TRUE, besides a conventional 2-D kernel function, a univariate increasing kernel function is used in the local kernel smoothing to address the issue with blur. |
A list: 'cv_dataframe', a data frame containing the cross validation scores corresponding to each candidate bandwidth, 'bandwidth_hat', the selected bandwidth, 'sigma', the estimated standard deviation of the random error, 'phi0', the estimated density of the error distribution at 0, and 'mean_std_abs', the estimated absolute mean of the error distribution.
Yicheng Kang
Kang, Y., Mukherjee, P.S. and Qiu, P. (2018) "Efficient Blind Image Deblurring Using Nonparametric Regression and Local Pixel Clustering", Technometrics, 60(4), 522 – 531, doi:10.1080/00401706.2017.1415975.
Qiu, P. (2009) "Jump-Preserving Surface Reconstruction from Noisy Data", Annals of the Institute of Statistical Mathematics, 61, 715 – 751, doi:10.1007/s10463-007-0166-9.
data(brain) bandwidth_select <- surfaceCluster_bandwidth(image = brain, bandwidths = c(3:4), sig.level = .9995, blur = FALSE)
data(brain) bandwidth_select <- surfaceCluster_bandwidth(image = brain, bandwidths = c(3:4), sig.level = .9995, blur = FALSE)
Estimate jump location curves using local principal component lines. One-sided kernel smoothing is then used for surface estimation. Bandwidth is specified by the user.
threeStage(image, bandwidth, edge1, edge2, blur = FALSE, plot = FALSE)
threeStage(image, bandwidth, edge1, edge2, blur = FALSE, plot = FALSE)
image |
A square matrix, no missing value allowed. |
bandwidth |
A positive integer that specifies 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 |
blur |
If blur = TRUE, besides a conventional 2-D kernel function, a univariate increasing kernel function is used in the local kernel smoothing to address the issue with blur. |
plot |
If plot = TRUE, the image of the fitted surface is plotted |
At each pixel, if there are step edges detected in the local neighborhood, a principal component line is fitted through the detected edge pixels to approximate the step edge locally and then the regression surface is estimated by a local constant kernel smoothing procedure using only the pixels on one side of the principal component line. If there are no step edges but roof/valley edges detected in the local neighborhood, the same procedure is followed except that the principal component line to fitted through the detected roof/valley edge pixels. In cases when there is either no step edges or roof/valley edges detected in the neighborhood, the regression surface at the pixel is estimated by the conventional local linear kernel smoothing procedure.
The restored image, which is represented by a matrix.
Yicheng Kang
Qiu, P. and Kang, Y. (2015) “Blind Image Deblurring Using Jump Regression Analysis”, Statistica Sinica, 25, 879 – 899, doi:10.5705/ss.2014.054.
step.edges <- stepEdge(sar, bandwidth = 4, thresh = 20, degree = 0) stepEdge1 <- modify2(bandwidth = 4, step.edges) fit <- threeStage(image = sar, bandwidth = 4, edge1 = stepEdge1, edge2 = array(0, rep(ncol(sar), 2)))
step.edges <- stepEdge(sar, bandwidth = 4, thresh = 20, degree = 0) stepEdge1 <- modify2(bandwidth = 4, step.edges) fit <- threeStage(image = sar, bandwidth = 4, edge1 = stepEdge1, edge2 = array(0, rep(ncol(sar), 2)))
Select the bandwidth value for the image restoration method
implemented in the function threeStage
threeStageParSel(image, bandwidth, edge1, edge2, nboot, blur = FALSE)
threeStageParSel(image, bandwidth, edge1, edge2, nboot, blur = FALSE)
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 |
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. |
A list of the selected bandwidth, and a matrix of cross-validation scores with each entry corresponding to a choice of bandwidth.
Yicheng Kang
Qiu, P. and Kang, Y. (2015) “Blind Image Deblurring Using Jump Regression Analysis”, Statistica Sinica, 25, 879 – 899, doi:10.5705/ss.2014.054.
## 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 = 3:4, nboot = 1, blur = TRUE) ## End(Not run)
## 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 = 3:4, nboot = 1, blur = TRUE) ## End(Not run)