data(cryptomeria)
img <- rgb2gray(cryptomeria)
img <- crop(img,300,300)
# simple example
test <- gabor.filter(x=img, lamda=8, theta=60, bw=1.5, phi=0, asp=0.3, disp=TRUE)
## Not run:
# # azimuthal intensity distribution with respect to the orientation of Gabor function
# par(mfrow=c(2,1))
# Integ <- array()
# filt.img <- matrix(0, nrow(img), ncol(img))
# for ( i in 1:60) {
# out <- gabor.filter(x=img, lamda=8, theta=3*i, bw=1.5, phi=0, asp=0.3)
# filt.img <- out$filtered_img + filt.img
# Integ[i] <- sum(out$filtered_img*out$filtered_img)
# }
# image(rot90c(filt.img),col=gray(c(0:255)/255),asp=1,axes=FALSE, useRaster=TRUE)
# x <- 1:60
# plot(3*x,Integ, ty="l", ylab="integrated intensity (a.u.)", xlab="azimuthal angle (deg)")
# ## End(Not run)
Run the code above in your browser using DataLab