/usr/share/nip2/compat/7.8/Histogram.def is in nip2 7.26.3-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | /* find histogram of x
*/
Hist_find x = map_unary hist_find x;
/* find n-dimensional histogram from n-band image
*/
Hist_find_nD in
= map_unary widget in
{
widget image = class
Image value {
_check_args = [
[image, "Image", check_Image]
] ++ super._check_args;
_vislevel = 3;
// default to something small-ish
bins = 8;
value = hist_find_nD bins image.value;
}
}
/* map image x through histogram hist
*/
Hist_map hist x = map_binary hist_map hist x;
/* find cumulative histogram of hist
*/
Hist_cumulative x = map_unary hist_cum x;
/* find normalised histogram of hist
*/
Hist_normalise x = map_unary hist_norm x;
/* find LUT which matches hist in to hist ref
*/
Hist_match in ref = map_binary hist_match in ref;
#separator
/* histogram equalisation
*/
Hist_equalise = class {
/* histogram equalise x globally
*/
Global x = map_unary hist_equalize x;
/* local histogram equalisation using region r as window
*/
Local r = map_unary (hist_equalize_local r.width r.height) r.image;
}
/* slice a line of pixels along a guide line and display as a histogram
*/
Guide_slice in
= map_unary widget in
{
widget guide = class
Image value {
_check_args = [
[guide, "Guide", check_Guide]
] ++ super._check_args;
value
= image_set_type Image_type.HISTOGRAM slice
{
slice
= guide.image.extract_area
guide.image.rect.left guide.top
guide.width 1,
is_instanceof "HGuide" guide
= guide.image.extract_area
guide.left guide.image.rect.top
1 guide.height;
}
}
}
|