cropFins: cropFins

Usage Arguments Details

View source: R/blobber.R

Usage

1
2
cropFins(imageName, cropNet, workingImage, saveDir, minXY = 100, target = 1,
  threshold = 0.45, dim = c(225, 150, 3, 1))

Arguments

imageName

path to image to be cropped

cropNet

mxnet model for isolating dolphin

workingImage

workspace for holding image during processing

saveDir

directory to save cropped image

minXY

minimum width/height in pixels for valid crop

target

label indicating layer representing class

threshold

threshold value for triggering a crop

Details

Function loads image and uses the given neural network to isolate any dorsal fins therin. The neural network returns a matrix whose values range [0,1]. Using a contiguous region algorithm (blob analysis), the x,y range for each excitation on the matrix is found. The range is then rescaled to find the analogous region in the original image. This region is cropped from said image and saved as a jpeg to the given directory.


haimeh/finFindR documentation built on July 17, 2021, 12:56 a.m.