# NOT RUN {
# First, get a matrix from your image. Here an example of a bush image is used.
bush<-system.file("extdata/bush.JPG",package ="bwimage")
bush_imagematrix<-threshold_color(bush, "jpeg", "proportional", compress_rate = 0.1)
# Information of white (i.e. 0s in matrix) holes in 10 rows uniformly sample among matrix.
hole_row(bush_imagematrix, n_sections=10)
# Information of black (i.e. 1s in matrix) holes in 15 rows uniformly sample among matrix.
hole_row(bush_imagematrix, n_sections=15)
# }
Run the code above in your browser using DataLab