# AUTOGENERATED! DO NOT EDIT! File to edit: notebooks/denoise_images.ipynb (unless otherwise specified).

__all__ = ['nlm_denoise']

# Cell
# export
import pandas
import dotenv
import os
import matplotlib.pyplot as plt
import numpy

dotenv.load_dotenv()

# Cell

from c7m import load_tiff_images
import networkx
from tqdm.notebook import tqdm, trange
import click
import multiprocessing
import logging
import cv2 as cv

# Cell
def nlm_denoise(im):
    tmp = cv.convertScaleAbs(im, alpha=(255.0/im.max()))
    return cv.fastNlMeansDenoising(tmp, 3)