This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, os, time, numpy, Image, pywt | |
import matplotlib.pyplot as plt | |
def wavelet_transform(data, threshold): | |
wavelet_type = 'haar' | |
clean_coef = list() | |
compose = list() | |
cA2, cD2, cD1 = pywt.wavedec2(data, wavelet_type, level=2) | |
clean_coef.append(cA2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpy import * | |
import scipy | |
import pywt | |
import sys | |
import Image | |
import scipy.ndimage | |
noiseSigma = 5.0 | |
def denoise(data,wavelet,noiseSigma): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import pywt | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import os | |
def filtroGrisesPromedio(imagen): | |
x, y = imagen.size | |
px = imagen.load() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import sys | |
''' | |
python haar.py | |
python haar.py 1 5 3 1 | |
''' | |
def wrap(value, ubound): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
import numpy as np | |
import cv2 as cv | |
def FCD( src, mask ): | |
A_THRESH = [ 2, 1 ] | |
sobel_x = cv.Sobel( src, cv.CV_32F, 1, 0, ksize = 5 ) |