Searched refs:moments (Results 1 - 25 of 27) sorted by relevance

12

/external/opencv/cv/src/
H A Dcvmoments.cpp43 /* The function calculates center of gravity and central second order moments */
45 icvCompleteMomentState( CvMoments* moments )
50 assert( moments != 0 );
51 moments->inv_sqrt_m00 = 0;
53 if( fabs(moments->m00) > DBL_EPSILON )
55 double inv_m00 = 1. / moments->m00;
56 cx = moments->m10 * inv_m00;
57 cy = moments->m01 * inv_m00;
58 moments->inv_sqrt_m00 = sqrt( fabs(inv_m00) );
62 mu20 = moments
366 cvMoments( const void* array, CvMoments* moments, int binary ) argument
580 cvGetSpatialMoment( CvMoments * moments, int x_order, int y_order ) argument
618 cvGetCentralMoment( CvMoments * moments, int x_order, int y_order ) argument
661 cvGetNormalizedCentralMoment( CvMoments * moments, int x_order, int y_order ) argument
[all...]
H A Dcvcamshift.cpp64 CvMoments moments; local
75 moments.m00 = moments.m10 = moments.m01 = 0;
101 CV_CALL( cvMoments( &cur_win, &moments ));
104 if( fabs(moments.m00) < DBL_EPSILON )
107 inv_m00 = moments.inv_sqrt_m00*moments.inv_sqrt_m00;
108 dx = cvRound( moments.m10 * inv_m00 - windowIn.width*0.5 );
109 dy = cvRound( moments
171 CvMoments moments; local
[all...]
H A Dcvmatchcontours.cpp61 CvMoments moments; local
76 /* first moments calculation */
77 CV_CALL( cvMoments( contour1, &moments ));
79 /* Hu moments calculation */
80 CV_CALL( cvGetHuMoments( &moments, &huMoments ));
91 /* second moments calculation */
92 CV_CALL( cvMoments( contour2, &moments ));
94 /* Hu moments calculation */
95 CV_CALL( cvGetHuMoments( &moments, &huMoments ));
/external/tensorflow/tensorflow/python/kernel_tests/
H A Dparameterized_truncated_normal_op_test.py54 """Calculates the truncated normal moments.
84 moments = [0.0] * (max_moment + 1)
87 for k in range(len(moments)):
88 moments[k] += value
90 for i in range(len(moments)):
91 moments[i] /= len(samples)
92 return moments
109 # Stop at moment 10 to avoid numerical errors in the theoretical moments.
123 moments = calculate_moments(samples, self.max_moment)
126 for i in range(1, len(moments))
[all...]
/external/tensorflow/tensorflow/core/lib/random/
H A Drandom_distributions_test.cc62 // of all statistical moments are all below z_limit.
68 // max_moments: the largest moments of the uniform distribution to be tested;
79 std::vector<double> moments(max_moments + 1);
80 double* const moments_data = &moments[0];
91 // moments[i] store the i-th order measured moments.
100 // normalize the moments
102 moments[i] /= moments_sample_count[i];
126 fabs((moments[i] - moments_i_mean) / sqrt(total_variance));
132 << " measured moments
[all...]
/external/tensorflow/tensorflow/python/kernel_tests/random/
H A Drandom_poisson_test.py37 """This is a large test due to the moments computation taking some time."""
57 tf_logging.warn("Cannot test moments: %s", e)
59 # The moments test is a z-value test. This is the largest z-value
69 moments = [0] * (max_moment + 1)
78 moments[i] += moment
82 moments[i] /= moments_sample_count[i]
102 (moments[i] - moments_i_mean) / np.sqrt(total_variance))
H A Drandom_gamma_test.py37 """This is a medium test due to the moments computation taking some time."""
66 tf_logging.warn("Cannot test moments: %s" % e)
71 # z-tests of all statistical moments are all below z_limit.
73 # max_moments: the largest moments of the distribution to be tested
79 # The moments test is a z-value test. This is the largest z-value
90 # Gamma moments only defined for values less than the scale param.
94 moments = [0] * (max_moment + 1)
103 moments[i] += moment
107 moments[i] /= moments_sample_count[i]
132 (moments[
[all...]
/external/tensorflow/tensorflow/contrib/nn/python/ops/
H A Dalpha_dropout_test.py39 t_mean, t_std = nn_impl.moments(t, axes=[0, 1])
40 output_mean, output_std = nn_impl.moments(output, axes=[0, 1])
/external/tensorflow/tensorflow/contrib/layers/python/layers/
H A Dnormalization.py106 # the moments and the batch normalization.
152 # Calculate the moments (instance activations).
153 mean, variance = nn.moments(inputs, moments_axes, keep_dims=True)
H A Dlayers.py240 it would accumulate the statistics of the moments into `moving_mean` and
506 it would accumulate the statistics of the moments into `moving_mean` and
694 # the moments and the batch normalization.
771 # Calculate the moments based on the individual batch.
774 mean, variance = nn.moments(inputs, moments_axes, keep_dims=True)
778 mean, variance = nn.moments(inputs, moments_axes)
818 # Use computed moments during training and moving_vars otherwise.
2082 Given a tensor `inputs` of rank `R`, moments are calculated and normalization
2171 # Calculate the moments on the last axis (layer activations).
2173 mean, variance = nn.moments(input
[all...]
/external/tensorflow/tensorflow/contrib/gan/python/features/python/
H A Dvirtual_batchnorm_test.py53 """Check that `_statistics` gives the same result as `nn.moments`."""
59 mom_mean, mom_var = nn.moments(tensors, axes)
70 """Check that `_virtual_statistics` gives same result as `nn.moments`."""
79 # Get `nn.moments` on the full batch.
82 mom_mean, mom_variance = nn.moments(full_batch, reduction_axes)
/external/tensorflow/tensorflow/contrib/gan/python/eval/python/
H A Dsliced_wasserstein_impl.py127 mean, variance = nn.moments(patches, [1, 2, 3], keep_dims=True)
/external/opencv/cv/include/
H A Dcv.h347 /* Calculates all spatial and central moments up to the 3rd order */
348 CVAPI(void) cvMoments( const CvArr* arr, CvMoments* moments, int binary CV_DEFAULT(0));
350 /* Retrieve particular spatial, central or normalized central moments */
351 CVAPI(double) cvGetSpatialMoment( CvMoments* moments, int x_order, int y_order );
352 CVAPI(double) cvGetCentralMoment( CvMoments* moments, int x_order, int y_order );
353 CVAPI(double) cvGetNormalizedCentralMoment( CvMoments* moments,
356 /* Calculates 7 Hu's invariants from precalculated spatial and central moments */
357 CVAPI(void) cvGetHuMoments( CvMoments* moments, CvHuMoments* hu_moments );
757 /* Compares two contours by matching their moments */
H A Dcvcompat.h344 #define cvContourMoments( contour, moments ) \
345 cvMoments( contour, moments, 0 )
/external/tensorflow/tensorflow/python/ops/
H A Dbatch_norm_benchmark.py99 mean, variance = nn_impl.moments(tensor, axes, keep_dims=keep_dims)
H A Dnn_batchnorm_test.py250 """Test for tf.nn.moments(..., keep_dims=True / False).
325 """Test for a variety of shapes and moments.
445 # Method to compute moments of `x` wrt `axes`.
452 return nn_impl.moments(x, axes, keep_dims=keep_dims)
475 # Check that the moments are correct.
506 # Check that the moments are correct.
589 MomentsTest are executed, but with calls to tf.nn.moments()
H A Dnn_fused_batchnorm_test.py100 mean, var = nn_impl.moments(
136 # This is for Bessel's correction. tf.nn.moments uses n, instead of n-1, as
H A Dnn_impl.py631 name: Name used to scope the operations that compute the moments.
651 @tf_export("nn.moments")
652 def moments( function
666 When using these moments for batch normalization (see
678 name: Name used to scope the operations that compute the moments.
679 keep_dims: produce moments with the same dimensionality as the input.
684 with ops.name_scope(name, "moments", [x, axes]):
718 keep_dims: Produce moments with the same dimensionality as the input.
728 # Unlike moments(), this just uses a simpler two-pass method.
730 # See comment in moments() WR
[all...]
/external/tensorflow/tensorflow/python/keras/_impl/keras/
H A Doptimizers.py190 moments = [K.zeros(shape) for shape in shapes]
191 self.weights = [self.iterations] + moments
192 for p, g, m in zip(params, grads, moments):
H A Dbackend.py2000 mean, var = nn.moments(x, reduction_axes, None, None, False)
2023 mean, var = nn.moments(x, reduction_axes, None, None, False)
/external/ImageMagick/MagickCore/
H A Dstatistic.c1445 % GetImageMoments() returns the normalized moments of one or more image
1601 Compute the image moments.
1695 Normalize image moments.
1713 Compute Hu invariant moments.
1793 *moments;
1820 moments=GetImageMoments(hash_image,exception);
1822 if (moments == (ChannelMoments *) NULL)
1831 (-MagickLog10(moments[channel].invariant[i]));
1832 moments=(ChannelMoments *) RelinquishMagickMemory(moments);
1784 *moments; local
[all...]
/external/tensorflow/tensorflow/python/layers/
H A Dnormalization.py436 # initialized with this batch's moments.
563 mean, variance = nn.moments(inputs, reduction_axes, keep_dims=keep_dims)
/external/ImageMagick/www/api/
H A Dstatistic.php270 <p>GetImageMoments() returns the normalized moments of one or more image channels.</p>
/external/ImageMagick/Magick++/lib/Magick++/
H A DImage.h1078 // Returns the normalized moments of one or more image channels.
1079 ImageMoments moments(void) const;
/external/tensorflow/tensorflow/contrib/timeseries/python/timeseries/
H A Dmath_utils.py477 Since Cauchy distributions do not have moments, entropy matching provides one
625 # InputStatisticsFromMiniBatch, these moments are
636 # InputStatisticsFromMiniBatch, these moments
856 # series start moments to reflect that. Note that these statistics are
860 mean, variance = nn.moments(
869 # Update moments whenever we even match the lowest time seen so far,
873 # given that we will eventually update the series start moments to

Completed in 677 milliseconds

12