Image type-conversion helpers. More...
#include <limits>#include <memory_resource>#include <string>#include <tuple>#include <nk/value/value.hpp>Go to the source code of this file.
Functions | |
| Value | nk::image::im2double (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Convert to DOUBLE in [0, 1] (B = im2double(A)). | |
| Value | nk::image::im2single (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Convert to SINGLE in [0, 1] (B = im2single(A)). | |
| Value | nk::image::im2uint8 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Convert to UINT8 (B = im2uint8(A)). | |
| Value | nk::image::im2uint16 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Convert to UINT16 (B = im2uint16(A)). | |
| Value | nk::image::im2int16 (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Convert to INT16 (B = im2int16(A)). | |
| Value | nk::image::mat2gray (const Value &x, double lo=std::numeric_limits< double >::quiet_NaN(), double hi=std::numeric_limits< double >::quiet_NaN(), std::pmr::memory_resource *mr=nullptr) |
| Linear rescale to [0, 1] DOUBLE (B = mat2gray(A, lo, hi)). | |
| Value | nk::image::im2gray (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| RGB → grayscale dispatcher (Y = im2gray(X)). | |
| Value | nk::image::rgb2gray (const Value &x, std::pmr::memory_resource *mr=nullptr) |
| Rec. | |
| Value | nk::image::getrangefromclass (const Value &I, std::pmr::memory_resource *mr=nullptr) |
| Class display range (r = getrangefromclass(I)). | |
| std::tuple< Value, Value > | nk::image::gray2ind (const Value &I, int n, std::pmr::memory_resource *mr=nullptr) |
| Grayscale → indexed ([ind, map] = gray2ind(I, n)). | |
| Value | nk::image::ind2gray (const Value &idx, const Value &map, std::pmr::memory_resource *mr=nullptr) |
| Indexed → grayscale (I = ind2gray(idx, map)). | |
| Value | nk::image::ind2rgb (const Value &idx, const Value &map, std::pmr::memory_resource *mr=nullptr) |
| Indexed → RGB (RGB = ind2rgb(idx, map)). | |
| Value | nk::image::iptnum2ordinal (double n, std::pmr::memory_resource *mr=nullptr) |
| English ordinal-form string (s = iptnum2ordinal(n)). | |
| Value | nk::image::imcast (const Value &I, const std::string &type, std::pmr::memory_resource *mr=nullptr) |
| Generic class converter (B = imcast(I, type)). | |
| Value | nk::image::isbw (const Value &BW, const std::string &mode, std::pmr::memory_resource *mr=nullptr) |
| Binary-image predicate (tf = isbw(BW, mode)). | |
| Value | nk::image::isgray (const Value &I, std::pmr::memory_resource *mr=nullptr) |
| Grayscale-image predicate (tf = isgray(I)). | |
| Value | nk::image::isind (const Value &I, std::pmr::memory_resource *mr=nullptr) |
| Indexed-image predicate (tf = isind(I)). | |
| Value | nk::image::isrgb (const Value &I, std::pmr::memory_resource *mr=nullptr) |
| RGB-image predicate (tf = isrgb(I)). | |
| Value | nk::image::iscolormap (const Value &cmap, std::pmr::memory_resource *mr=nullptr) |
| Colormap-shape predicate (tf = iscolormap(cmap)). | |
| Value | nk::image::intlut (const Value &A, const Value &LUT, std::pmr::memory_resource *mr=nullptr) |
| Apply a look-up table to an integer image (B = intlut(A, LUT)). | |
Image type-conversion helpers.
Scaling conventions:
Definition in file type_convert.hpp.