7#include <memory_resource>
8#include <nk/value/value.hpp>
45 std::pmr::memory_resource *mr =
nullptr);
155std::pair<Value, Value>
157 std::pmr::memory_resource *mr =
nullptr);
158std::pair<Value, Value>
159cmunique_rgb(
const Value &RGB,
160 std::pmr::memory_resource *mr =
nullptr);
161std::pair<Value, Value>
162cmunique_i(
const Value &I,
163 std::pmr::memory_resource *mr =
nullptr);
177std::pair<Value, Value>
233 std::pmr::memory_resource *mr =
nullptr);
247 double gamma, std::pmr::memory_resource *mr =
nullptr);
262 std::pmr::memory_resource *mr =
nullptr);
424 std::pmr::memory_resource *mr =
nullptr);
466 std::pmr::memory_resource *mr =
nullptr);
497 std::pmr::memory_resource *mr =
nullptr);
536 const std::string &standard,
bool is_input_lab,
537 double kL,
double kC,
double kH,
double K1,
double K2,
538 std::pmr::memory_resource *mr =
nullptr);
553 std::pmr::memory_resource *mr =
nullptr);
566 std::pmr::memory_resource *mr =
nullptr);
597 std::pmr::memory_resource *mr =
nullptr);
624 std::pmr::memory_resource *mr =
nullptr);
644 const Value &mask, std::pmr::memory_resource *mr =
nullptr);
664 std::pmr::memory_resource *mr =
nullptr);
715 const std::string &method,
716 const std::string &scaling,
717 const Value &channels,
718 std::pmr::memory_resource *mr =
nullptr);
749 double lremap_lo,
double lremap_hi,
751 int ntilesR,
int ntilesC,
752 std::pmr::memory_resource *mr =
nullptr);
812 const Value &colormap,
813 const std::string &color_assignment,
814 const Value &included_labels,
816 std::pmr::memory_resource *mr =
nullptr);
874 const std::string &method,
875 const std::string &color_space,
876 std::pmr::memory_resource *mr =
nullptr);
918 const std::string &color_space,
919 const std::string &linearization,
920 std::pmr::memory_resource *mr =
nullptr);
936 const std::string &color_space,
937 const std::string &linearization,
938 std::pmr::memory_resource *mr =
nullptr);
970 int bitsPerSample = 0,
971 std::pmr::memory_resource *mr =
nullptr);
Core MATLAB-compatible multidimensional array and scalar value type.
Value chromadapt(const Value &A, const Value &illuminant, const std::string &method, const std::string &color_space, std::pmr::memory_resource *mr=nullptr)
Chromatic adaptation for white-balance correction (B = chromadapt(A, illuminant, ....
Value ycbcr2rgbwide(const Value &YCBCR, int bits_per_sample, std::pmr::memory_resource *mr=nullptr)
BT.2020 / BT.2100 wide-gamut YCbCr → RGB (rgb = ycbcr2rgbwide(YCBCR, bps)).
Value rgbwide2ycbcr(const Value &RGB, int bits_per_sample, std::pmr::memory_resource *mr=nullptr)
BT.2020 / BT.2100 wide-gamut RGB → YCbCr (ycbcr = rgbwide2ycbcr(RGB, bps)).
Value contrast(const Value &x, int m, std::pmr::memory_resource *mr=nullptr)
Histogram-equalising gray colormap (cmap = contrast(x, m)).
Value lab2rgb(const Value &x, std::pmr::memory_resource *mr=nullptr)
CIE L*a*b* → sRGB (inverse of rgb2lab).
Value lab2uint8(const Value &lab, std::pmr::memory_resource *mr=nullptr)
Cast Lab image to UINT8 (labu = lab2uint8(lab)).
Value cool_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Cyan → magenta colormap (map = cool(n)).
Value bone_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Grayscale-with-blue-tint colormap (map = bone(n)).
Value illumpca(const Value &A, double P, const Value &mask, std::pmr::memory_resource *mr=nullptr)
PCA-based illuminant estimate (illum = illumpca(A [, P] [, 'Mask', M])).
Value lab2single(const Value &lab, std::pmr::memory_resource *mr=nullptr)
Cast Lab image to SINGLE (labs = lab2single(lab)).
Value gray_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Grayscale colormap (map = gray(n)).
Value pink_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Pastel-pink colormap (map = pink(n)).
Value rgb2lin(const Value &A, std::pmr::memory_resource *mr=nullptr)
sRGB → linear RGB gamma inverse (B = rgb2lin(A)).
Value lab2double(const Value &lab, std::pmr::memory_resource *mr=nullptr)
Cast Lab image to DOUBLE (labd = lab2double(lab)).
Value xyz2rgb(const Value &x, std::pmr::memory_resource *mr=nullptr)
CIE XYZ → sRGB (inverse of rgb2xyz).
Value whitepoint(const std::string &illuminant, std::pmr::memory_resource *mr=nullptr)
CIE reference-illuminant tristimulus (wp = whitepoint(illuminant)).
Value copper_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Copper-tinted colormap (map = copper(n)).
Value colorgradient(const Value &C, const Value &w, int n, std::pmr::memory_resource *mr=nullptr)
Smooth colormap through K anchor colours (M = colorgradient(C, w, n)).
Value white_cmap(int n, std::pmr::memory_resource *mr=nullptr)
All-ones colormap (map = white(n)).
Value rgb2hsv(const Value &x, std::pmr::memory_resource *mr=nullptr)
RGB → HSV (hsv = rgb2hsv(rgb)).
Value planar2raw(const Value &I, std::pmr::memory_resource *mr=nullptr)
Re-interleave 4 sensor planes into a full Bayer CFA mosaic (cfa = planar2raw(I)).
Value brighten(const Value &map, double beta, std::pmr::memory_resource *mr=nullptr)
Gamma-adjust a colormap (rmap = brighten(map, beta)).
Value autumn_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Red → yellow colormap (map = autumn(n)).
Value labeloverlay(const Value &A, const Value &L, const Value &colormap, const std::string &color_assignment, const Value &included_labels, double transparency, std::pmr::memory_resource *mr=nullptr)
Overlay a label / mask / categorical-index image on a 2-D base (B = labeloverlay(A,...
Value prism_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Cyclic 6-row rainbow palette (map = prism(n)).
Value label2rgb(const Value &L, const Value &cmap, const Value &background, std::pmr::memory_resource *mr=nullptr)
Colourise a labelled image (RGB = label2rgb(L, cmap, background)).
Value xyz2uint16(const Value &xyz, std::pmr::memory_resource *mr=nullptr)
XYZ → UINT16 ICC encoding (xyzu16 = xyz2uint16(xyz)).
Value rgb2xyz(const Value &x, std::pmr::memory_resource *mr=nullptr)
sRGB → CIE XYZ (D65) (xyz = rgb2xyz(rgb)).
Value xyz2lab(const Value &x, std::pmr::memory_resource *mr=nullptr)
CIE XYZ → CIE L*a*b* (D50 ICC reference white).
Value summer_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Green → yellow colormap (map = summer(n)).
Value cmap2gray(const Value &cmap, std::pmr::memory_resource *mr=nullptr)
RGB colormap → grayscale colormap (gmap = cmap2gray(cmap)).
Value lin2rgb(const Value &A, std::pmr::memory_resource *mr=nullptr)
Linear RGB → sRGB gamma forward (B = lin2rgb(A)).
Value hsv_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Hue-rotation colormap (map = hsv(n)).
Value tonemap(const Value &HDR, double lremap_lo, double lremap_hi, double saturation, int ntilesR, int ntilesC, std::pmr::memory_resource *mr=nullptr)
Render high-dynamic-range image for low-dynamic-range display (RGB = tonemap(HDR, ....
Value colorangle(const Value &rgb1, const Value &rgb2, std::pmr::memory_resource *mr=nullptr)
Angle between two RGB colours (theta = colorangle(rgb1, rgb2)).
Value lines_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Axes-color-order palette (map = lines(n)).
Value imcolordiff(const Value &I1, const Value &I2, const std::string &standard, bool is_input_lab, double kL, double kC, double kH, double K1, double K2, std::pmr::memory_resource *mr=nullptr)
CIE94 / CIEDE2000 colour difference (dE = imcolordiff(I1, I2, ...)).
Value rgb2lightness(const Value &RGB, std::pmr::memory_resource *mr=nullptr)
Lightness L* (L = rgb2lightness(RGB)).
Value spring_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Magenta → yellow colormap (map = spring(n)).
Value ntsc2rgb(const Value &x, std::pmr::memory_resource *mr=nullptr)
NTSC YIQ → RGB (inverse of rgb2ntsc).
Value flag_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Cyclic red/white/blue/black colormap (map = flag(n)).
Value xyz2double(const Value &xyz, std::pmr::memory_resource *mr=nullptr)
XYZ → DOUBLE (xyzd = xyz2double(xyz)).
Value raw2planar(const Value &cfa, std::pmr::memory_resource *mr=nullptr)
Deinterleave a Bayer CFA mosaic into its four sensor planes (P = raw2planar(cfa)).
Value ycbcr2rgb(const Value &x, std::pmr::memory_resource *mr=nullptr)
YCbCr → RGB (inverse of rgb2ycbcr).
Value rgbwide2xyz(const Value &RGB, int bits_per_sample, const std::string &color_space, const std::string &linearization, std::pmr::memory_resource *mr=nullptr)
Narrow-range wide-gamut RGB → CIE 1931 XYZ (XYZ = rgbwide2xyz(RGB, BPS, ...)).
Value hot_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Black-red-yellow-white colormap (map = hot(n)).
Value imfuse(const Value &A, const Value &B, const std::string &method, const std::string &scaling, const Value &channels, std::pmr::memory_resource *mr=nullptr)
Composite two images for visual comparison (C = imfuse(A, B, method, ...)).
Value illumgray(const Value &A, const std::vector< double > &P, const Value &mask, std::pmr::memory_resource *mr=nullptr)
Grey-World illuminant estimate (illum = illumgray(A [, P] [, 'Mask', M])).
Value lab2xyz(const Value &x, std::pmr::memory_resource *mr=nullptr)
CIE L*a*b* → CIE XYZ (inverse of xyz2lab).
void imsplit(const Value &I, std::vector< Value > &planes, std::pmr::memory_resource *mr=nullptr)
Split a multi-plane image into per-plane Values (imsplit(I, planes)).
Value rgb2lab(const Value &x, std::pmr::memory_resource *mr=nullptr)
sRGB → CIE L*a*b* (D65) (lab = rgb2lab(rgb)).
std::pair< Value, Value > rgb2ind_inmap(const Value &RGB, const Value &cmap, std::pmr::memory_resource *mr=nullptr)
RGB → indexed image with a fixed colormap ([ind, cmap] = rgb2ind(RGB, cmap)).
Value illumwhite(const Value &A, double P, const Value &mask, std::pmr::memory_resource *mr=nullptr)
White-Patch illuminant estimate (illum = illumwhite(A [, P] [, 'Mask', M])).
Value demosaic(const Value &I, const std::string &sensorAlignment, int bitsPerSample=0, std::pmr::memory_resource *mr=nullptr)
Convert a Bayer-encoded mosaic to a truecolor RGB image (RGB = demosaic(I, sensorAlignment,...
Value lab2uint16(const Value &lab, std::pmr::memory_resource *mr=nullptr)
Cast Lab image to UINT16 (labu = lab2uint16(lab)).
Value winter_cmap(int n, std::pmr::memory_resource *mr=nullptr)
Blue → cyan-ish colormap (map = winter(n)).
Value rgb2ycbcr(const Value &x, std::pmr::memory_resource *mr=nullptr)
RGB → YCbCr (BT.601) (ycbcr = rgb2ycbcr(rgb)).
Value rgb2ntsc(const Value &x, std::pmr::memory_resource *mr=nullptr)
RGB → NTSC YIQ (yiq = rgb2ntsc(rgb)).
Value wavelength2rgb(const Value &wavelength, const std::string &out_class, double gamma, std::pmr::memory_resource *mr=nullptr)
Wavelength → RGB (Bruton 1996) (RGB = wavelength2rgb(wavelength, class, gamma)).
Value hsv2rgb(const Value &x, std::pmr::memory_resource *mr=nullptr)
HSV → RGB (inverse of rgb2hsv).
Value deltaE(const Value &I1, const Value &I2, bool isInputLab, std::pmr::memory_resource *mr=nullptr)
CIE76 colour difference (delE = deltaE(I1, I2, isInputLab)).
std::pair< Value, Value > cmunique_xm(const Value &X, const Value &MAP, std::pmr::memory_resource *mr=nullptr)
Eliminate duplicate colors in colormap; convert grayscale or RGB to indexed ([Y, newmap] = cmunique(....
Value xyz2rgbwide(const Value &XYZ, int bits_per_sample, const std::string &color_space, const std::string &linearization, std::pmr::memory_resource *mr=nullptr)
CIE 1931 XYZ → narrow-range wide-gamut RGB (RGB = xyz2rgbwide(XYZ, BPS, ...)).