Module: transform
¶
Down-sample N-dimensional image by local averaging. |
|
|
Estimate 2D geometric transformation parameters. |
Compute the 2-dimensional finite radon transform (FRT) for an n x n integer array. |
|
|
Perform a circular Hough transform. |
Return peaks in a circle Hough transform. |
|
|
Perform an elliptical Hough transform. |
|
Perform a straight line Hough transform. |
|
Return peaks in a straight line Hough transform. |
Compute the 2-dimensional inverse finite radon transform (iFRT) for an (n+1) x n integer array. |
|
Integral image / summed area table. |
|
|
Use an integral image to integrate over a given window. |
|
Inverse radon transform. |
|
Inverse radon transform. |
|
Adjust an image so that its cumulative histogram matches that of another. |
|
Apply 2D matrix transform. |
Order angles to reduce the amount of correlated information in subsequent projections. |
|
Return lines from a progressive probabilistic line Hough transform. |
|
|
Upsample and then smooth image. |
|
Yield images of the Gaussian pyramid formed by the input image. |
|
Yield images of the laplacian pyramid formed by the input image. |
|
Smooth and then downsample image. |
|
Calculates the radon transform of an image given specified projection angles. |
|
Scale image by a certain factor. |
|
Resize image to match a certain size. |
|
Rotate image by a certain angle around its center. |
|
Perform a swirl transformation. |
|
Warp an image according to a given coordinate transformation. |
|
Build the source coordinates for the output of a 2-D image warp. |
|
Remap image to polor or log-polar coordinates space. |
|
2D affine transformation. |
Essential matrix transformation. |
|
2D Euclidean transformation. |
|
Fundamental matrix transformation. |
|
2D piecewise affine transformation. |
|
|
2D polynomial transformation. |
|
Projective transformation. |
2D similarity transformation. |
downscale_local_mean¶
-
skimage.transform.
downscale_local_mean
(image, factors, cval=0, clip=True)[source]¶ Down-sample N-dimensional image by local averaging.
The image is padded with cval if it is not perfectly divisible by the integer factors.
In contrast to interpolation in
skimage.transform.resize
andskimage.transform.rescale
this function calculates the local mean of elements in each block of size factors in the input image.- Parameters
- imagendarray
N-dimensional input image.
- factorsarray_like
Array containing down-sampling integer factor along each axis.
- cvalfloat, optional
Constant padding value if image is not perfectly divisible by the integer factors.
- clipbool, optional
Unused, but kept here for API consistency with the other transforms in this module. (The local mean will never fall outside the range of values in the input image, assuming the provided cval also falls within that range.)
- Returns
- imagendarray
Down-sampled image with same number of dimensions as input image. For integer inputs, the output dtype will be
float64
. Seenumpy.mean()
for details.
Examples
>>> a = np.arange(15).reshape(3, 5) >>> a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) >>> downscale_local_mean(a, (2, 3)) array([[3.5, 4. ], [5.5, 4.5]])
Examples using skimage.transform.downscale_local_mean
¶
estimate_transform¶
-
skimage.transform.
estimate_transform
(ttype, src, dst, **kwargs)[source]¶ Estimate 2D geometric transformation parameters.
You can determine the over-, well- and under-determined parameters with the total least-squares method.
Number of source and destination coordinates must match.
- Parameters
- ttype{‘euclidean’, similarity’, ‘affine’, ‘piecewise-affine’, ‘projective’, ‘polynomial’}
Type of transform.
- kwargsarray or int
Function parameters (src, dst, n, angle):
NAME / TTYPE FUNCTION PARAMETERS 'euclidean' `src, `dst` 'similarity' `src, `dst` 'affine' `src, `dst` 'piecewise-affine' `src, `dst` 'projective' `src, `dst` 'polynomial' `src, `dst`, `order` (polynomial order, default order is 2)
Also see examples below.
- Returns
- tform
GeometricTransform
Transform object containing the transformation parameters and providing access to forward and inverse transformation functions.
- tform
Examples
>>> import numpy as np >>> from skimage import transform as tf
>>> # estimate transformation parameters >>> src = np.array([0, 0, 10, 10]).reshape((2, 2)) >>> dst = np.array([12, 14, 1, -20]).reshape((2, 2))
>>> tform = tf.estimate_transform('similarity', src, dst)
>>> np.allclose(tform.inverse(tform(src)), src) True
>>> # warp image using the estimated transformation >>> from skimage import data >>> image = data.camera()
>>> warp(image, inverse_map=tform.inverse) # doctest: +SKIP
>>> # create transformation with explicit parameters >>> tform2 = tf.SimilarityTransform(scale=1.1, rotation=1, ... translation=(10, 20))
>>> # unite transformations, applied in order from left to right >>> tform3 = tform + tform2 >>> np.allclose(tform3(src), tform2(tform(src))) True
frt2¶
-
skimage.transform.
frt2
(a)[source]¶ Compute the 2-dimensional finite radon transform (FRT) for an n x n integer array.
- Parameters
- aarray_like
A 2-D square n x n integer array.
- Returns
- FRT2-D ndarray
Finite Radon Transform array of (n+1) x n integer coefficients.
See also
ifrt2
The two-dimensional inverse FRT.
Notes
The FRT has a unique inverse if and only if n is prime. [FRT] The idea for this algorithm is due to Vlad Negnevitski.
References
- FRT
A. Kingston and I. Svalbe, “Projective transforms on periodic discrete image arrays,” in P. Hawkes (Ed), Advances in Imaging and Electron Physics, 139 (2006)
Examples
Generate a test image: Use a prime number for the array dimensions
>>> SIZE = 59 >>> img = np.tri(SIZE, dtype=np.int32)
Apply the Finite Radon Transform:
>>> f = frt2(img)
hough_circle¶
-
skimage.transform.
hough_circle
(image, radius, normalize=True, full_output=False)[source]¶ Perform a circular Hough transform.
- Parameters
- image(M, N) ndarray
Input image with nonzero values representing edges.
- radiusscalar or sequence of scalars
Radii at which to compute the Hough transform. Floats are converted to integers.
- normalizeboolean, optional (default True)
Normalize the accumulator with the number of pixels used to draw the radius.
- full_outputboolean, optional (default False)
Extend the output size by twice the largest radius in order to detect centers outside the input picture.
- Returns
- H3D ndarray (radius index, (M + 2R, N + 2R) ndarray)
Hough transform accumulator for each radius. R designates the larger radius if full_output is True. Otherwise, R = 0.
Examples
>>> from skimage.transform import hough_circle >>> from skimage.draw import circle_perimeter >>> img = np.zeros((100, 100), dtype=np.bool_) >>> rr, cc = circle_perimeter(25, 35, 23) >>> img[rr, cc] = 1 >>> try_radii = np.arange(5, 50) >>> res = hough_circle(img, try_radii) >>> ridx, r, c = np.unravel_index(np.argmax(res), res.shape) >>> r, c, try_radii[ridx] (25, 35, 23)
Examples using skimage.transform.hough_circle
¶
hough_circle_peaks¶
-
skimage.transform.
hough_circle_peaks
(hspaces, radii, min_xdistance=1, min_ydistance=1, threshold=None, num_peaks=inf, total_num_peaks=inf, normalize=False)[source]¶ Return peaks in a circle Hough transform.
Identifies most prominent circles separated by certain distances in a Hough space. Non-maximum suppression with different sizes is applied separately in the first and second dimension of the Hough space to identify peaks.
- Parameters
- hspaces(N, M) array
Hough spaces returned by the
hough_circle
function.- radii(M,) array
Radii corresponding to Hough spaces.
- min_xdistanceint, optional
Minimum distance separating centers in the x dimension.
- min_ydistanceint, optional
Minimum distance separating centers in the y dimension.
- thresholdfloat, optional
Minimum intensity of peaks in each Hough space. Default is 0.5 * max(hspace).
- num_peaksint, optional
Maximum number of peaks in each Hough space. When the number of peaks exceeds num_peaks, only num_peaks coordinates based on peak intensity are considered for the corresponding radius.
- total_num_peaksint, optional
Maximum number of peaks. When the number of peaks exceeds num_peaks, return num_peaks coordinates based on peak intensity.
- normalizebool, optional
If True, normalize the accumulator by the radius to sort the prominent peaks.
- Returns
- accum, cx, cy, radtuple of array
Peak values in Hough space, x and y center coordinates and radii.
Examples
>>> from skimage import transform, draw >>> img = np.zeros((120, 100), dtype=int) >>> radius, x_0, y_0 = (20, 99, 50) >>> y, x = draw.circle_perimeter(y_0, x_0, radius) >>> img[x, y] = 1 >>> hspaces = transform.hough_circle(img, radius) >>> accum, cx, cy, rad = hough_circle_peaks(hspaces, [radius,])
Examples using skimage.transform.hough_circle_peaks
¶
hough_ellipse¶
-
skimage.transform.
hough_ellipse
(image, threshold=4, accuracy=1, min_size=4, max_size=None)[source]¶ Perform an elliptical Hough transform.
- Parameters
- image(M, N) ndarray
Input image with nonzero values representing edges.
- threshold: int, optional
Accumulator threshold value.
- accuracydouble, optional
Bin size on the minor axis used in the accumulator.
- min_sizeint, optional
Minimal major axis length.
- max_sizeint, optional
Maximal minor axis length. If None, the value is set to the half of the smaller image dimension.
- Returns
- resultndarray with fields [(accumulator, yc, xc, a, b, orientation)].
Where
(yc, xc)
is the center,(a, b)
the major and minor axes, respectively. The orientation value followsskimage.draw.ellipse_perimeter
convention.
Notes
The accuracy must be chosen to produce a peak in the accumulator distribution. In other words, a flat accumulator distribution with low values may be caused by a too low bin size.
References
- 1
Xie, Yonghong, and Qiang Ji. “A new efficient ellipse detection method.” Pattern Recognition, 2002. Proceedings. 16th International Conference on. Vol. 2. IEEE, 2002
Examples
>>> from skimage.transform import hough_ellipse >>> from skimage.draw import ellipse_perimeter >>> img = np.zeros((25, 25), dtype=np.uint8) >>> rr, cc = ellipse_perimeter(10, 10, 6, 8) >>> img[cc, rr] = 1 >>> result = hough_ellipse(img, threshold=8) >>> result.tolist() [(10, 10.0, 10.0, 8.0, 6.0, 0.0)]
Examples using skimage.transform.hough_ellipse
¶
hough_line¶
-
skimage.transform.
hough_line
(image, theta=None)[source]¶ Perform a straight line Hough transform.
- Parameters
- image(M, N) ndarray
Input image with nonzero values representing edges.
- theta1D ndarray of double, optional
Angles at which to compute the transform, in radians. Defaults to a vector of 180 angles evenly spaced from -pi/2 to pi/2.
- Returns
- hspace2-D ndarray of uint64
Hough transform accumulator.
- anglesndarray
Angles at which the transform is computed, in radians.
- distancesndarray
Distance values.
Notes
The origin is the top left corner of the original image. X and Y axis are horizontal and vertical edges respectively. The distance is the minimal algebraic distance from the origin to the detected line. The angle accuracy can be improved by decreasing the step size in the theta array.
Examples
Generate a test image:
>>> img = np.zeros((100, 150), dtype=bool) >>> img[30, :] = 1 >>> img[:, 65] = 1 >>> img[35:45, 35:50] = 1 >>> for i in range(90): ... img[i, i] = 1 >>> img += np.random.random(img.shape) > 0.95
Apply the Hough transform:
>>> out, angles, d = hough_line(img)
import numpy as np import matplotlib.pyplot as plt from skimage.transform import hough_line from skimage.draw import line img = np.zeros((100, 150), dtype=bool) img[30, :] = 1 img[:, 65] = 1 img[35:45, 35:50] = 1 rr, cc = line(60, 130, 80, 10) img[rr, cc] = 1 img += np.random.random(img.shape) > 0.95 out, angles, d = hough_line(img) fix, axes = plt.subplots(1, 2, figsize=(7, 4)) axes[0].imshow(img, cmap=plt.cm.gray) axes[0].set_title('Input image') axes[1].imshow( out, cmap=plt.cm.bone, extent=(np.rad2deg(angles[-1]), np.rad2deg(angles[0]), d[-1], d[0])) axes[1].set_title('Hough transform') axes[1].set_xlabel('Angle (degree)') axes[1].set_ylabel('Distance (pixel)') plt.tight_layout() plt.show()
(Source code, png, pdf)
Examples using skimage.transform.hough_line
¶
hough_line_peaks¶
-
skimage.transform.
hough_line_peaks
(hspace, angles, dists, min_distance=9, min_angle=10, threshold=None, num_peaks=inf)[source]¶ Return peaks in a straight line Hough transform.
Identifies most prominent lines separated by a certain angle and distance in a Hough transform. Non-maximum suppression with different sizes is applied separately in the first (distances) and second (angles) dimension of the Hough space to identify peaks.
- Parameters
- hspace(N, M) array
Hough space returned by the
hough_line
function.- angles(M,) array
Angles returned by the
hough_line
function. Assumed to be continuous. (angles[-1] - angles[0] == PI).- dists(N, ) array
Distances returned by the
hough_line
function.- min_distanceint, optional
Minimum distance separating lines (maximum filter size for first dimension of hough space).
- min_angleint, optional
Minimum angle separating lines (maximum filter size for second dimension of hough space).
- thresholdfloat, optional
Minimum intensity of peaks. Default is 0.5 * max(hspace).
- num_peaksint, optional
Maximum number of peaks. When the number of peaks exceeds num_peaks, return num_peaks coordinates based on peak intensity.
- Returns
- accum, angles, diststuple of array
Peak values in Hough space, angles and distances.
Examples
>>> from skimage.transform import hough_line, hough_line_peaks >>> from skimage.draw import line >>> img = np.zeros((15, 15), dtype=np.bool_) >>> rr, cc = line(0, 0, 14, 14) >>> img[rr, cc] = 1 >>> rr, cc = line(0, 14, 14, 0) >>> img[cc, rr] = 1 >>> hspace, angles, dists = hough_line(img) >>> hspace, angles, dists = hough_line_peaks(hspace, angles, dists) >>> len(angles) 2
Examples using skimage.transform.hough_line_peaks
¶
ifrt2¶
-
skimage.transform.
ifrt2
(a)[source]¶ Compute the 2-dimensional inverse finite radon transform (iFRT) for an (n+1) x n integer array.
- Parameters
- aarray_like
A 2-D (n+1) row x n column integer array.
- Returns
- iFRT2-D n x n ndarray
Inverse Finite Radon Transform array of n x n integer coefficients.
See also
frt2
The two-dimensional FRT
Notes
The FRT has a unique inverse if and only if n is prime. See [1] for an overview. The idea for this algorithm is due to Vlad Negnevitski.
References
- 1
A. Kingston and I. Svalbe, “Projective transforms on periodic discrete image arrays,” in P. Hawkes (Ed), Advances in Imaging and Electron Physics, 139 (2006)
Examples
>>> SIZE = 59 >>> img = np.tri(SIZE, dtype=np.int32)
Apply the Finite Radon Transform:
>>> f = frt2(img)
Apply the Inverse Finite Radon Transform to recover the input
>>> fi = ifrt2(f)
Check that it’s identical to the original
>>> assert len(np.nonzero(img-fi)[0]) == 0
integral_image¶
-
skimage.transform.
integral_image
(image)[source]¶ Integral image / summed area table.
The integral image contains the sum of all elements above and to the left of it, i.e.:
\[S[m, n] = \sum_{i \leq m} \sum_{j \leq n} X[i, j]\]- Parameters
- imagendarray
Input image.
- Returns
- Sndarray
Integral image/summed area table of same shape as input image.
References
- 1
F.C. Crow, “Summed-area tables for texture mapping,” ACM SIGGRAPH Computer Graphics, vol. 18, 1984, pp. 207-212.
integrate¶
-
skimage.transform.
integrate
(ii, start, end)[source]¶ Use an integral image to integrate over a given window.
- Parameters
- iindarray
Integral image.
- startList of tuples, each tuple of length equal to dimension of ii
Coordinates of top left corner of window(s). Each tuple in the list contains the starting row, col, … index i.e [(row_win1, col_win1, …), (row_win2, col_win2,…), …].
- endList of tuples, each tuple of length equal to dimension of ii
Coordinates of bottom right corner of window(s). Each tuple in the list containing the end row, col, … index i.e [(row_win1, col_win1, …), (row_win2, col_win2, …), …].
- Returns
- Sscalar or ndarray
Integral (sum) over the given window(s).
Examples
>>> arr = np.ones((5, 6), dtype=np.float) >>> ii = integral_image(arr) >>> integrate(ii, (1, 0), (1, 2)) # sum from (1, 0) to (1, 2) array([3.]) >>> integrate(ii, [(3, 3)], [(4, 5)]) # sum from (3, 3) to (4, 5) array([6.]) >>> # sum from (1, 0) to (1, 2) and from (3, 3) to (4, 5) >>> integrate(ii, [(1, 0), (3, 3)], [(1, 2), (4, 5)]) array([3., 6.])
iradon¶
-
skimage.transform.
iradon
(radon_image, theta=None, output_size=None, filter='ramp', interpolation='linear', circle=True)[source]¶ Inverse radon transform.
Reconstruct an image from the radon transform, using the filtered back projection algorithm.
- Parameters
- radon_imagearray_like, dtype=float
Image containing radon transform (sinogram). Each column of the image corresponds to a projection along a different angle. The tomography rotation axis should lie at the pixel index
radon_image.shape[0] // 2
along the 0th dimension ofradon_image
.- thetaarray_like, dtype=float, optional
Reconstruction angles (in degrees). Default: m angles evenly spaced between 0 and 180 (if the shape of radon_image is (N, M)).
- output_sizeint, optional
Number of rows and columns in the reconstruction.
- filterstr, optional
Filter used in frequency domain filtering. Ramp filter used by default. Filters available: ramp, shepp-logan, cosine, hamming, hann. Assign None to use no filter.
- interpolationstr, optional
Interpolation method used in reconstruction. Methods available: ‘linear’, ‘nearest’, and ‘cubic’ (‘cubic’ is slow).
- circleboolean, optional
Assume the reconstructed image is zero outside the inscribed circle. Also changes the default output_size to match the behaviour of
radon
called withcircle=True
.
- Returns
- reconstructedndarray
Reconstructed image. The rotation axis will be located in the pixel with indices
(reconstructed.shape[0] // 2, reconstructed.shape[1] // 2)
.
Notes
It applies the Fourier slice theorem to reconstruct an image by multiplying the frequency domain of the filter with the FFT of the projection data. This algorithm is called filtered back projection.
References
- 1
AC Kak, M Slaney, “Principles of Computerized Tomographic Imaging”, IEEE Press 1988.
- 2
B.R. Ramesh, N. Srinivasa, K. Rajgopal, “An Algorithm for Computing the Discrete Radon Transform With Some Applications”, Proceedings of the Fourth IEEE Region 10 International Conference, TENCON ‘89, 1989
Examples using skimage.transform.iradon
¶
iradon_sart¶
-
skimage.transform.
iradon_sart
(radon_image, theta=None, image=None, projection_shifts=None, clip=None, relaxation=0.15)[source]¶ Inverse radon transform.
Reconstruct an image from the radon transform, using a single iteration of the Simultaneous Algebraic Reconstruction Technique (SART) algorithm.
- Parameters
- radon_image2D array, dtype=float
Image containing radon transform (sinogram). Each column of the image corresponds to a projection along a different angle. The tomography rotation axis should lie at the pixel index
radon_image.shape[0] // 2
along the 0th dimension ofradon_image
.- theta1D array, dtype=float, optional
Reconstruction angles (in degrees). Default: m angles evenly spaced between 0 and 180 (if the shape of radon_image is (N, M)).
- image2D array, dtype=float, optional
Image containing an initial reconstruction estimate. Shape of this array should be
(radon_image.shape[0], radon_image.shape[0])
. The default is an array of zeros.- projection_shifts1D array, dtype=float, optional
Shift the projections contained in
radon_image
(the sinogram) by this many pixels before reconstructing the image. The i’th value defines the shift of the i’th column ofradon_image
.- cliplength-2 sequence of floats, optional
Force all values in the reconstructed tomogram to lie in the range
[clip[0], clip[1]]
- relaxationfloat, optional
Relaxation parameter for the update step. A higher value can improve the convergence rate, but one runs the risk of instabilities. Values close to or higher than 1 are not recommended.
- Returns
- reconstructedndarray
Reconstructed image. The rotation axis will be located in the pixel with indices
(reconstructed.shape[0] // 2, reconstructed.shape[1] // 2)
.
Notes
Algebraic Reconstruction Techniques are based on formulating the tomography reconstruction problem as a set of linear equations. Along each ray, the projected value is the sum of all the values of the cross section along the ray. A typical feature of SART (and a few other variants of algebraic techniques) is that it samples the cross section at equidistant points along the ray, using linear interpolation between the pixel values of the cross section. The resulting set of linear equations are then solved using a slightly modified Kaczmarz method.
When using SART, a single iteration is usually sufficient to obtain a good reconstruction. Further iterations will tend to enhance high-frequency information, but will also often increase the noise.
References
- 1
AC Kak, M Slaney, “Principles of Computerized Tomographic Imaging”, IEEE Press 1988.
- 2
AH Andersen, AC Kak, “Simultaneous algebraic reconstruction technique (SART): a superior implementation of the ART algorithm”, Ultrasonic Imaging 6 pp 81–94 (1984)
- 3
S Kaczmarz, “Angenäherte auflösung von systemen linearer gleichungen”, Bulletin International de l’Academie Polonaise des Sciences et des Lettres 35 pp 355–357 (1937)
- 4
Kohler, T. “A projection access scheme for iterative reconstruction based on the golden section.” Nuclear Science Symposium Conference Record, 2004 IEEE. Vol. 6. IEEE, 2004.
- 5
Kaczmarz’ method, Wikipedia, https://en.wikipedia.org/wiki/Kaczmarz_method
Examples using skimage.transform.iradon_sart
¶
match_histograms¶
-
skimage.transform.
match_histograms
(image, reference, multichannel=False)[source]¶ Adjust an image so that its cumulative histogram matches that of another.
The adjustment is applied separately for each channel.
- Parameters
- imagendarray
Input image. Can be gray-scale or in color.
- referencendarray
Image to match histogram of. Must have the same number of channels as image.
- multichannelbool, optional
Apply the matching separately for each channel.
- Returns
- matchedndarray
Transformed input image.
- Raises
- ValueError
Thrown when the number of channels in the input image and the reference differ.
- Warns
- Deprecated:
New in version 0.16.
This function is deprecated and will be removed in scikit-image 0.18. Please use
match_histograms
fromexposure
module instead.
See also
References
matrix_transform¶
order_angles_golden_ratio¶
-
skimage.transform.
order_angles_golden_ratio
(theta)[source]¶ Order angles to reduce the amount of correlated information in subsequent projections.
- Parameters
- theta1D array of floats
Projection angles in degrees. Duplicate angles are not allowed.
- Returns
- indices_generatorgenerator yielding unsigned integers
The returned generator yields indices into
theta
such thattheta[indices]
gives the approximate golden ratio ordering of the projections. In total,len(theta)
indices are yielded. All non-negative integers <len(theta)
are yielded exactly once.
Notes
The method used here is that of the golden ratio introduced by T. Kohler.
References
- 1
Kohler, T. “A projection access scheme for iterative reconstruction based on the golden section.” Nuclear Science Symposium Conference Record, 2004 IEEE. Vol. 6. IEEE, 2004.
- 2
Winkelmann, Stefanie, et al. “An optimal radial profile order based on the Golden Ratio for time-resolved MRI.” Medical Imaging, IEEE Transactions on 26.1 (2007): 68-76.
probabilistic_hough_line¶
-
skimage.transform.
probabilistic_hough_line
(image, threshold=10, line_length=50, line_gap=10, theta=None, seed=None)[source]¶ Return lines from a progressive probabilistic line Hough transform.
- Parameters
- image(M, N) ndarray
Input image with nonzero values representing edges.
- thresholdint, optional
Threshold
- line_lengthint, optional
Minimum accepted length of detected lines. Increase the parameter to extract longer lines.
- line_gapint, optional
Maximum gap between pixels to still form a line. Increase the parameter to merge broken lines more aggressively.
- theta1D ndarray, dtype=double, optional
Angles at which to compute the transform, in radians. If None, use a range from -pi/2 to pi/2.
- seedint, optional
Seed to initialize the random number generator.
- Returns
- lineslist
List of lines identified, lines in format ((x0, y0), (x1, y1)), indicating line start and end.
References
- 1
C. Galamhos, J. Matas and J. Kittler, “Progressive probabilistic Hough transform for line detection”, in IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 1999.
Examples using skimage.transform.probabilistic_hough_line
¶
pyramid_expand¶
-
skimage.transform.
pyramid_expand
(image, upscale=2, sigma=None, order=1, mode='reflect', cval=0, multichannel=False)[source]¶ Upsample and then smooth image.
- Parameters
- imagendarray
Input image.
- upscalefloat, optional
Upscale factor.
- sigmafloat, optional
Sigma for Gaussian filter. Default is 2 * upscale / 6.0 which corresponds to a filter mask twice the size of the scale factor that covers more than 99% of the Gaussian distribution.
- orderint, optional
Order of splines used in interpolation of upsampling. See
skimage.transform.warp
for detail.- mode{‘reflect’, ‘constant’, ‘edge’, ‘symmetric’, ‘wrap’}, optional
The mode parameter determines how the array borders are handled, where cval is the value when mode is equal to ‘constant’.
- cvalfloat, optional
Value to fill past edges of input if mode is ‘constant’.
- multichannelbool, optional
Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension.
- Returns
- outarray
Upsampled and smoothed float image.
References
pyramid_gaussian¶
-
skimage.transform.
pyramid_gaussian
(image, max_layer=-1, downscale=2, sigma=None, order=1, mode='reflect', cval=0, multichannel=False)[source]¶ Yield images of the Gaussian pyramid formed by the input image.
Recursively applies the
pyramid_reduce
function to the image, and yields the downscaled images.Note that the first image of the pyramid will be the original, unscaled image. The total number of images is max_layer + 1. In case all layers are computed, the last image is either a one-pixel image or the image where the reduction does not change its shape.
- Parameters
- imagendarray
Input image.
- max_layerint, optional
Number of layers for the pyramid. 0th layer is the original image. Default is -1 which builds all possible layers.
- downscalefloat, optional
Downscale factor.
- sigmafloat, optional
Sigma for Gaussian filter. Default is 2 * downscale / 6.0 which corresponds to a filter mask twice the size of the scale factor that covers more than 99% of the Gaussian distribution.
- orderint, optional
Order of splines used in interpolation of downsampling. See
skimage.transform.warp
for detail.- mode{‘reflect’, ‘constant’, ‘edge’, ‘symmetric’, ‘wrap’}, optional
The mode parameter determines how the array borders are handled, where cval is the value when mode is equal to ‘constant’.
- cvalfloat, optional
Value to fill past edges of input if mode is ‘constant’.
- multichannelbool, optional
Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension.
- Returns
- pyramidgenerator
Generator yielding pyramid layers as float images.
References
Examples using skimage.transform.pyramid_gaussian
¶
pyramid_laplacian¶
-
skimage.transform.
pyramid_laplacian
(image, max_layer=-1, downscale=2, sigma=None, order=1, mode='reflect', cval=0, multichannel=False)[source]¶ Yield images of the laplacian pyramid formed by the input image.
Each layer contains the difference between the downsampled and the downsampled, smoothed image:
layer = resize(prev_layer) - smooth(resize(prev_layer))
Note that the first image of the pyramid will be the difference between the original, unscaled image and its smoothed version. The total number of images is max_layer + 1. In case all layers are computed, the last image is either a one-pixel image or the image where the reduction does not change its shape.
- Parameters
- imagendarray
Input image.
- max_layerint, optional
Number of layers for the pyramid. 0th layer is the original image. Default is -1 which builds all possible layers.
- downscalefloat, optional
Downscale factor.
- sigmafloat, optional
Sigma for Gaussian filter. Default is 2 * downscale / 6.0 which corresponds to a filter mask twice the size of the scale factor that covers more than 99% of the Gaussian distribution.
- orderint, optional
Order of splines used in interpolation of downsampling. See
skimage.transform.warp
for detail.- mode{‘reflect’, ‘constant’, ‘edge’, ‘symmetric’, ‘wrap’}, optional
The mode parameter determines how the array borders are handled, where cval is the value when mode is equal to ‘constant’.
- cvalfloat, optional
Value to fill past edges of input if mode is ‘constant’.
- multichannelbool, optional
Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension.
- Returns
- pyramidgenerator
Generator yielding pyramid layers as float images.
References
pyramid_reduce¶
-
skimage.transform.
pyramid_reduce
(image, downscale=2, sigma=None, order=1, mode='reflect', cval=0, multichannel=False)[source]¶ Smooth and then downsample image.
- Parameters
- imagendarray
Input image.
- downscalefloat, optional
Downscale factor.
- sigmafloat, optional
Sigma for Gaussian filter. Default is 2 * downscale / 6.0 which corresponds to a filter mask twice the size of the scale factor that covers more than 99% of the Gaussian distribution.
- orderint, optional
Order of splines used in interpolation of downsampling. See
skimage.transform.warp
for detail.- mode{‘reflect’, ‘constant’, ‘edge’, ‘symmetric’, ‘wrap’}, optional
The mode parameter determines how the array borders are handled, where cval is the value when mode is equal to ‘constant’.
- cvalfloat, optional
Value to fill past edges of input if mode is ‘constant’.
- multichannelbool, optional
Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension.
- Returns
- outarray
Smoothed and downsampled float image.
References
radon¶
-
skimage.transform.
radon
(image, theta=None, circle=True, *, preserve_range=None)[source]¶ Calculates the radon transform of an image given specified projection angles.
- Parameters
- imagearray_like
Input image. The rotation axis will be located in the pixel with indices
(image.shape[0] // 2, image.shape[1] // 2)
.- thetaarray_like, optional
Projection angles (in degrees). If None, the value is set to np.arange(180).
- circleboolean, optional
Assume image is zero outside the inscribed circle, making the width of each projection (the first dimension of the sinogram) equal to
min(image.shape)
.- preserve_rangebool, optional
Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html
- Returns
- radon_imagendarray
Radon transform (sinogram). The tomography rotation axis will lie at the pixel index
radon_image.shape[0] // 2
along the 0th dimension ofradon_image
.
Notes
Based on code of Justin K. Romberg (https://www.clear.rice.edu/elec431/projects96/DSP/bpanalysis.html)
References
- 1
AC Kak, M Slaney, “Principles of Computerized Tomographic Imaging”, IEEE Press 1988.
- 2
B.R. Ramesh, N. Srinivasa, K. Rajgopal, “An Algorithm for Computing the Discrete Radon Transform With Some Applications”, Proceedings of the Fourth IEEE Region 10 International Conference, TENCON ‘89, 1989
Examples using skimage.transform.radon
¶
rescale¶
-
skimage.transform.
rescale
(image, scale, order=1, mode='reflect', cval=0, clip=True, preserve_range=False, multichannel=False, anti_aliasing=True, anti_aliasing_sigma=None)[source]¶ Scale image by a certain factor.
Performs interpolation to up-scale or down-scale N-dimensional images. Note that anti-aliasing should be enabled when down-sizing images to avoid aliasing artifacts. For down-sampling with an integer factor also see
skimage.transform.downscale_local_mean
.- Parameters
- imagendarray
Input image.
- scale{float, tuple of floats}
Scale factors. Separate scale factors can be defined as (rows, cols[, …][, dim]).
- Returns
- scaledndarray
Scaled version of the input.
- Other Parameters
- orderint, optional
The order of the spline interpolation, default is 1. The order has to be in the range 0-5. See
skimage.transform.warp
for detail.- mode{‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘wrap’}, optional
Points outside the boundaries of the input are filled according to the given mode. Modes match the behaviour of
numpy.pad
.- cvalfloat, optional
Used in conjunction with mode ‘constant’, the value outside the image boundaries.
- clipbool, optional
Whether to clip the output to the range of values of the input image. This is enabled by default, since higher order interpolation may produce values outside the given input range.
- preserve_rangebool, optional
Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html
- multichannelbool, optional
Whether the last axis of the image is to be interpreted as multiple channels or another spatial dimension.
- anti_aliasingbool, optional
Whether to apply a Gaussian filter to smooth the image prior to down-scaling. It is crucial to filter when down-sampling the image to avoid aliasing artifacts.
- anti_aliasing_sigma{float, tuple of floats}, optional
Standard deviation for Gaussian filtering to avoid aliasing artifacts. By default, this value is chosen as (1 - s) / 2 where s is the down-scaling factor.
Notes
Modes ‘reflect’ and ‘symmetric’ are similar, but differ in whether the edge pixels are duplicated during the reflection. As an example, if an array has values [0, 1, 2] and was padded to the right by four values using symmetric, the result would be [0, 1, 2, 2, 1, 0, 0], while for reflect it would be [0, 1, 2, 1, 0, 1, 2].
Examples
>>> from skimage import data >>> from skimage.transform import rescale >>> image = data.camera() >>> rescale(image, 0.1).shape (51, 51) >>> rescale(image, 0.5).shape (256, 256)
resize¶
-
skimage.transform.
resize
(image, output_shape, order=1, mode='reflect', cval=0, clip=True, preserve_range=False, anti_aliasing=True, anti_aliasing_sigma=None)[source]¶ Resize image to match a certain size.
Performs interpolation to up-size or down-size N-dimensional images. Note that anti-aliasing should be enabled when down-sizing images to avoid aliasing artifacts. For down-sampling with an integer factor also see
skimage.transform.downscale_local_mean
.- Parameters
- imagendarray
Input image.
- output_shapetuple or ndarray
Size of the generated output image (rows, cols[, …][, dim]). If dim is not provided, the number of channels is preserved. In case the number of input channels does not equal the number of output channels a n-dimensional interpolation is applied.
- Returns
- resizedndarray
Resized version of the input.
- Other Parameters
- orderint, optional
The order of the spline interpolation, default is 1. The order has to be in the range 0-5. See
skimage.transform.warp
for detail.- mode{‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘wrap’}, optional
Points outside the boundaries of the input are filled according to the given mode. Modes match the behaviour of
numpy.pad
.- cvalfloat, optional
Used in conjunction with mode ‘constant’, the value outside the image boundaries.
- clipbool, optional
Whether to clip the output to the range of values of the input image. This is enabled by default, since higher order interpolation may produce values outside the given input range.
- preserve_rangebool, optional
Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html
- anti_aliasingbool, optional
Whether to apply a Gaussian filter to smooth the image prior to down-scaling. It is crucial to filter when down-sampling the image to avoid aliasing artifacts.
- anti_aliasing_sigma{float, tuple of floats}, optional
Standard deviation for Gaussian filtering to avoid aliasing artifacts. By default, this value is chosen as (s - 1) / 2 where s is the down-scaling factor, where s > 1. For the up-size case, s < 1, no anti-aliasing is performed prior to rescaling.
Notes
Modes ‘reflect’ and ‘symmetric’ are similar, but differ in whether the edge pixels are duplicated during the reflection. As an example, if an array has values [0, 1, 2] and was padded to the right by four values using symmetric, the result would be [0, 1, 2, 2, 1, 0, 0], while for reflect it would be [0, 1, 2, 1, 0, 1, 2].
Examples
>>> from skimage import data >>> from skimage.transform import resize >>> image = data.camera() >>> resize(image, (100, 100)).shape (100, 100)
rotate¶
-
skimage.transform.
rotate
(image, angle, resize=False, center=None, order=1, mode='constant', cval=0, clip=True, preserve_range=False)[source]¶ Rotate image by a certain angle around its center.
- Parameters
- imagendarray
Input image.
- anglefloat
Rotation angle in degrees in counter-clockwise direction.
- resizebool, optional
Determine whether the shape of the output image will be automatically calculated, so the complete rotated image exactly fits. Default is False.
- centeriterable of length 2
The rotation center. If
center=None
, the image is rotated around its center, i.e.center=(cols / 2 - 0.5, rows / 2 - 0.5)
. Please note that this parameter is (cols, rows), contrary to normal skimage ordering.
- Returns
- rotatedndarray
Rotated version of the input.
- Other Parameters
- orderint, optional
The order of the spline interpolation, default is 1. The order has to be in the range 0-5. See
skimage.transform.warp
for detail.- mode{‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘wrap’}, optional
Points outside the boundaries of the input are filled according to the given mode. Modes match the behaviour of
numpy.pad
.- cvalfloat, optional
Used in conjunction with mode ‘constant’, the value outside the image boundaries.
- clipbool, optional
Whether to clip the output to the range of values of the input image. This is enabled by default, since higher order interpolation may produce values outside the given input range.
- preserve_rangebool, optional
Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html
Notes
Modes ‘reflect’ and ‘symmetric’ are similar, but differ in whether the edge pixels are duplicated during the reflection. As an example, if an array has values [0, 1, 2] and was padded to the right by four values using symmetric, the result would be [0, 1, 2, 2, 1, 0, 0], while for reflect it would be [0, 1, 2, 1, 0, 1, 2].
Examples
>>> from skimage import data >>> from skimage.transform import rotate >>> image = data.camera() >>> rotate(image, 2).shape (512, 512) >>> rotate(image, 2, resize=True).shape (530, 530) >>> rotate(image, 90, resize=True).shape (512, 512)
swirl¶
-
skimage.transform.
swirl
(image, center=None, strength=1, radius=100, rotation=0, output_shape=None, order=1, mode='reflect', cval=0, clip=True, preserve_range=False)[source]¶ Perform a swirl transformation.
- Parameters
- imagendarray
Input image.
- center(column, row) tuple or (2,) ndarray, optional
Center coordinate of transformation.
- strengthfloat, optional
The amount of swirling applied.
- radiusfloat, optional
The extent of the swirl in pixels. The effect dies out rapidly beyond radius.
- rotationfloat, optional
Additional rotation applied to the image.
- Returns
- swirledndarray
Swirled version of the input.
- Other Parameters
- output_shapetuple (rows, cols), optional
Shape of the output image generated. By default the shape of the input image is preserved.
- orderint, optional
The order of the spline interpolation, default is 1. The order has to be in the range 0-5. See
skimage.transform.warp
for detail.- mode{‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘wrap’}, optional
Points outside the boundaries of the input are filled according to the given mode, with ‘constant’ used as the default. Modes match the behaviour of
numpy.pad
.- cvalfloat, optional
Used in conjunction with mode ‘constant’, the value outside the image boundaries.
- clipbool, optional
Whether to clip the output to the range of values of the input image. This is enabled by default, since higher order interpolation may produce values outside the given input range.
- preserve_rangebool, optional
Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html
Examples using skimage.transform.swirl
¶
warp¶
-
skimage.transform.
warp
(image, inverse_map, map_args={}, output_shape=None, order=1, mode='constant', cval=0.0, clip=True, preserve_range=False)[source]¶ Warp an image according to a given coordinate transformation.
- Parameters
- imagendarray
Input image.
- inverse_maptransformation object, callable
cr = f(cr, **kwargs)
, or ndarray Inverse coordinate map, which transforms coordinates in the output images into their corresponding coordinates in the input image.
There are a number of different options to define this map, depending on the dimensionality of the input image. A 2-D image can have 2 dimensions for gray-scale images, or 3 dimensions with color information.
For 2-D images, you can directly pass a transformation object, e.g.
skimage.transform.SimilarityTransform
, or its inverse.For 2-D images, you can pass a
(3, 3)
homogeneous transformation matrix, e.g. skimage.transform.SimilarityTransform.params.For 2-D images, a function that transforms a
(M, 2)
array of(col, row)
coordinates in the output image to their corresponding coordinates in the input image. Extra parameters to the function can be specified through map_args.For N-D images, you can directly pass an array of coordinates. The first dimension specifies the coordinates in the input image, while the subsequent dimensions determine the position in the output image. E.g. in case of 2-D images, you need to pass an array of shape
(2, rows, cols)
, where rows and cols determine the shape of the output image, and the first dimension contains the(row, col)
coordinate in the input image. Seescipy.ndimage.map_coordinates
for further documentation.
Note, that a
(3, 3)
matrix is interpreted as a homogeneous transformation matrix, so you cannot interpolate values from a 3-D input, if the output is of shape(3,)
.See example section for usage.
- map_argsdict, optional
Keyword arguments passed to inverse_map.
- output_shapetuple (rows, cols), optional
Shape of the output image generated. By default the shape of the input image is preserved. Note that, even for multi-band images, only rows and columns need to be specified.
- orderint, optional
- The order of interpolation. The order has to be in the range 0-5:
0: Nearest-neighbor
1: Bi-linear (default)
2: Bi-quadratic
3: Bi-cubic
4: Bi-quartic
5: Bi-quintic
- mode{‘constant’, ‘edge’, ‘symmetric’, ‘reflect’, ‘wrap’}, optional
Points outside the boundaries of the input are filled according to the given mode. Modes match the behaviour of
numpy.pad
.- cvalfloat, optional
Used in conjunction with mode ‘constant’, the value outside the image boundaries.
- clipbool, optional
Whether to clip the output to the range of values of the input image. This is enabled by default, since higher order interpolation may produce values outside the given input range.
- preserve_rangebool, optional
Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html
- Returns
- warpeddouble ndarray
The warped input image.
Notes
The input image is converted to a double image.
In case of a
SimilarityTransform
,AffineTransform
andProjectiveTransform
and order in [0, 3] this function uses the underlying transformation matrix to warp the image with a much faster routine.
Examples
>>> from skimage.transform import warp >>> from skimage import data >>> image = data.camera()
The following image warps are all equal but differ substantially in execution time. The image is shifted to the bottom.
Use a geometric transform to warp an image (fast):
>>> from skimage.transform import SimilarityTransform >>> tform = SimilarityTransform(translation=(0, -10)) >>> warped = warp(image, tform)
Use a callable (slow):
>>> def shift_down(xy): ... xy[:, 1] -= 10 ... return xy >>> warped = warp(image, shift_down)
Use a transformation matrix to warp an image (fast):
>>> matrix = np.array([[1, 0, 0], [0, 1, -10], [0, 0, 1]]) >>> warped = warp(image, matrix) >>> from skimage.transform import ProjectiveTransform >>> warped = warp(image, ProjectiveTransform(matrix=matrix))
You can also use the inverse of a geometric transformation (fast):
>>> warped = warp(image, tform.inverse)
For N-D images you can pass a coordinate array, that specifies the coordinates in the input image for every element in the output image. E.g. if you want to rescale a 3-D cube, you can do:
>>> cube_shape = np.array([30, 30, 30]) >>> cube = np.random.rand(*cube_shape)
Setup the coordinate array, that defines the scaling:
>>> scale = 0.1 >>> output_shape = (scale * cube_shape).astype(int) >>> coords0, coords1, coords2 = np.mgrid[:output_shape[0], ... :output_shape[1], :output_shape[2]] >>> coords = np.array([coords0, coords1, coords2])
Assume that the cube contains spatial data, where the first array element center is at coordinate (0.5, 0.5, 0.5) in real space, i.e. we have to account for this extra offset when scaling the image:
>>> coords = (coords + 0.5) / scale - 0.5 >>> warped = warp(cube, coords)
warp_coords¶
-
skimage.transform.
warp_coords
(coord_map, shape, dtype=<class 'numpy.float64'>)[source]¶ Build the source coordinates for the output of a 2-D image warp.
- Parameters
- coord_mapcallable like GeometricTransform.inverse
Return input coordinates for given output coordinates. Coordinates are in the shape (P, 2), where P is the number of coordinates and each element is a
(row, col)
pair.- shapetuple
Shape of output image
(rows, cols[, bands])
.- dtypenp.dtype or string
dtype for return value (sane choices: float32 or float64).
- Returns
- coords(ndim, rows, cols[, bands]) array of dtype dtype
Coordinates for
scipy.ndimage.map_coordinates
, that will yield an image of shape (orows, ocols, bands) by drawing from source points according to the coord_transform_fn.
Notes
This is a lower-level routine that produces the source coordinates for 2-D images used by warp().
It is provided separately from
warp
to give additional flexibility to users who would like, for example, to re-use a particular coordinate mapping, to use specific dtypes at various points along the the image-warping process, or to implement different post-processing logic thanwarp
performs after the call to ndi.map_coordinates.Examples
Produce a coordinate map that shifts an image up and to the right:
>>> from skimage import data >>> from scipy.ndimage import map_coordinates >>> >>> def shift_up10_left20(xy): ... return xy - np.array([-20, 10])[None, :] >>> >>> image = data.astronaut().astype(np.float32) >>> coords = warp_coords(shift_up10_left20, image.shape) >>> warped_image = map_coordinates(image, coords)
warp_polar¶
-
skimage.transform.
warp_polar
(image, center=None, *, radius=None, output_shape=None, scaling='linear', multichannel=False, **kwargs)[source]¶ Remap image to polor or log-polar coordinates space.
- Parameters
- imagendarray
Input image. Only 2-D arrays are accepted by default. If multichannel=True, 3-D arrays are accepted and the last axis is interpreted as multiple channels.
- centertuple (row, col), optional
Point in image that represents the center of the transformation (i.e., the origin in cartesian space). Values can be of type float. If no value is given, the center is assumed to be the center point of the image.
- radiusfloat, optional
Radius of the circle that bounds the area to be transformed.
- output_shapetuple (row, col), optional
- scaling{‘linear’, ‘log’}, optional
Specify whether the image warp is polar or log-polar. Defaults to ‘linear’.
- multichannelbool, optional
Whether the image is a 3-D array in which the third axis is to be interpreted as multiple channels. If set to False (default), only 2-D arrays are accepted.
- **kwargskeyword arguments
Passed to transform.warp.
- Returns
- warpedndarray
The polar or log-polar warped image.
Examples
Perform a basic polar warp on a grayscale image:
>>> from skimage import data >>> from skimage.transform import warp_polar >>> image = data.checkerboard() >>> warped = warp_polar(image)
Perform a log-polar warp on a grayscale image:
>>> warped = warp_polar(image, scaling='log')
Perform a log-polar warp on a grayscale image while specifying center, radius, and output shape:
>>> warped = warp_polar(image, (100,100), radius=100, ... output_shape=image.shape, scaling='log')
Perform a log-polar warp on a color image:
>>> image = data.astronaut() >>> warped = warp_polar(image, scaling='log', multichannel=True)
Examples using skimage.transform.warp_polar
¶
AffineTransform
¶
-
class
skimage.transform.
AffineTransform
(matrix=None, scale=None, rotation=None, shear=None, translation=None)[source]¶ Bases:
skimage.transform._geometric.ProjectiveTransform
2D affine transformation.
Has the following form:
X = a0*x + a1*y + a2 = = sx*x*cos(rotation) - sy*y*sin(rotation + shear) + a2 Y = b0*x + b1*y + b2 = = sx*x*sin(rotation) + sy*y*cos(rotation + shear) + b2
where
sx
andsy
are scale factors in the x and y directions, and the homogeneous transformation matrix is:[[a0 a1 a2] [b0 b1 b2] [0 0 1]]
- Parameters
- matrix(3, 3) array, optional
Homogeneous transformation matrix.
- scale(sx, sy) as array, list or tuple, optional
Scale factors.
- rotationfloat, optional
Rotation angle in counter-clockwise direction as radians.
- shearfloat, optional
Shear angle in counter-clockwise direction as radians.
- translation(tx, ty) as array, list or tuple, optional
Translation parameters.
- Attributes
- params(3, 3) array
Homogeneous transformation matrix.
-
__init__
(self, matrix=None, scale=None, rotation=None, shear=None, translation=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
property
rotation
¶
-
property
scale
¶
-
property
shear
¶
-
property
translation
¶
EssentialMatrixTransform
¶
-
class
skimage.transform.
EssentialMatrixTransform
(rotation=None, translation=None, matrix=None)[source]¶ Bases:
skimage.transform._geometric.FundamentalMatrixTransform
Essential matrix transformation.
The essential matrix relates corresponding points between a pair of calibrated images. The matrix transforms normalized, homogeneous image points in one image to epipolar lines in the other image.
The essential matrix is only defined for a pair of moving images capturing a non-planar scene. In the case of pure rotation or planar scenes, the homography describes the geometric relation between two images (
ProjectiveTransform
). If the intrinsic calibration of the images is unknown, the fundamental matrix describes the projective relation between the two images (FundamentalMatrixTransform
).- Parameters
- rotation(3, 3) array, optional
Rotation matrix of the relative camera motion.
- translation(3, 1) array, optional
Translation vector of the relative camera motion. The vector must have unit length.
- matrix(3, 3) array, optional
Essential matrix.
References
- R2fbde33858f1-1
Hartley, Richard, and Andrew Zisserman. Multiple view geometry in computer vision. Cambridge university press, 2003.
- Attributes
- params(3, 3) array
Essential matrix.
-
__init__
(self, rotation=None, translation=None, matrix=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
estimate
(self, src, dst)[source]¶ Estimate essential matrix using 8-point algorithm.
The 8-point algorithm requires at least 8 corresponding point pairs for a well-conditioned solution, otherwise the over-determined solution is estimated.
- Parameters
- src(N, 2) array
Source coordinates.
- dst(N, 2) array
Destination coordinates.
- Returns
- successbool
True, if model estimation succeeds.
EuclideanTransform
¶
-
class
skimage.transform.
EuclideanTransform
(matrix=None, rotation=None, translation=None)[source]¶ Bases:
skimage.transform._geometric.ProjectiveTransform
2D Euclidean transformation.
Has the following form:
X = a0 * x - b0 * y + a1 = = x * cos(rotation) - y * sin(rotation) + a1 Y = b0 * x + a0 * y + b1 = = x * sin(rotation) + y * cos(rotation) + b1
where the homogeneous transformation matrix is:
[[a0 b0 a1] [b0 a0 b1] [0 0 1]]
The Euclidean transformation is a rigid transformation with rotation and translation parameters. The similarity transformation extends the Euclidean transformation with a single scaling factor.
- Parameters
- matrix(3, 3) array, optional
Homogeneous transformation matrix.
- rotationfloat, optional
Rotation angle in counter-clockwise direction as radians.
- translation(tx, ty) as array, list or tuple, optional
x, y translation parameters.
- Attributes
- params(3, 3) array
Homogeneous transformation matrix.
-
__init__
(self, matrix=None, rotation=None, translation=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
estimate
(self, src, dst)[source]¶ Estimate the transformation from a set of corresponding points.
You can determine the over-, well- and under-determined parameters with the total least-squares method.
Number of source and destination coordinates must match.
- Parameters
- src(N, 2) array
Source coordinates.
- dst(N, 2) array
Destination coordinates.
- Returns
- successbool
True, if model estimation succeeds.
-
property
rotation
¶
-
property
translation
¶
FundamentalMatrixTransform
¶
-
class
skimage.transform.
FundamentalMatrixTransform
(matrix=None)[source]¶ Bases:
skimage.transform._geometric.GeometricTransform
Fundamental matrix transformation.
The fundamental matrix relates corresponding points between a pair of uncalibrated images. The matrix transforms homogeneous image points in one image to epipolar lines in the other image.
The fundamental matrix is only defined for a pair of moving images. In the case of pure rotation or planar scenes, the homography describes the geometric relation between two images (
ProjectiveTransform
). If the intrinsic calibration of the images is known, the essential matrix describes the metric relation between the two images (EssentialMatrixTransform
).- Parameters
- matrix(3, 3) array, optional
Fundamental matrix.
References
- R725e3a484348-1
Hartley, Richard, and Andrew Zisserman. Multiple view geometry in computer vision. Cambridge university press, 2003.
- Attributes
- params(3, 3) array
Fundamental matrix.
-
estimate
(self, src, dst)[source]¶ Estimate fundamental matrix using 8-point algorithm.
The 8-point algorithm requires at least 8 corresponding point pairs for a well-conditioned solution, otherwise the over-determined solution is estimated.
- Parameters
- src(N, 2) array
Source coordinates.
- dst(N, 2) array
Destination coordinates.
- Returns
- successbool
True, if model estimation succeeds.
PiecewiseAffineTransform
¶
-
class
skimage.transform.
PiecewiseAffineTransform
[source]¶ Bases:
skimage.transform._geometric.GeometricTransform
2D piecewise affine transformation.
Control points are used to define the mapping. The transform is based on a Delaunay triangulation of the points to form a mesh. Each triangle is used to find a local affine transform.
- Attributes
- affineslist of AffineTransform objects
Affine transformations for each triangle in the mesh.
- inverse_affineslist of AffineTransform objects
Inverse affine transformations for each triangle in the mesh.
PolynomialTransform
¶
-
class
skimage.transform.
PolynomialTransform
(params=None)[source]¶ Bases:
skimage.transform._geometric.GeometricTransform
2D polynomial transformation.
Has the following form:
X = sum[j=0:order]( sum[i=0:j]( a_ji * x**(j - i) * y**i )) Y = sum[j=0:order]( sum[i=0:j]( b_ji * x**(j - i) * y**i ))
- Parameters
- params(2, N) array, optional
Polynomial coefficients where N * 2 = (order + 1) * (order + 2). So, a_ji is defined in params[0, :] and b_ji in params[1, :].
- Attributes
- params(2, N) array
Polynomial coefficients where N * 2 = (order + 1) * (order + 2). So, a_ji is defined in params[0, :] and b_ji in params[1, :].
-
estimate
(self, src, dst, order=2)[source]¶ Estimate the transformation from a set of corresponding points.
You can determine the over-, well- and under-determined parameters with the total least-squares method.
Number of source and destination coordinates must match.
The transformation is defined as:
X = sum[j=0:order]( sum[i=0:j]( a_ji * x**(j - i) * y**i )) Y = sum[j=0:order]( sum[i=0:j]( b_ji * x**(j - i) * y**i ))
These equations can be transformed to the following form:
0 = sum[j=0:order]( sum[i=0:j]( a_ji * x**(j - i) * y**i )) - X 0 = sum[j=0:order]( sum[i=0:j]( b_ji * x**(j - i) * y**i )) - Y
which exist for each set of corresponding points, so we have a set of N * 2 equations. The coefficients appear linearly so we can write A x = 0, where:
A = [[1 x y x**2 x*y y**2 ... 0 ... 0 -X] [0 ... 0 1 x y x**2 x*y y**2 -Y] ... ... ] x.T = [a00 a10 a11 a20 a21 a22 ... ann b00 b10 b11 b20 b21 b22 ... bnn c3]
In case of total least-squares the solution of this homogeneous system of equations is the right singular vector of A which corresponds to the smallest singular value normed by the coefficient c3.
- Parameters
- src(N, 2) array
Source coordinates.
- dst(N, 2) array
Destination coordinates.
- orderint, optional
Polynomial order (number of coefficients is order + 1).
- Returns
- successbool
True, if model estimation succeeds.
ProjectiveTransform
¶
-
class
skimage.transform.
ProjectiveTransform
(matrix=None)[source]¶ Bases:
skimage.transform._geometric.GeometricTransform
Projective transformation.
Apply a projective transformation (homography) on coordinates.
For each homogeneous coordinate \(\mathbf{x} = [x, y, 1]^T\), its target position is calculated by multiplying with the given matrix, \(H\), to give \(H \mathbf{x}\):
[[a0 a1 a2] [b0 b1 b2] [c0 c1 1 ]].
E.g., to rotate by theta degrees clockwise, the matrix should be:
[[cos(theta) -sin(theta) 0] [sin(theta) cos(theta) 0] [0 0 1]]
or, to translate x by 10 and y by 20:
[[1 0 10] [0 1 20] [0 0 1 ]].
- Parameters
- matrix(3, 3) array, optional
Homogeneous transformation matrix.
- Attributes
- params(3, 3) array
Homogeneous transformation matrix.
-
estimate
(self, src, dst)[source]¶ Estimate the transformation from a set of corresponding points.
You can determine the over-, well- and under-determined parameters with the total least-squares method.
Number of source and destination coordinates must match.
The transformation is defined as:
X = (a0*x + a1*y + a2) / (c0*x + c1*y + 1) Y = (b0*x + b1*y + b2) / (c0*x + c1*y + 1)
These equations can be transformed to the following form:
0 = a0*x + a1*y + a2 - c0*x*X - c1*y*X - X 0 = b0*x + b1*y + b2 - c0*x*Y - c1*y*Y - Y
which exist for each set of corresponding points, so we have a set of N * 2 equations. The coefficients appear linearly so we can write A x = 0, where:
A = [[x y 1 0 0 0 -x*X -y*X -X] [0 0 0 x y 1 -x*Y -y*Y -Y] ... ... ] x.T = [a0 a1 a2 b0 b1 b2 c0 c1 c3]
In case of total least-squares the solution of this homogeneous system of equations is the right singular vector of A which corresponds to the smallest singular value normed by the coefficient c3.
In case of the affine transformation the coefficients c0 and c1 are 0. Thus the system of equations is:
A = [[x y 1 0 0 0 -X] [0 0 0 x y 1 -Y] ... ... ] x.T = [a0 a1 a2 b0 b1 b2 c3]
- Parameters
- src(N, 2) array
Source coordinates.
- dst(N, 2) array
Destination coordinates.
- Returns
- successbool
True, if model estimation succeeds.
SimilarityTransform
¶
-
class
skimage.transform.
SimilarityTransform
(matrix=None, scale=None, rotation=None, translation=None)[source]¶ Bases:
skimage.transform._geometric.EuclideanTransform
2D similarity transformation.
Has the following form:
X = a0 * x - b0 * y + a1 = = s * x * cos(rotation) - s * y * sin(rotation) + a1 Y = b0 * x + a0 * y + b1 = = s * x * sin(rotation) + s * y * cos(rotation) + b1
where
s
is a scale factor and the homogeneous transformation matrix is:[[a0 b0 a1] [b0 a0 b1] [0 0 1]]
The similarity transformation extends the Euclidean transformation with a single scaling factor in addition to the rotation and translation parameters.
- Parameters
- matrix(3, 3) array, optional
Homogeneous transformation matrix.
- scalefloat, optional
Scale factor.
- rotationfloat, optional
Rotation angle in counter-clockwise direction as radians.
- translation(tx, ty) as array, list or tuple, optional
x, y translation parameters.
- Attributes
- params(3, 3) array
Homogeneous transformation matrix.
-
__init__
(self, matrix=None, scale=None, rotation=None, translation=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
estimate
(self, src, dst)[source]¶ Estimate the transformation from a set of corresponding points.
You can determine the over-, well- and under-determined parameters with the total least-squares method.
Number of source and destination coordinates must match.
- Parameters
- src(N, 2) array
Source coordinates.
- dst(N, 2) array
Destination coordinates.
- Returns
- successbool
True, if model estimation succeeds.
-
property
scale
¶


--- notes: | - Banners indicate that a site is part of an Alpha or Beta phase of a project. They can also solicit feedback. ---
ALPHA This is a new service – your feedback will help us to improve it.


?sai
?
?
mmm
0
1
CO
CM
5
6
7
8
9
10
The
New
York
mmmmm-
cm
copyright
reserved
botanical
Garden
v
...
;
''*¥
.
;
¥*
*
>
NO.
iSH'l
(ju3a.O
È
DET.
BY
MILDRED
E.
MATHIAS
NEW
YORK
BOTANICAL
GARDEN
0
501
180
fiofck
J^UZ
/ÀL<^
THE
NEW
YORK
BOTANICAL
GARDEN
EXPLORATION
OF
THE
BAHAMAS
/f
w
Great
Bahama
Examined
for
HO.
......
0Ls\
f´-\
^NORTH
AMEhiCAN
FLORA
N.
L.
BRITTON
I
C.
F.
MlLLSPAUGH
I
rCollectors
Feb.
5-13,
1905
01501180
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


AMAZING PEOPLE ARE MAKING DESIGNS IN A FUN ENVIRONMENT
When you work with us, you are part of a team of commited collaborators. All aspects of our softwar development process are integrated, interactive, and agile.
Our approach unifies design, developement, and product management to create exceptional projects.
We start each project by understanding your business goals, the user's needs and the product requirements.
The we help translate them into efficient and elegant solutions.
Before we sign a contract or write a line of code our team will spend the necessary time needed to understand your product vision.
The outcome of this scoping session is proposal or high-level statement of work, based on your requirements, we can provide a complete offering or just the pieces you need.
DESIGN
Our design practice offers a full range of services including brand strategy, interaction and visual design and user experience testing. Throughout your project, our designers create and implement visual design and workflows, solicit user feedback and work with you to make sure what gets built is what is needed.
DEVELOPEMENT
All engineers are fluent in the latest enterprise, mobile and web development technologies. They collaborate with your team to write, and improve code on a daily basis, using proven practices such as test-driven development and pair programming.
PRODUCT MANAGEMENT
Planning and development is iterative. Because we are constantly coding and testing, the products we build are always ready to go live. This iterative process allows for changes as business requirements evolve.
Your message has been sent.
DELANI STUDIO
2019


---
title: 'Presentation: Mobile is eating the world — Benedict Evans'
date: '2015-07-02T19:00:23+05:30'
tags:
- business
tumblr_url: https://sureshshanmugam.com/post/123029548484/presentation-mobile-is-eating-the-world
---
Presentation: Mobile is eating the world — Benedict Evans
Mobile is disrupting many industries & it will scale even faster from here.
Follow my blog for more - Analytics & Marketing


The Trash Day Alexa skill (hereafter, "application") is free software. It is provided as a free service to all users. The author has made a conscious effort to be responsible with your information security and to provide software that operates correctly. However, no warranty of any kind is provided with the application, nor will the author be held liable for any damages resulting from use of this software.
Use of this software your consent to the terms in this document as well as your consent to the collection, use, transfer, and storage of the any user information given to the application. Refer to the accompanying Privacy Policy for details on the information gathered by the application and its usage.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Welcome To Magic World!
kg to lb
lb to kg
Input Series of Number:
Max :
Min :
Sum :
Average :
Reverse Order :
Whoa ! this is private Area, no tresspassing :D !
Clear It!
Capitilize
Sort
Reverse
Strinp Blank
ADD Numbers
Shuffle


Utilizing Weather API, Gracenote Developer API, and Firebase User Authorization to create a calendar app for users to balance structure and leisure.
Developed a train schedule form for users to post train times and arrivals via Firebase.
Utilizing an MVC framework to develop an application that allows new coders to network with one another. Application makes use of node, express, javascript, jquery, express-handlebars and sequelize.
LIRI is a Language Interpretation and Recognition Interface. LIRI is a command line node app that takes in parameters and gives you back data.
Bamazon is an Amazon-like storefront using MySQL, Javascript, and Node. The app will take in orders from customers and deplete stock from the store's inventory.
Using Node and Express to build a full stack site that takes in results from users' surveys, then compare their answers with those from other users.
Experienced Business Analyst with an immense passion for software development. My studies have compiled on understanding the fundamentals of software engineering. This includes programming skills (HTML, CSS, Javascript, Jquery, Node, Firebase), relational databases, user interface, user experience design, and project planning/management skills to ensure my success. Using this knowledge, I’m ready to apply my skills towards a growing company in order to advance business goals.


Go back to index
This is the form.
This is the protected content
Launch it
Launch formular
Launch waiting


Main Page
Namespaces
Classes
Files
File List
File List
Here is a list of all files with brief descriptions:
color.h
[code]
contour.h
[code]
curve.h
[code]
flow.h
[code]
function.h
[code]
grapher.h
[code]
p_curve.h
[code]
point.h
[code]
primitive.h
[code]
scalar_field.h
[code]
screen.h
[code]
shader_primitive.h
[code]
stopwatch.h
[code]
vector.h
[code]
Generated on Fri Nov 20 18:09:06 2009 for OpenGLot by
1.5.8


#include <time.h>
#include <stdlib.h>
Go to the source code of this file.
◆ _DAYS_IN_MONTH
| #define _DAYS_IN_MONTH |
( |
|
x | ) |
((x == 1) ? days_in_feb : DAYS_IN_MONTH[x]) |
◆ _DAYS_IN_YEAR
| #define _DAYS_IN_YEAR |
( |
|
year | ) |
(_ISLEAP(year) ? 366 : 365) |
◆ _ISLEAP
| #define _ISLEAP |
( |
|
y | ) |
(((y) % 4) == 0 && (((y) % 100) != 0 || (((y)+1900) % 400) == 0)) |
◆ _SEC_IN_DAY
| #define _SEC_IN_DAY 86400L |
◆ _SEC_IN_HOUR
| #define _SEC_IN_HOUR 3600L |
◆ _SEC_IN_MINUTE
| #define _SEC_IN_MINUTE 60L |
As there is no timegm()
function neither in newlib nor in POSIX, we add one here (based on a simplified newlib mktime()
).
It is used in Chan FatFS to convert dates fields.
Definition at line 30 of file timegm.c.
◆ timegm()
| time_t timegm |
( |
struct tm * |
tim_p | ) |
|
◆ validate_structure()
| static void validate_structure |
( |
struct tm * |
tim_p | ) |
|
|
static |
◆ _DAYS_BEFORE_MONTH
| const int _DAYS_BEFORE_MONTH[12] |
|
static |
Initial value:=
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }
Definition at line 43 of file timegm.c.
◆ DAYS_IN_MONTH
| const int DAYS_IN_MONTH[12] |
|
static |
Initial value:=
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
Definition at line 34 of file timegm.c.


Log In
Geek is Portuguese for "pencil neck."
Invalid username and password.
You have been logged out.
Email
Password
Remember me
Log In


All you need to know about the Euro 2020 finals draw
The lowdown on how the process for next summer’s tournament will work.
England and Wales will discover their Euro 2020 group stage opponents on Saturday when the finals draw is made.
Here, the PA news agency provides the lowdown on what to expect.
When and where is the draw?
The draw takes place at 5pm UK time on Saturday evening. It is being staged at the ROMEXPO exhibition centre in Bucharest. The Romanian capital is one of 12 cities hosting matches in next summer’s pan-European event.
Is the draw being televised?
It will be screened live on BBC Two at 5pm. The programme is scheduled to run until 6.30pm.
What is the format?
The tournament, like Euro 2016, will feature 24 teams. Twenty have already secured their places, the final four will be determined by play-off matches in March next year. There will be six groups, each containing four teams.
The top two teams from each group qualify for the round of 16, with the four best third-placed teams joining them.
Who can England get?
What about Wales?
What would a ‘Group of Death’ look like for England?
And what will Wales hope to avoid?
What is a best-case scenario for both sides?
England might quite like Poland from pot two and the Czech Republic from pot three – although the Czechs beat them in qualification. Israel are the lowest-ranked of the sides in play-off Path C.
And for Wales?
Probably to face Italy, Poland and the Czechs in Group A.


Package net.dermetfan.gdx.maps.tiled
Class TileAnimator
java.lang.Object
net.dermetfan.gdx.maps.tiled.TileAnimator
public abstract class TileAnimator
extends java.lang.Object
Animates the tiles in a
To define an animation in the map editor, put an animation property in its properties. The value should be the name of the animation, so the TileAnimator will know which tiles are frames of the same animation.
You can put a property with the desired interval for each animation in the properties of the frame that defines the position of the animation on the map. Note that you cannot define a different for each frame since this is not supported by the
If an animation should have their frames in a specific order, you can set an ordered property with the index as value to the frames.
Example
There are the following frames with their properties:
tile map layer
by replacing them with animated tiles
.To define an animation in the map editor, put an animation property in its properties. The value should be the name of the animation, so the TileAnimator will know which tiles are frames of the same animation.
You can put a property with the desired interval for each animation in the properties of the frame that defines the position of the animation on the map. Note that you cannot define a different for each frame since this is not supported by the
animated tiles
.If an animation should have their frames in a specific order, you can set an ordered property with the index as value to the frames.
Example
There are the following frames with their properties:
-
one that's actually placed on the map to define the position and properties of its animation
"animation": "waterfall"
"interval": "0.33"
"ordered": "1" -
the second frame (not placed on the map)
"animation": "waterfall"
"ordered": "2" -
the third frame (not placed on the map)
"animation": "waterfall"
"ordered": "3"
-
Constructor Summary
Constructors Constructor Description TileAnimator()
-
Method Summary
Modifier and Type Method Description static void
animateLayer(com.badlogic.gdx.maps.tiled.TiledMapTile[] tiles, com.badlogic.gdx.maps.tiled.TiledMapTileLayer layer, java.lang.String animationKey, java.lang.String orderedKey, java.lang.String intervalKey, float defaultInterval)
animates the tiles that have the animationKey in the target layerstatic void
animateLayer(com.badlogic.gdx.maps.tiled.TiledMapTileSet tiles, com.badlogic.gdx.maps.tiled.TiledMapTileLayer target, java.lang.String animationKey, java.lang.String orderedKey, java.lang.String intervalKey, float defaultInterval)
static void
animateLayer(com.badlogic.gdx.utils.ObjectMap<java.lang.String,com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile>> animations, com.badlogic.gdx.maps.tiled.TiledMapTileLayer layer, java.lang.String animationKey, java.lang.String intervalKey, float defaultInterval)
animates thetarget layer
using the given animationsstatic com.badlogic.gdx.utils.ObjectMap<java.lang.String,com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile>>
filterFrames(com.badlogic.gdx.maps.tiled.TiledMapTile[] tiles, java.lang.String animationKey)
filters the tiles that are framesstatic void
sortFrames(com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile> frames, java.lang.String orderedKey)
sorts the frames by their orderedKey valuestatic com.badlogic.gdx.utils.ObjectMap<java.lang.String,com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile>>
sortFrames(com.badlogic.gdx.utils.ObjectMap<java.lang.String,com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile>> animations, java.lang.String orderedKey)
sorts the frames of the animation by their orderedKey value if it existsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
TileAnimator
public TileAnimator()
-
-
Method Details
-
animateLayer
public static void animateLayer(com.badlogic.gdx.maps.tiled.TiledMapTile[] tiles, com.badlogic.gdx.maps.tiled.TiledMapTileLayer layer, java.lang.String animationKey, java.lang.String orderedKey, java.lang.String intervalKey, float defaultInterval)animates the tiles that have the animationKey in the target layer- Parameters:
tiles
- the tiles to createanimated tiles
fromlayer
- the targetlayer
animationKey
- the key used to tell if a tile is a frameintervalKey
- the key used to get the animation interval (duration each frame is displayed)orderedKey
- The key used to get the frame number of a frame tile in its animation. If no value is found, the frames won't be ordered.
-
animateLayer
public static void animateLayer(com.badlogic.gdx.maps.tiled.TiledMapTileSet tiles, com.badlogic.gdx.maps.tiled.TiledMapTileLayer target, java.lang.String animationKey, java.lang.String orderedKey, java.lang.String intervalKey, float defaultInterval) -
animateLayer
public static void animateLayer(com.badlogic.gdx.utils.ObjectMap<java.lang.String,com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile>> animations, com.badlogic.gdx.maps.tiled.TiledMapTileLayer layer, java.lang.String animationKey, java.lang.String intervalKey, float defaultInterval)animates thetarget layer
using the given animations- Parameters:
animations
- the animations to uselayer
- theTiledMapTileLayer
which tiles to animateanimationKey
- the key used to tell if a tile is a frameintervalKey
- the key used to get the animation interval (duration each frame is displayed)defaultInterval
- the interval used if no value is found for the intervalKey
-
filterFrames
public static com.badlogic.gdx.utils.ObjectMap<java.lang.String,com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile>> filterFrames(com.badlogic.gdx.maps.tiled.TiledMapTile[] tiles, java.lang.String animationKey)filters the tiles that are frames- Parameters:
tiles
- all tilesanimationKey
- the key used to tell if a tile is a frame- Returns:
- an
ObjectMap
which values are tiles that are frames and which keys are their animation names
-
sortFrames
public static com.badlogic.gdx.utils.ObjectMap<java.lang.String,com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile>> sortFrames(com.badlogic.gdx.utils.ObjectMap<java.lang.String,com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile>> animations, java.lang.String orderedKey)sorts the frames of the animation by their orderedKey value if it exists- Parameters:
animations
- the animations to sortorderedKey
- the key of the frame property- Returns:
- the animations with sorted frames
- See Also:
sortFrames(Array, String)
-
sortFrames
public static void sortFrames(com.badlogic.gdx.utils.Array<com.badlogic.gdx.maps.tiled.tiles.StaticTiledMapTile> frames, java.lang.String orderedKey)sorts the frames by their orderedKey value- Parameters:
frames
- the frames to sortorderedKey
- the key of the ordered/frame property
-


GEOPORTAL_WEBLINK_ADDER_NG
Documentation du Custom Transformer FME
Description
This custom transformer is doing 2 tasks. Firstly, it creates and validates that the web link is well formed, online and responding; Secondly it is adding a new ressources{} attribute list containing the web link and the other information contained in the CSV file. Unvalid web links are log in the FME logger.
Note: The web link to test is build from the default key url contained in the CSV and the attribute value from the WEBLINK_WILDCARD parameter.
Input Ports
- DATA_INPUT: The input metadata records to process.
Output Ports
- OUTPUT: The process output metdata records with the added web link resource.
Parameters
-
WEBLINK_WILDCARD: Name of the attribute containing the information to add to the web link in order to retreive the metadata record from the P-T portal
-
URL_VALIDATION: Flag use to validate if the web link is well formed, online and responding. Can take 2 values: YES: validate the web link; NO: Do not validate th web link. Note: During testing, it is interesting to use NO as the validation is very slow;
-
FEATURE_TYPE: Name of the CSV file to read (without .csv extension);
-
IN_CSV_LOOKUP_TABLES_DIR: Name of the directory path containing the CSV file to read;
-
P-T_ABBR: Two letters abbreviation of the province or the territory.
Documentation du code GEOPORTAL_WEBLINK_ADDER_NG.py
This class implement the design pattern: Processing Composite Data |
- class GEOPORTAL_WEBLINK_ADDER_NG.FeatureProcessor[source]
Bases:
object
This class implement the design pattern: Processing Composite Data
- _add_resources(feature, test_url)[source]
Add the key value pair of the CSV into an extra resources{} list.
Key-Value pair are added as is except if the key is URL than the web link is added as the value of the URL
- Parameters
feature (FmeFeature) – Feature object to process
test_url (String) – The URL address to add
- Return type
None
- close()[source]
Map the requested attribute.
The following tasks are performed:
Extract the url to test (attribute test_url)
Extract the flag for the URL validation
Build the http to validate
Add an extra resource at the end of the ressources{} list with the values from the CSV file and change the value of the URL with the url used to test the link


Pie & Doughnut Charts
Estimated reading time: 5 minutes###Introduction Pie and doughnut charts are probably the most commonly used chart there are. They are divided into segments, the arc of each segment shows the proportional value of each piece of data.
They are excellent at showing the relational proportions between data.
Pie and doughnut charts are effectively the same class in Chart.js, but have one different default value - their percentageInnerCutout
. This equates what percentage of the inner should be cut out. This defaults to 0
for pie charts, and 50
for doughnuts.
They are also registered under two aliases in the Chart
core. Other than their different default value, and different alias, they are exactly the same.
Example usage
// For a pie chart
var myPieChart = new Chart(ctx[0]).Pie(data,options);
// And for a doughnut chart
var myDoughnutChart = new Chart(ctx[1]).Doughnut(data,options);
Data structure
var data = [
{
value: 300,
color:"#F7464A",
highlight: "#FF5A5E",
label: "Red"
},
{
value: 50,
color: "#46BFBD",
highlight: "#5AD3D1",
label: "Green"
},
{
value: 100,
color: "#FDB45C",
highlight: "#FFC870",
label: "Yellow"
}
]
For a pie chart, you must pass in an array of objects with a value and a color property. The value attribute should be a number, Chart.js will total all of the numbers and calculate the relative proportion of each. The color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL.
Chart options
These are the customisation options specific to Pie & Doughnut charts. These options are merged with the global chart configuration options, and form the options of the chart.
{
//Boolean - Whether we should show a stroke on each segment
segmentShowStroke : true,
//String - The colour of each segment stroke
segmentStrokeColor : "#fff",
//Number - The width of each segment stroke
segmentStrokeWidth : 2,
//Number - The percentage of the chart that we cut out of the middle
percentageInnerCutout : 50, // This is 0 for Pie charts
//Number - Amount of animation steps
animationSteps : 100,
//String - Animation easing effect
animationEasing : "easeOutBounce",
//Boolean - Whether we animate the rotation of the Doughnut
animateRotate : true,
//Boolean - Whether we animate scaling the Doughnut from the centre
animateScale : false,
//String - A legend template
legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%>
<span style=\"background-color:<%=segments[i].fillColor%>\"><%if(segments[i].label){%><%=segments[i].label%><%}%>
<%}%>
"
}
You can override these for your Chart
instance by passing a second argument into the Doughnut
method as an object with the keys you want to override.
For example, we could have a doughnut chart that animates by scaling out from the centre like so:
new Chart(ctx).Doughnut(data, {
animateScale: true
});
// This will create a chart with all of the default options, merged from the global config,
// and the Doughnut chart defaults but this particular instance will have `animateScale` set to `true`.
We can also change these default values for each Doughnut type that is created, this object is available at Chart.defaults.Doughnut
. Pie charts also have a clone of these defaults available to change at Chart.defaults.Pie
, with the only difference being percentageInnerCutout
being set to 0.
Prototype methods
.getSegmentsAtEvent( event )
Calling getSegmentsAtEvent(event)
on your Chart instance passing an argument of an event, or jQuery event, will return the segment elements that are at the same position of that event.
canvas.onclick = function(evt){
var activePoints = myDoughnutChart.getSegmentsAtEvent(evt);
// => activePoints is an array of segments on the canvas that are at the same position as the click event.
};
This functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.
.update( )
Calling update()
on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.
myDoughnutChart.segments[1].value = 10;
// Would update the first dataset's value of 'Green' to be 10
myDoughnutChart.update();
// Calling update now animates the circumference of the segment 'Green' from 50 to 10.
// and transitions other segment widths
.addData( segmentData, index )
Calling addData(segmentData, index)
on your Chart instance passing an object in the same format as in the constructor. There is an optional second argument of ‘index’, this determines at what index the new segment should be inserted into the chart.
// An object in the same format as the original data source
myDoughnutChart.addData({
value: 130,
color: "#B48EAD",
highlight: "#C69CBE",
label: "Purple"
});
// The new segment will now animate in.
.removeData( index )
Calling removeData(index)
on your Chart instance will remove segment at that particular index. If none is provided, it will default to the last segment.
myDoughnutChart.removeData();
// Other segments will update to fill the empty space left.


--- layout: newsstory title: OK TO GO match: Friendly Stourport 1 Yeltz 1 ---
The mighty Yeltz completed a pretty successful sequence of friendlies with a 1-1 draw at Stourport on Friday night, our goal coming from Leadbetter in another game of multiple substitutions. We've had some good results over the pre-season period and all in all things are looking reasonably promising for the months ahead.
So on Saturday the season proper finally kicks off with a home game at The Grove againast Welling United . They finished just 3 points out of the relegation zone last year, but who knows how good they'll be this year. Let's hope for a good start and three points.


Polygon + Marker Cluster
Description
This project is a demo of how you can attach polygons for regions in Google Maps, and how you can have clusters of Markers.
In this sample, you can see Portugal divided by its districts, as well as some points of interested marked.
When zommed out, the markers are clustered.
When zoomed in, the cluster dissipates so you can see each marker individually.
Install
Download all the files (except the docs
folder) and make sure you change the API key
under index.html
to your own:
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script>
This line is in the <head>
section and it will define wether or not this demo
will work for you or not.
Usage
To use it, open the index.html
file with a browser of your choice and enjoy.
This is mainly a front-end project, so no additional setup is needed.
JavaScript Code
The following files are under the directory js
and they represent the logic of
this demo:
data/poiData.js
is the file containing the data for the points of interest. To find the coordinates of a point of interest you can use https://google-developers.appspot.com/maps/documentation/utils/geocoder/data/districtData.js
constains the coordinates that define the district's polygon shape.geometry/coordinate.js
representes a coordinate object.geometry/polygon.js
represents a polygon object. Contains mathematical calculations for polygons.utils/randomColor.js
contains a function to help generete random strings of colors.libs/markermanager.js
is my library for managing marker objects from the Google Maps API.myscript.js
is responsible for creating the polygons and clustering the marks. Depends onmarkermanager.js
.
License
This work is udner the MIT license.


Home
Profile
Help
Logout
Admin Dashboard
0 Parcels
Delivered
0 Parcels
Not Delivered yet
0 Parcels
Canceled
Customers Orders Summary
Id
Date
Email
Phone
Price
origin
Location
Destination
Tracking
Status
Action
×
Update delivery Order
Current Location
Status
Pending
Delivered
Comments
Additionals notes
Submit


Climate Change Impacts
The changing climate impacts society and ecosystems in a broad variety of ways. For example, climate change can alter rainfall, influence crop yields, affect human health, cause changes to forests and other ecosystems, and even impact our energy supply. Climate-related impacts are occurring across the country and over many sectors of our economy.
Explore the impacts of climate change by region, by sector, or by state.


Click the image to jump to category.
Silver: $75
Full face* with lashes
--$25 Deposit Required--
Gold: $100
Full face* with lashes, highlight & contour
--$25 Deposit Required--
Platinum: $125
Full face* with lashes (travel included)
--$50 Deposit Required--
Platinum Plus: $150
Full face* with top and bottom lashes, highlight & contour (travel included)
The price does not change if you opt-out of receiving bottom lashes.
--$50 Deposit Required--
1-on-1 Makeup Session: $100
2-hour session
--$25 Deposit Required--
Senior Citizens: $50 (On-Site Only)
Full face* -Lashes, highlight & contour are NOT included.
Eyelashes: $12
Strip only (non-latex glue)
* "Full face" consists of eyebrow shaping, eyeshadow application with lashes, eyeliner, color correction, foundation, blush and lipstick.
Half-Day Rate On Location: $300
(up to 4 hours for one model only) - $50 for each additional person - $25 each additional hr.
Full-Day Rate On Location: $550
(up to 8 hours for one model only) - $50 for each additional person - $25 each additional hr.
Male Grooming: $50
Refreshed face
NOTE: The rates provided are for commercials, video and/or professional photoshoots. Shoot includes 1 makeup application / touch-up for 1
person only. Negotiations for trade photos are sometimes considered and low budget shoots can be taken into consideration.
Bridal Makeup / Package A: $350
Includes consultation, camera-ready, high-definition makeup and unlimited touch-ups up to an hour after the bride departs for wedding.
--$105 Deposit Required for Bride Only OR 30% of Total Bridal Party--
Bridal Makeup / Package B: $200
Includes camera-ready, high-definition makeup and unlimited touch-ups until the bride departs for wedding.
--$60 Deposit Required for Bride Only OR 30% of Total Bridal Party--
Bridal Makeup / Package C: $150
Makeup Artist leaves after services are rendered. No touch-ups will be offered.
--$45 Deposit Required for Bride Only OR 30% of Total Bridal Party--
Bridal Consultation: $85
1½ hr. session. Lashes are included.
--$25 Deposit Required--
Bridesmaids: $85 ea.
Lashes are included.
--$25 Deposit Required--
Bridesmaid Consultation: $65 ea.
½ hr sessions. Lashes NOT included.
--$25 Deposit Required--
Mother of the Bride or Groom: $75 ea.
Lashes NOT included.
--$25 Deposit Required--
Jr. Bridesmaids (Age 13 and under): $25 ea.
One color eyeshadow, stained lipgloss, and light blush.
Touch-Up/Stand-By on Location: $50 per hr.
Price is for each additional hour from the time initial service was completed.
Tattoo Cover-Up: Price Varies
Lashes: $12
**Prices are subject to change depending on early-call times and/or length of travel.
Deposit is required to secure an appointment. See "Book Now" page for details.


Mulan (G) **** (out of ****)
Although it undoubtedly upset Disney executives, the disappointing domestic box office performance of last year's _Hercules_ was probably the best thing to happen to the Mouse's animation house. While it was a light, expertly crafted, and highly enjoyable trifle, it was just that, a trifle, lacking the gravity that was a crucial ingredient of the studio's biggest financial (_The_Lion_King_) and artistic (_Beauty_and_the_Beast_, _The_Hunchback_of_Notre_Dame_) successes. Seemingly galvanized by that humbling wakeup call, Disney's tried-and-true blend of populist instincts and weightier interests is back in full force and top form in _Mulan_.
In its current animation renaissance, Disney has proven to be better suited to handling female protagonists (Belle, Ariel, Pocahontas) than male ones (Aladdin and Hercules were varying degrees of milquetoast), and the title character of Fa Mulan (spoken by Ming-Na Wen, sung by Lea Salonga) is no exception. Crippled in their ongoing war with the Huns, the shorthanded Imperial Chinese army requires that one male from each family join the military cause. The only male in the Fa family is Mulan's father (Soon-Tek Oh), and, despite his advanced age and bad leg, he valiantly agrees to enlist. Determined to save her father from what is certain death and maintain honor in the family, Mulan, in a sequence of stunning visual and emotional power, cuts her hair, dons battle armor, and joins the army with her father's summons as the male Ping.
Although all of Disney's recent heroines have been strong feminist role models, none have been quite as proactive as Mulan. As can be expected, she initially cannot keep up with the guys in basic training, but she manages to make her every man's equal, if not superior, through her sheer will and determination. Mulan's transformation is highly reminiscent of Demi Moore's in last year's Disney drama _G.I._Jane_, but _Mulan_ oneups that film's hour-long toughening process by efficiently covering the same ground during a single, rousing musical number, "I'll Make a Man Out of You," sung by army captain Shang (spoken by B.D. Wong, sung by, yes, Donny Osmond). _Mulan_ also out-G.I.'s _Jane_ by having its heroine rely mostly on wits, rather than brawn, in combat; while she has a high kick that rivals the best of them, it's her quick-thinking brain that proves to be most formidable.
The main thrust of the story sounds rather serious, but this is a Disney film, after all, and it would not be complete without the requisite comic relief, here in the form of the scrawny dragon Mushu (Eddie Murphy), who is Mulan's self-appointed guardian. A hilarious, jive-talking Murphy would appear to be an out of place in this largely earnest tale, but Mushu is more seamlessly integrated into the story than the seemingly grafted-on comic relief in the two most serious Disney efforts, _Hunchback_ and _Pocahontas_. _Hunchback_ and _Pocahontas_ could have lost the sore-thumb gargoyles and cute, mute Meeko the raccoon, respectively, without any major loss to the film as a whole; however, the presence of Mushu, while still an obvious concession to the masses, never feels gratuitous, and his funny presence would be sorely missed.
Disney animated features have a rich musical tradition, and the downward slide hinted at in _Hercules_ continues in _Mulan_. _Mulan_ is the first recent Disney animated effort that I feel could have easily survived _without_ the songs, even if they are kept to a paltry (for Disney standards) four. Only two of the tunes by composer Matthew Wilder (yes, he of "Break My Stride" fame) and _Hercules_ lyricist David Zippel, the lovely if very short "Reflection," Mulan's de rigueur "I Want" song; and the aforementioned "I'll Make a Man Out of You" serve a recognizable dramatic purpose. Nonetheless, Wilder deserves kudos for injecting some Oriental flavor into the songs--for the most part, anyway (only "I'll Make a Man..." sounds distinctly Western); but Zippel's lyrics are simply serviceable. Picking up the slack is score composer Jerry Goldsmith, who gives _Mulan_ an appropriate epic sweep, most memorably in the haunting cue that accompanies Mulan's fateful decision early in the film.
While the ears may be disappointed by _Mulan_, the eyes will be more than satisfied. Under the sure hands of directors Barry Cook and Tony Bancroft and art director Ric Sluiter, _Mulan_'s look has a texture uncommon to most animated features. Backgrounds are kept fairly simple, and the screen is often awash with scarlets and lavenders, creating a surreal yet emotionally true visual landscape. There's a general softness to the art, which fits nicely the Eastern art tradition and lends the film a distinct identity and personality.
I would not consider _Mulan_ to be in the upper echelon of Disney animated features occupied by _Beauty_ and the highly underappreciated _Hunchback_, but it ably upholds the Disney tradition of excellence. Inspiring, touching, serious, yet fun, _Mulan_ is animated entertainment of the highest order, putting half-hearted efforts like Warner Bros.'s recent _Quest_for_Camelot_ to shame.
Michael Dequina
<EMAIL_ADDRESS>|<EMAIL_ADDRESS>Mr. Brown's Movie Site: http://welcome.to/mrbrown
CompuServe Hollywood Hotline: http://www.HollywoodHotline.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews