# NOT RUN {
# Get a matrix from your image. Here examples provided by bwimage package.
bush<-system.file("extdata/bush.JPG",package ="bwimage")
bush<-threshold_color(bush, "jpeg", "proportional",compress_rate = 0.1)
a<-denseness_sample(bush, width_size=100, height_size=100, sample_width=5, sample_height=5)
plot_samples(bush, a[,4],a[,5], 100,100, 5, 5,"rectangle")
# }
Run the code above in your browser using DataLab