Image

class sonic.Image
Constructor Summary
Image(DNmat)

Constructs an image object that contains the digital number values and image size

Inputs:
  • DNmat (nxm double): matrix containing the digital number values of each pixel in an image

Outputs:
  • obj (1x1 sonic.Image): Image object, encoding an image

Last revised: 2/29/24 Last author: Ava Thrasher

Property Summary
DNmat
cols
rows
Method Summary
bilinInterp(pts_obj)
Inputs
  • obj (1,1 sonic.Image): Image to sample

  • pts_obj (1,1 sonic.Points2): Contains the u,v coordinates to sample in the image (u’s in row 1, v’s in row 2) where the first pixel is centered at 1,1

Outputs
  • DN (n,1 double): Sampled pixel values

Last revised: 04/10/24 Last author: Ava Thrasher

estNoiseRand(sigMultiple, randNum)

Estimates the background noise of an image by sampling random pixels

Inputs:
  • obj (1x1 sonic.Image): Sonic image object of which the background noise will be estimated

  • sigMultiple (1x1 double): optional input that will adjust how many sigma multiples are used

  • randNum (1x1 double): optional total number of random pixel pairs selected for estimation

Outputs:
  • noiseThresh (1x1 double): digital number cut off for background noise

Last revised: 2/29/24 Last author: Ava Thrasher

estNoiseSort(sigMultiple, cutOff)

Estimates the background noise of an image by sorting the digital numbers and determining a percentage DN cutoff

Inputs:
  • obj (1x1 sonic.Image): Sonic image object of which the background noise will be estimated

  • sigMultiple (1x1 double): Optional sigma multiplier

  • cutOff (1x1 double): Optional cutoff percentage ranging between 0 and 1 that determines the upper bound for the sorted pixels to be considered

Outputs:
  • noiseThresh (1x1 double): digital number cut off for background noise

Last revised: 2/29/24 Last author: Ava Thrasher

flattenImage(med_area)

Flattens an image by subtracting off the MATLAB median filter of the image

Inputs:
  • obj (1x1 sonic.Image): matrix containing the digital number values of each pixel in an image

  • med_area (1x1 double): optional input neighborhood size to calculate median

Outputs:
  • flatImgObj (1x1 sonic.Image): Image object of the flattened image

Last revised: 2/29/24 Last author: Ava Thrasher

getLine(scan_lines)

Given a line object in uv space, getLine will find pixel values along that line. This assumes 1,1 is centered in the image’s top left pixel.

Inputs:
  • obj (1,1 sonic.Image): Image object to find pixel values in

  • scanlines (1,1 sonic.ScanLines): ScanLines object containing the lines and direction for the lines to get

Outputs:
  • pxVals (1,n cell): cell array containing the pixel values along the n lines specified. Order of cell array will be the same as the input line order.

  • pxLocs (1,n cell): cell array containing Points2 objects of each [u,v] coordinate sampled for each line. The order of vector will be the same as the input line order.

  • lineLengths (n,1 double): contains length of each line in the image in the same order that lines were provided

removeSmearCCD(t_exp, t_inout)

Given the clock cycling time of a CCD focal array and an image containing smear, this function will remove the smear and output the corrected image.

Inputs:
  • obj (1x1 sonic.Image): Sonic image object which contains smear to be removed

  • t_exp (1x1 double): Image exposure time

  • t_inout (1x1 OR 1x2 double): CCD readin/readout time per row. If input as a 1,1 the read in and out time are assumed to be the same. If input as a 1,2 the first index is the read in time and the second index is the read out time.

Outputs:
  • cleaned_img (1x1 sonic.Image): Image object with smear removed

Last revised: 5/14/24 Last author: Ava Thrasher