Yes, I think you are right. Can only return one value. But it does not matter in my case. Since they are both random numbers I can just use one of them.
---------- Post updated at 03:33 PM ---------- Previous update was at 02:47 PM ----------
I have this awk script, and I output mean and sigma, but the result is not what I assigned to mean and sigma.
As you can see below I am not getting the values of mean and sigma that I have passed to the function.
Hello,
How to execute a call back function after aio_write() or aio_read() in Sun Solaris 5.7?
I have filled the control block struct aiocb as follows:
aio_sigevent.sigev_signo = SIGEV
aio_sigevent.sigev_notify = SIGEV_THREAD
Then I have filled the call back function in ... (0 Replies)
Actually I got a list of file end with *.txt
I want to use the same command apply to all the *.txt
Thus I try to find out the fastest way to write those same command in a script and then want to let them run automatics.
For example:
I got the file below:
file1.txt
file2.txt
file3.txt... (4 Replies)
Hi All,
I am using splice function in for loop to delete particular element from array with one condition.
my $cnt=0;
foreach my $elem (@result)
{
if (condition){
splice(@result, $cnt, 1);}
else{
$cnt++;}
}
Now when in array, two elements comes sequentially with the... (3 Replies)
I need to detect the number of pages in a print job when it is available so I can warn users when they try to print a report much larger than they expected. Sometimes they are trying to print 1000 page reports when they thought they were getting a 10 page report.
Under linux I am scanning the... (5 Replies)
Hi, I have a file like this
SPF_HC00001|iCalcular_Monto_Minimo|--->|SPF_HC00028|pstcObtener_Monto_Minimo
SPF_HC00004|iCalcular_Incrementos|--->|SPF_HC00032|pstcObtener_Num_Incrementos
SPF_HC00005|iCalcular_Articulo_167_Reformado|--->|SPF_HC00031|pstcObtener_Por_CB_Inc... (2 Replies)
Hello Unix experts,
If I could get any explanations on why the code below doesn't work it would be great !
My input looks like that ("|" delimited):
Saaaaabbbbbccccc|ok
Sdddddfffffggggg|ok
The goal is, if $2 is "ok", to remove everything before the pattern given in the match function... (5 Replies)
hey guys, im trying to learn bourne shell atm and I'm having some issues with functions.
so heres my code:
#!/bin/bash
##functions
memory () {
free -m
}
space () {
df -h
}
ip () { (5 Replies)
Hi,
I am having script which contains many functions. Need to print each function name at the starting of the function. Like below,
functionname()
{
echo "functionname"
commands....
}
I've tried like below,
func=`grep "()" scriptname | cut -d "(" -f1`
for i in $func
do
nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
LEARN ABOUT MOJAVE
mpsimagegaussianblur
MPSImageGaussianBlur(3) MetalPerformanceShaders.framework MPSImageGaussianBlur(3)NAME
MPSImageGaussianBlur
SYNOPSIS
#import <MPSImageConvolution.h>
Inherits MPSUnaryImageKernel.
Instance Methods
(nonnull instancetype) - initWithDevice:sigma:
(nullable instancetype) - initWithCoder:device:
(nonnull instancetype) - initWithDevice:
Properties
float sigma
Additional Inherited Members
Detailed Description
The MPSImageGaussianBlur convolves an image with gaussian of given sigma in both x and y direction.
The MPSImageGaussianBlur utilizes a very fast algorith that typically runs at approximately
1/2 of copy speeds. Notably, it is faster than either the tent or box blur except perhaps
for very large filter windows. Mathematically, it is an approximate gaussian. Some
non-gaussian behavior may be detectable with advanced analytical methods such as FFT.
If a analytically clean gaussian filter is required, please use the MPSImageConvolution
filter instead with an appropriate set of weights. The MPSImageGaussianBlur is intended
to be suitable for all common image processing needs demanding ~10 bits of precision or
less.
Method Documentation
- (nullable instancetype) initWithCoder: (NSCoder *__nonnull) aDecoder(nonnull id< MTLDevice >) device
NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know
which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device
instead.
Parameters:
aDecoder The NSCoder subclass with your serialized MPSKernel
device The MTLDevice on which to make the MPSKernel
Returns:
A new MPSKernel object, or nil if failure.
Reimplemented from MPSUnaryImageKernel.
- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device
Standard init with default properties per filter type
Parameters:
device The device that the filter will be used on. May not be NULL.
Returns:
a pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be
MTLFeatureSet_iOS_GPUFamily2_v1 or later.
Reimplemented from MPSUnaryImageKernel.
- (nonnull instancetype) initWithDevice: (nonnull id< MTLDevice >) device(float) sigma
Initialize a gaussian blur filter for a particular sigma and device
Parameters:
device The device the filter will run on
sigma The standard deviation of gaussian blur filter. Gaussian weight, centered at 0, at integer grid i is given as w(i) =
1/sqrt(2*pi*sigma) * exp(-i^2/2*sigma^2) If we take cut off at 1% of w(0) (max weight) beyond which weights are considered 0, we have
ceil (sqrt(-log(0.01)*2)*sigma) ~ ceil(3.7*sigma) as rough estimate of filter width
Returns:
A valid object or nil, if failure.
Property Documentation
- sigma [read], [nonatomic], [assign]
Read-only sigma value with which filter was created
Author
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Version MetalPerformanceShaders-100 Thu Feb 8 2018 MPSImageGaussianBlur(3)