unravel.image_tools.DoG module#

Use img_DoG from UNRAVEL to apply Difference of Gaussians to a single image.

Difference of Gaussians:
  • Sigma1 and sigma2 are the standard deviations for the first and second Gaussian blurs

  • Simga2 (the larger blur) should be ~ 1.0 to 1.5 times the radius of these features of interest
    • E.g., if nuclei have a radius of ~1.5 to 2.5 pixels, sigma2 might be 1.5 to 3.0

  • Sigma1 (the smaller blur) should be smaller than the size of the features you want to keep, ideally around the size of the noise
    • E.g., if noise is ~1 pixel in size, sigma1 might be 0.5 to 1

  • The ratio of simga2 to sigma1 should ideally be at least 1.5 to 2. This helps ensure that the blurring difference is significant enough to highlight the features of interest.

Note

  • This command is intended to test the DoG method on a single image.

  • 2D DoG is not implemented in vstats_prep.

  • DoG could be added to vstats_prep in the future if needed.

  • 3D spatial averaging and 2D rolling ball background subtraction are used in vstats_prep instead.

Usage:#

img_DoG -i input.tif -g1 1.0 -g2 2.0 [-o output.tif] [-v]

unravel.image_tools.DoG.parse_args()[source]#
unravel.image_tools.DoG.load_tif(tif_path)[source]#

Load a single tif file using OpenCV and return ndarray.

unravel.image_tools.DoG.difference_of_gaussians(img, sigma1, sigma2)[source]#

Subtract one blurred version of the image from another to highlight edges.

unravel.image_tools.DoG.save_tif(img, output_path)[source]#

Save an image as a tif file.

unravel.image_tools.DoG.main()[source]#