repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/SobelOperator.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 SobelOperator: Detect edges by the sobel operator ''' # Set module functions from ImageUtilities import imageReadL,...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/Thresholding.py
<filename>ExamplesPython_3.6/Chapter3/Thresholding.py<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 Thresholding: Create binary image by thresholding ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createIma...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter7/EllipticFourierDescriptors.py
<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 7 EllipticFourierDescriptors: Compute the elliptic Fourier descriptors of a shape in an image ''' # Set module functions from ImageUtilities import createImageF, createVectorF from Imag...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter7/KrawtchoukMoments.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 7 KrawtchoukMoments: Compute Krawtchouk moments for a region in an image. Compute moments, moments...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/SobelKernel.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 SobelKernel: Generate a Sobel kernel of arbitrary size ''' # Set module functions from ImageUtilities import createImageUV from Pr...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/LaplacianOperator.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 LaplacianOperator: Detect edges by the Laplacian operator ''' # Set module functions from ImageUtilities import imageReadL, showIma...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/HoughTransformEllipses.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 HoughTransformEllipses: Ellipse detection by the Hough transform ''' # Set module functions from ImageUtilities import imageReadL, showImageF, showImageL, createScaleImageL, createImageNF from ImageOperatorsU...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Modules/ImageRegionsUtilities.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ ImageRegionUtilities: Helper module to process regions and line segments ''' # Images from ImageUtilities import imageReadL, createImageF, createImageL, showImageL, createVectorF from ImageOperatorsUtilities import ap...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter2/SeparableFourierTransform.py
<filename>ExamplesPython_3.6/Chapter2/SeparableFourierTransform.py ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 2 SeparableFourierTransform: Compute the Fourier transform of an image using the separable formulation Display the ma...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter7/AngularFunction.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 7 AngularFunction: Compute the angular functions of a shape ''' # Set module functions from ImageUtilities import imageReadL, createImageF, showImageF, showImageL from ImageRegionsUtilities import findL...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/AnisotropicDiffusion.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 AnisotropicDiffusion: Remove noise and keep edges by anisotropic diffusion filtering ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageF, showImageF # Math and iteratio...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/HoughTransform.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 HoughTransform: Line detection by the Hough transform ''' # Set module functions from ImageUtilities import imageReadL, createImag...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/AreaMotion.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 AreaMotion: Compute optical flow by using correlation ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageF from PlotUtilities import plotQuiver # Math and iteration from...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter7/KrawtchoukPolynomials.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<filename>ExamplesPython_3.6/Chapter7/KrawtchoukPolynomials.py ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 7 KrawtchoukPolynomials: Compute two dimensional weighted Krawtchouk pol...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter8/WatershedGradientTransform.py
<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 8 WaterShedGradientTransform: Compute Watershed transform by considering the gradient image ''' # Set module functions from ImageUtilities import imageReadL, showImageL,createImageF, sh...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter7/AngularFourierDescriptors.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 7 AngularFourierDescriptors: Compute the angular Fourier descriptors of a shape in an image ''' # Set module functions from I...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/HistogramEqualization.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 HistogramEqualization: Adjust image intensity according to the histogram ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageL, createVectorI from PlotUtilities import plo...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/HTCircleDecomposition.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 HTCirlceDecomposition: Circle detection by the Hough transform decomposition ''' # Set module functions from ImageUtilities import imageReadL, showImageF, showImageL, createScaleImageL, createVectorF, createI...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/TruncatedMedianFilter.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 TruncatedMedianFilter: Noise reduction by truncated median filter ''' # Set module functions from ImageUtilities import imageReadL...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/CurvatureDetection.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 CurveatureDetection: Obtain curvature by computing angle differences or ''' # Set module functions from ImageUtilities import imageReadL, createImageF, showImageF, showImageL from ImageOperatorsUtilities impo...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/CurvatureByIntensity.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 CurveatureByIntensity: Obtain curvature by changes in intensities ''' # Set module functions from ImageUtilities import imageReadL, createImageF, showImageF, showImageL from ImageOperatorsUtilities import app...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter1/ImageBrightening.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 1 ImageBrightening: Increase the intensity of an image ''' # Iteration from timeit import itertools # Set module functions from Imag...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter7/RegionDescriptors.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<filename>ExamplesPython_3.6/Chapter7/RegionDescriptors.py ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 7 RegionDescriptors: Compute basic region descriptors of a shape in an image...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter10/Transformations.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<filename>ExamplesPython_3.6/Chapter10/Transformations.py ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 10 Transformations: Performs geometric transformations to an image ''' ...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/IntensityNormalization.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 IntensityNormalization: Normalize an image ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImag...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/GradienMotion.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 GradientMotion: Compute optical flow by using the gradient ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageF, createImageUV from ConvolutionUtilities import createGaus...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter1/ImageDisplay.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 1 ImageDipslay: Loads and displays an image. Shows a surface and prints pixel data ''' # Set module functions from ImageUtilities imp...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/GeneralizedHoughTransform.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 GeneralizedHoughTransform: Shape detection by the generalized Hough transform ''' # Set module functions from ImageUtilities import imageReadL, showImageF, showImageL, createImageF from ImageOperatorsUtiliti...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter2/LowHighFilters.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 2 LowHighFilters: Filter an image in frequency domain ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageF, showImageF from FourierUtilities import computeCoefficients, co...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/ImageHistogram.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 ImageHistogram: Compute the histogram of an image whose gray level values are transformed by scale * GrayLevel + Translation ''' # Set module functions from ImageUtilities import imageReadL, ...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter10/Projection.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 10 Projection: Compute a projection from seven corresponding image and 3D points and perform the projection on the image ''' # Set module functions from ImageUtilities import imageReadRGB...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/GaussianConvolution.py
<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 GaussianConvolution: Filter an image by the convolution of a Gaussian function ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageF from ConvolutionUtil...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Modules/FourierUtilities.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ FourierUtilties: Helper module for Fourier analysis ''' # Images from ImageUtilities import createImageF from PrintUtilities ...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Modules/GeometricUtilities.py
<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ GeometricUtilities: Helper module to apply geometric transformations to images ''' # Images from ImageUtilities import createImageRGB # Math from math import sqrt # Iteration from timeit import itert...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/BasicPointOperators.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 BasicPointOperators: Applies point operations to an image (sawtooth,logarithmic,exponential) and show the hi...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/HTEllipseDecomposition.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 HTEllipseDecomposition: Ellipse detection by the Hough transform decomposition ''' # Set module functions from ImageUtilities import imageReadL, showImageF, showImageL, createScaleImageL, createImageF from Im...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Modules/ImagePropertiesUtilities.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ ImagePropertiesUtilities: Helper module to obtain information from an image ''' # Array to store image data from numpy import amax, amin, unravel_index # Mean form a float image def meanStddev(image): heightImage ...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter9/BackProjection.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 9 BackProjection: Compute the position of a region in an image by backrpojection. It uses the moments of the projecti...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/MedianFilter.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 MedianFilter: Noise reduction by median filter ''' # Set module functions from ImageUtilities import imageReadL, showImageL, creat...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter10/Homography.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 10 Homography: Compute an homography from four corresponding image points and perform the transformation on the image ''' # Set module functions from ImageUtilities import imageReadRGB, i...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter2/FourierTransform.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 2 FourierTransform: Compute the Fourier transform of an image and display the magnitude and phase ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageF, showImageF from Imag...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/OptimalThresholding.py
<filename>ExamplesPython_3.6/Chapter3/OptimalThresholding.py<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 OptimalThresholding: Create binary image by finding an optimal threshold ''' # Set module functions from ImageUtilities import imag...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/PolarHoughTransform.py
<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 PolarHoughTransform: Line detection by the Hough transform with polar parametrisation ''' # Set module functions from ImageUtilities import imageReadL, createImageF, showImageF, showImageL, c...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter9/ColorHistograms.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 9 ColorHistograms: Compute 2D colour histogram of an image ''' # Set module functions from ImageUtilities import imageReadRGB, showImageRGB, createImageF, createImageRGB from PlotUtilities import plot...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter8/SuperpixelsSLIC.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 8 SuperpixelsSLIC: Perform the simple linear interactive clustering ''' # Set module functions from ImageUtilities import imageReadL, createImageF, createImageRGB, imageReadRGB, \ ...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Modules/ConvolutionUtilities.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ ConvolutionUtilities: Helper module to apply convolutions. Functions to create kernels and perform convolutions ''' # Images from ImageUtilities import createImageF, createImageL from ImagePropertiesUtilities import im...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/FourierConvolution.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 FourierConvolution: Compute the matching of a template in an image by using Fourier convolutions ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageF, showImageF from Fou...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/LaplacianKernel.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 LaplacianKernel: Creates a Laplacian kernel of arbitrary size ''' # Set module functions from ImageUtilities import createImageF from PrintUtilities import printImageRangeF from ImagePropertiesUtilities impor...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter2/HartleyTransform.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 2 HartleyTransform: Compute the Hartley transform of an image ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageF, showImageF from ImageOperatorsUtilities import imageLogF...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter8/MaximallyStableExtremalRegions.py
<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 8 MaximallyStableRegions: Compute maximally stable regions in an image ''' # Set module functions from ImageUtilities import imageReadL, showImageL,createImageF, showImageF from PrintUt...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/HoughTransformCircles.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 HoughTransformCircles: Circle detection by the Hough transform ''' # Set module functions from ImageUtilities import imageReadL, createImageF, showImageF, showImageL, createScaleImageL from ImageOperatorsUtil...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Modules/ImageUtilities.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ ImageUtilities: Helper module to support image read, create, show and write Uses PIL and numpy to work with arrays containing image data ''' # Image load by using PIL from PIL import Image # Array to...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter8/WatershedDistanceTransform.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 8 WaterShedDistanceTransform: Compute Watershed transform by topographic distance ''' # Set module functions from ImageUtilities import imageReadL, showImageL,createImageF, showImageF from ImageProperti...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Modules/PlotUtilities.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ PlotUtilities: Helper module to show plots of image data Uses numpy and matplotlib to work with arrays and plots ''' # Math functions import math # Array to store data import numpy as np # Array to st...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/CannyEdgeDetector.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 CannyEdgeDetector: Detect edges by the Canny multi-stage algorithm ''' # Set module functions from ImageUtilities import imageRead...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter9/MeanShift.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 9 MeanShift: Tracks a region in an image by considering the colour histogram ''' # Set module functions from ImageUtilities import imageReadRGB, showImageRGB, createImageF, createImageRGB from PlotUti...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/TemplateConvolution.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 TemplateConvolution: Filter an image by convolution of a template ''' # Set module functions from ImageUtilities import imageReadL...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter2/FourierShiftedImage.py
<filename>ExamplesPython_3.6/Chapter2/FourierShiftedImage.py ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 2 FourierTransform: Compute the Fourier transform of a shifted image ''' # Set module functions from ImageUtilities import imageReadL, showImageL, cr...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/HTLinesDecomposition.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 HoughTransformEllipses: Line detection by the Hough transform decomposition ''' # Set module functions from ImageUtilities import imageReadL, showImageF, showImageL, createScaleImageL, createVectorF from Imag...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter8/WatershedEdgeTransform.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 8 WaterShedEdgeTransform: Compute Watershed transform by considering the edge image ''' # Set module function...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter5/TemplateMatching.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 5 TemplateMatching: Compute the matching of a template in an image ''' # Set module functions from ImageUtilities imp...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Modules/PrintUtilities.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ PrintUtilities: Helper module to print image data and messages on the standard device ''' # Print image range def printImageRangeRGB(image,...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter7/InvariantMoments.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<filename>ExamplesPython_3.6/Chapter7/InvariantMoments.py ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 7 InvariantMoments: Compute invariant moments of a shape in an image ''' ...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/FirstOrderEdgeDetector.py
<filename>ExamplesPython_3.6/Chapter4/FirstOrderEdgeDetector.py<gh_stars>10-100 ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 FirstOrderEdgeDetector: Compute gradient by first order derivative ''' # Set module functions from ImageUtilities import image...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Modules/ImageOperatorsUtilities.py
<reponame>Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples<filename>ExamplesPython_3.6/Modules/ImageOperatorsUtilities.py ''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ ImageOperatorsUtilities: Helper module to process an image ''' # Images from I...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter4/PrewittOperator.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 4 PrewittOperator: Compute gradient by using the Prewitt operator ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageF, showImageF from PrintUtilities import printImageRa...
Nixon-Aguado/Feature-Extraction-and-Image-Processing-Book-Examples
ExamplesPython_3.6/Chapter3/FourierConvolution.py
''' Feature Extraction and Image Processing <NAME> & <NAME> http://www.southampton.ac.uk/~msn/book/ Chapter 3 FourierConvolution: Filter an image by using the Fourier transform ''' # Set module functions from ImageUtilities import imageReadL, showImageL, createImageL, showImageF, createImageF from FourierUtilities i...
Haotianz94/stylegan2-ada
run_projector.py
<reponame>Haotianz94/stylegan2-ada<gh_stars>0 # Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, visit # https://nvlabs.github.io/stylegan2/license.html import sys from projector import * def main():...
sahiljajodia01/queueingApp-Web-Server
queues/models.py
from django.db.models import CharField, BooleanField, OneToOneField from django.db.models import ManyToManyField, IntegerField, DateTimeField from django.db.models import TimeField, FileField, Model, CASCADE, ForeignKey from django_mysql.models import ListCharField from django.contrib.auth.models import User # from que...
sahiljajodia01/queueingApp-Web-Server
queues/serializers.py
from rest_framework import serializers from .models import Location, Teacher, Student, Queue, Token from django.contrib.auth.models import User from .tokens import account_activation_token from django.core.mail import send_mail from queueing_app import settings from rest_framework.response import Response from django.c...
sahiljajodia01/queueingApp-Web-Server
queues/urls.py
<reponame>sahiljajodia01/queueingApp-Web-Server from django.conf.urls import url from rest_framework.urlpatterns import format_suffix_patterns from .views import LocationList, LocationDetails, TeacherList, TeacherDetail, UserList, UserDetail from .views import StudentList, QueueList, QueueAddItems, QueueDeleteItems, Qu...
sahiljajodia01/queueingApp-Web-Server
queues/views.py
<gh_stars>0 from rest_framework import generics from .serializers import LocationSerializer, UserSerializer, TeacherSerializer, StudentSerializer from .serializers import QueueSerializer, UserLoginSerializer, TeacherLoginSerializer, StudentLoginSerializer from .models import Location, Teacher, Student, Queue, Token fro...
sahiljajodia01/queueingApp-Web-Server
queues/migrations/0001_initial.py
<reponame>sahiljajodia01/queueingApp-Web-Server # -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2018-05-29 14:49 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_mysql.models class Migration(migrat...
sahiljajodia01/queueingApp-Web-Server
queues/admin.py
from django.contrib import admin from .models import Location, Student, Queue, Teacher, Token admin.site.register(Location) admin.site.register(Student) admin.site.register(Queue) admin.site.register(Teacher) admin.site.register(Token)
SimBoex/HW5
Utils_2_4.py
import pandas as pd import networkx as nx import pickle import random import matplotlib.pyplot as plt import numpy as np from heapq import heapify, heappush, heappop from utils_2_3 import new_graph,dijkstra,traceback,create_path #given a path and a graph it finds the edge with the smallest weight def find_min(l,dG)...
SimBoex/HW5
utils_2_3.py
import pandas as pd import networkx as nx import pickle import random import matplotlib.pyplot as plt import numpy as np from heapq import heapify, heappush, heappop def path(startingNode,endNode,index,H,startingTime,endTime,mapping): index.insert(0,startingNode) index.append(endNode) #it creates the ne...
vibhatha/cylon_applications
mpi/allgather_example.py
<filename>mpi/allgather_example.py<gh_stars>1-10 from mpi4py import MPI import numpy as np comm = MPI.COMM_WORLD size = comm.Get_size() rank = comm.Get_rank() data = [i * (rank + 1) for i in range(3)] all_data = comm.allgather(data) np_all_data = np.array(all_data).flatten() np_all_unique_data = np.unique(np_all_dat...
vibhatha/cylon_applications
bench/simple_dask_cluster_example.py
from dask_cluster import DaskCluster from dask.distributed import Client import time scheduler_host = "v-001" ips = ['v-001', 'v-002', 'v-003', 'v-004'] memory_limit = '15GB' network_interface = 'enp175s0f0' nprocs = 16 nthreads = 1 local_directory = '/scratch/vlabeyko/dask' scheduler_file = '/N/u2/v/vlabeyko/dask-sch...
vibhatha/cylon_applications
bench/dask_cluster.py
<reponame>vibhatha/cylon_applications<gh_stars>1-10 import os import dask import dask.dataframe as dd from dask.distributed import Client, SSHCluster import pandas as pd import time import argparse import math import subprocess import numpy as np class DaskCluster(object): def __init__(self, scheduler_host, ips...
vibhatha/cylon_applications
torch/pycylon_torch_example.py
""" Install: PyCylon (Follow: https://cylondata.org/docs/) Run Program: mpirun -n 4 python3 pycylon_torch_example.py --backend nccl --epochs 20 """ import argparse import os import socket import numpy as np import pandas as pd import torch import torch.distributed as dist import torch.nn as nn import torch.nn.function...
vibhatha/cylon_applications
uno/download_util.py
<reponame>vibhatha/cylon_applications ## # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
vibhatha/cylon_applications
bench/bench_util.py
<reponame>vibhatha/cylon_applications<filename>bench/bench_util.py import os import numpy as np import pandas as pd def add_record_to_stats_file(file_path: str, record: str): if os.path.exists(file_path): with open(file_path, "a+") as fp: fp.write(record + "\n") else: with open(fil...
vibhatha/cylon_applications
bench/modin_join.py
## # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
vibhatha/cylon_applications
bench/dask_distributed_unique.py
import os import dask import dask.dataframe as dd from dask.distributed import Client, SSHCluster from dask_cluster import DaskCluster import pandas as pd import time import argparse import math import subprocess import numpy as np """ >>> python dask_distributed_unique.py --start_size 100_000_000 \ ...
vibhatha/cylon_applications
horovod/pycylon_tensorflow_example.py
<reponame>vibhatha/cylon_applications """ Install: PyCylon (Follow: https://cylondata.org/docs/) Run Program: horovodrun -np 4 python3 pycylon_tensorflow_example.py --epochs 20 References: 1. https://github.com/horovod/horovod/blob/master/examples/tensorflow2/tensorflow2_mnist.py 2. https://horovod.readthedocs...
vibhatha/cylon_applications
uno/uno_drug_response_load_pandas.py
<reponame>vibhatha/cylon_applications import os import time import pandas as pd from sklearn.preprocessing import StandardScaler, MinMaxScaler def scale_dataframe(dataframe: pd.DataFrame, scaling_method: str, ): """new_df = dataframe_scaling(old_df, 'std') Scaling features in dataframe ac...
vibhatha/cylon_applications
uno/data_processing_pandas.py
import os import time import download_util from pycylon import CylonContext from pycylon import Table from pycylon.io import CSVReadOptions from pycylon.io import read_csv import numpy as np import pandas as pd ctx: CylonContext = CylonContext(config=None, distributed=False) def load_aggregated_single_response_panda...
vibhatha/cylon_applications
bench/dask_setup.py
import os import dask import dask.dataframe as dd from dask.distributed import Client, SSHCluster import time import argparse import math import subprocess """ >>> python dask_setup.py --start_size 100_000_000 \ --step_size 100_000_000 \ ...
vibhatha/cylon_applications
torch/mpi_torch_example.py
import os import sys import tempfile import torch import torch.distributed as dist import torch.nn as nn import torch.optim as optim import socket from torch.multiprocessing import Process import mpi4py.rc mpi4py.rc.initialize = False from mpi4py import MPI from torch.nn.parallel import DistributedDataParallel as DDP ...
vibhatha/cylon_applications
uno/data_processing_cylon.py
<filename>uno/data_processing_cylon.py import os import time import download_util from pycylon import CylonContext from pycylon import Table from pycylon.io import CSVReadOptions from pycylon.io import read_csv import numpy as np import pandas as pd ctx: CylonContext = CylonContext(config=None, distributed=False) de...
vibhatha/cylon_applications
bench/cudf_join.py
<reponame>vibhatha/cylon_applications import time import pandas as pd import numpy as np from bench_util import get_dataframe import pyarrow as pa import argparse import cupy as cp import pandas as pd import cudf import dask_cudf cp.random.seed(12) """ Run benchmark: >>> python cudf_join.py --start_size 1_000_000 \ ...
vibhatha/cylon_applications
horovod/pycylon_horovod_pytorch_example.py
""" Run Program: horovodrun -np 4 python3 pycylon_horovod_pytorch_example.py """ import argparse import os import socket import horovod.torch as hvd import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from pycylon import CylonEnv from p...
vibhatha/cylon_applications
bench/cylon_distributed_join.py
<filename>bench/cylon_distributed_join.py ## # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
vibhatha/cylon_applications
bench/generate_distributed_files.py
<reponame>vibhatha/cylon_applications<filename>bench/generate_distributed_files.py<gh_stars>1-10 import argparse import os import numpy as np from bench_util import get_dataframe from bench_util import line_separator """ python3 generate_distributed_files.py --start_size 1_000_000 \ ...
vibhatha/cylon_applications
bench/dask_ssh_cluster_setup.py
<gh_stars>1-10 import dask import dask.dataframe as dd from dask.distributed import Client, SSHCluster import time cluster = SSHCluster(["v-001", "v-002"], worker_options={"nthreads": 1, "nprocs": 16}) client = Client(cluster) time.sleep(100) client.close() cluster.shutdown()
vibhatha/cylon_applications
bench/dask_distributed_join.py
<filename>bench/dask_distributed_join.py import os import dask import dask.dataframe as dd from dask.distributed import Client, SSHCluster import pandas as pd import time import argparse import math import subprocess import numpy as np """ >>> python dask_setup.py --start_size 100_000_000 \ ...
vibhatha/cylon_applications
torch/pycylon_torch_setup.py
<filename>torch/pycylon_torch_setup.py import os from pycylon.net import MPIConfig from pycylon import CylonEnv import torch.distributed as dist import socket from pycylon.util.logging import log_level, disable_logging log_level(0) # set an arbitrary log level # disable_logging() # disable logging completely maste...
vibhatha/cylon_applications
bench/modin_distributed_join.py
import os import modin.pandas as pd import time import argparse import math import subprocess import numpy as np import json """ Ray Head: ray start --head --port 12345 Ray Worker: ray start --address='v-015:12345' --redis-password='<PASSWORD>' --num-cpus 32 """ """ >>> python modin_distributed_join.py --start_size ...
sonali-uttekar01/receipe-app-api
app/core/models.py
<filename>app/core/models.py<gh_stars>0 from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager,PermissionsMixin from django.db.models.fields import CharField class UserManager(BaseUserManager): def create_user(self,username,password=None,**extra_fields): if...
shawaj/Adafruit_Python_PlatformDetect
adafruit_platformdetect/constants/__init__.py
# SPDX-FileCopyrightText: 2021 <NAME> for Adafruit Industries # # SPDX-License-Identifier: MIT """Common constants used all over the module."""