OK, so the median is based on data we don't see, and we just pick the middle without regard to any order but the given one. But I still don't understand.
4 makes sense for cat, being (2+6)/2, but how does one get 3 for dog? That's the last element, not the middle. I wondered if maybe they were line numbers instead, but that doesn't make sense either.
Hi ,
I have a requirement to split the record based on particular match using UNIX.
Case1:
Input Record :
10.44.48.63;"Personals/Dating;sports";1441
Output Records :
10.44.48.63;Personals/Dating;1441;Original
10.44.48.63;sports;1441;Dummy
Case2:
Input Record : ... (5 Replies)
Hi All,
I have some data like below.
Step1,Param1,Param2,Param3
1,2,3,4
2,3,4,5
2,4,5,6
3,0,1,2
3,0,0,0
3,2,1,3
........
so on
Where I need to find the median(arithmetic) of each column from Param1...to..Param3 for each set of Step1 values.
(Sort each specific column, if the... (5 Replies)
I have input file like this
update tablename set column1='ABC',column2='BBC' where columnx=1 and columny=100 and columnz='10000001'
update tablename set column1='ABC',column2='BBC',column3='CBC' where columnx=1 and columny=100 and columnz='10000002'
update tablename set column1='ABC' where... (1 Reply)
Trying to match $2 in original_targets with $2 of new_targets . If the two numbers match exactly then a match.txt file is outputted using the information in the new_targets in the beginning 4 fields $1, $2, $3, $4 and value of $4 in the original_targets . If there is "No Match" then a no... (2 Replies)
Trying to match $1 of target.txt to $5 of file.txt. If there is a match then in an output.txt file $1,$1 (row underneath),$6,$4,$7 from file.txt are printed on the same line as $1 of target.txt. The input is from excel and the output should be tab-deliminated. Thank you :).
target.txt... (2 Replies)
I am trying to merge two lines to one based on some matching condition.
The file is as follows:
Matches filter:
'request ', timestamp, <HTTPFlow
request=<GET:
Matches filter:
'request ', timestamp, <HTTPFlow
request=<GET:
Matches filter:
'request ', timestamp, <HTTPFlow
... (8 Replies)
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
Hi,
i have 2 files , the data i need to match is in masterfile and i need to pull out column 3 from master if column 1 and 2 match and output entire row to new file
I have tried with join and awk and i keep getting blank outputs or same file
is there an easier way than what i am... (4 Replies)
Discussion started by: axis88
4 Replies
LEARN ABOUT PLAN9
filters
FILTERS(9.1) FILTERS(9.1)
NAME
adapt, ahe, crispen, laplace, edge, edge2, edge3, extremum, median, nonoise, smooth, shadepic - image neighborhood operators
SYNOPSIS
fb/adapt [ input ]
fb/ahe [ input ]
fb/crispen [ input ]
fb/laplace [ input ]
fb/edge [ input ]
fb/edge2 [ input ]
fb/edge3 [ input ]
fb/extremum [ input ]
fb/median [ input ]
fb/nonoise [ input ]
fb/smooth [ input ]
fb/shadepic [ -lx y z ] [ input ]
DESCRIPTION
Gathered here are descriptions of programs that compute the pixels of an output image by performing some operation on a neighborhood of
each pixel of their input image (default standard input). Each program writes the output image on standard output. The programs process
multi-channel inputs by treating each channel independently.
Adapt performs adaptive contrast enhancement by examining the 7x7 region centered on each input pixel, remapping the center pixel linearly
in a way that would send the neighborhood's maximum value to 255 and its minimum to 0. To avoid divide checks, no mapping is done if all
pixels in the region have the same value.
Ahe performs adaptive histogram equalization by examining the 17x17 region centered on each input pixel, counting the number of pixels
whose value is less than the center pixel. (It counts 1/2 for each pixel equal to the center value.) Output pixel values are 255 times the
count divided by the window size.
Crispen examines the 3x3 region surrounding each input pixel, computing 9 times the center pixel minus the sum of its eight neighbors.
This is a fairly extreme high-pass filter and sharpens edges substantially.
Laplace computes 5 times the center pixel minus the sum of its four vertical and horizontal neighbors. This adds a 3x3 discrete Laplacian
to the original image, and is a less extreme high-pass filter than crispen.
Edge, edge2, and edge3 detect edges in various ways. Edge examines the 3x3 region surrounding each input pixel, outputting 8 times the
center value minus the sum of its eight neighbors.
Edge2 applies a Sobel operator to the input image. It approximates the image's gradient by finite differences on a 3x3 neighborhood, out-
putting the vector length of the gradient approximation.
Edge3 likewise approximates the gradient of the input image. The output is roughly the phase angle of the gradient approximation, scaled
between 0 and 255.
Extremum examines the 3x3 region surrounding each input pixel, outputting the value that differs most from the center value. In case of a
tie, the larger candidate is chosen.
Median does noise reduction by replacing each pixel of the input image by the median of the 3x3 region surrounding it.
Nonoise implements the Bayer-Powell noise reduction filter. It computes the average value of the eight neighbors of each pixel of the
input image, and substitutes it for the pixel value if the two differ by more than 64.
Smooth low-pass filters its input image by convolution with a Bartlett window.
Shadepic treats its input image as an array of elevations. At each pixel it approximates the normal vector to the height-field by finite
differences on a 3x3 neighborhood and outputs 255 times its dot product with the unit vector in the light-source direction specified by
option -l (default 1,-1,1). If the dot product is negative, it is clamped at zero. (This computation is just Lambertian diffuse reflec-
tion.)
SOURCE
/sys/src/fb
SEE ALSO
picfile(9.6)
BUGS
There are too many weird wired-in sizes.
FILTERS(9.1)