import_process_image: Import and Process a .tiff or .tif image

View source: R/userFunctions.R

import_process_imageR Documentation

Import and Process a .tiff or .tif image

Description

Import and Process a .tiff or .tif image

Usage

import_process_image(
  imageName,
  file_loc,
  trimAmountTop = 100,
  trimAmountBottom = 50,
  beta0 = -2.774327,
  beta1 = 51.91687,
  cutoffProbability = 0.5,
  NADefault = 0,
  FilterBright = c(13, 13),
  FilterNonBright = c(8, 8),
  methodBright = "delation",
  methodNonBright = "delation",
  thresholdBright = 0.8,
  thresholdNonBright = 0.5
)

Arguments

imageName

The name of the file

file_loc

the path from ~/ to the dir where the file is

trimAmountTop

Number of pixels off of top of image (usually for common flares)

trimAmountBottom

Number of pixels off of bottom of image

beta0

The intercept of a logistic regression default is for magnetograms

beta1

The slope of the logistic regression default is for magnetograms

cutoffProbability

The probability cut off for the decision of an imageMatrix being bright

NADefault

The default value set to NA's found in the matrix

FilterBright

Vector specifying the dimensions of the kernel, which will be used to perform either delation or erosion, such as c(13,13)

FilterNonBright

Vector specifying the dimensions of the kernel, which will be used to perform either delation or erosion, such as c(8,8)

methodBright

one of 'delation'(adds to image, making brights brighter), 'erosion' (subtracts from image brights darker)

methodNonBright

one of 'delation'(adds to image, making brights brighter), 'erosion' (subtracts from image brights darker)

thresholdBright

should be between 0 and 1 for normalized images Default = 0.8

thresholdNonBright

should be between 0 and 1 for normalized images Default = 0.5

Value

imageMatrix processed and trimed, in landscape orientation


Bott-binc/magnetoPackage2020 documentation built on Oct. 12, 2024, 7:49 p.m.