Description Usage Arguments Value References See Also Examples

This function can be used to analyze a continuous image in .png or .jpeg format, or an image represented as a list object in the format of parnormobs.

1 2 |

`image` |
This may be a string representing the path to a .png or .jpeg file, or a list object in the same format as par2obs output, with intensity, r.obs, theta.obs, and center the required list contents. |

`gamma.fun` |
This is a function, like triangle2 or ellipse, denoting the true boundary. It is optional and only used when the image input refers to a .png or .jpeg file. |

`center` |
This is required if the image input refers to a .png or .jpeg file, otherwise it is unused. |

`inimean` |
a constant to specify the initial mean functions in the Bayesian estimation. |

`nrun` |
the number of MCMC samples to keep for estimation. |

`nburn` |
the number of initial MCMC samples to discard. |

`J` |
truncation number of the Gaussian process kernel. The number of eigenfunctions is |

`ordering_mu` |
Indicates which Gaussian distribution has larger mean intensity: "I", the Gaussian distribution inside the boundary; "O", the Gaussian distribution outside the boundary; "N", no ordering information is available. |

`ordering_sigma` |
Indicates which Gaussian distribution has larger intensity variance: "I", the Gaussian distribution inside the boundary; "O", the Gaussian distribution outside the boundary; "N", no ordering information is available. |

`mask` |
Logical vector (same length as obs$intensity) to indicate region of interest. Should this data point be included in the analysis? |

`slice` |
boolean where TRUE means that slice sampling will be used to sample Fourier basis function coefficients and FALSE means that Metropolis-Hastings will be used instead. |

`outputAll` |
boolean controlling the amount of output produced, see value below. |

`output` |

If outputAll is FALSE,

`estimate ` |
Posterior mean estimate of image boundary at theta values. |

`theta ` |
A grid of 200 values on |

`lower, upper` |
The lower and upper bounds of a |

If outputAll is TRUE, same as above, and additionally,

`musig.smp` |
posterior samples of |

`coef.smp` |
posterior samples of Fourier basis function coefficients. |

`image` |
the input image passed to fitContImage. |

`obs` |
the processed image data passed to BayesBDnormal. |

Li, M. and Ghosal, S.(2015) "Bayesian Detection of Image Boundaries." arXiv 1508.05847.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
## Not run:
set.seed(12345)
gamma.fun = ellipse(a = 0.35, b = 0.25)
norm.obs = parnormobs(m = 100, mu.in = 4, mu.out = 1,
sd.in = 1.5, sd.out = 1, design = 'J',
center = c(0.5,0.5), gamma.fun)
norm.samp = fitContImage(image = norm.obs, nrun = 1000, nburn = 0,
J = 10,ordering_mu = "I",ordering_sigma = "I", slice = FALSE, outputAll = FALSE)
par(mfrow = c(1,3))
plotBD(norm.samp, 1)
plotBD(norm.samp, 2)
plotBD(norm.samp, 3)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.