powered by
Typical use case: you want the coordinates of all pixels with a value above a certain threshold
get.locations(im, condition)
the image
a function that takes scalars and returns logicals
coordinates of all pixels such that condition(pixel) == TRUE
# NOT RUN { im <- as.cimg(function(x,y) x+y,10,10) get.locations(im,function(v) v < 4) get.locations(im,function(v) v^2 + 3*v - 2 < 30) # }
Run the code above in your browser using DataLab