nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
toolboxes/image/include/nk/image/object/object.hpp
Go to the documentation of this file.
1
3// toolboxes/image/include/nk/image/object/object.hpp
4//
5// Object analysis: gradient / edge detection.
6
7#pragma once
8
9#include <memory_resource>
10#include <nk/value/value.hpp>
11
12#include <string>
13#include <tuple>
14
15namespace nk::image {
16
19
20
41std::tuple<Value, Value>
42imgradientxy(const Value &I, const std::string &method,
43 std::pmr::memory_resource *mr = nullptr);
44
54std::tuple<Value, Value>
55imgradient(const Value &I, const std::string &method,
56 std::pmr::memory_resource *mr = nullptr);
57
76std::tuple<Value, Value, Value>
77imgradientxyz(const Value &V, const std::string &method,
78 std::pmr::memory_resource *mr = nullptr);
79
93std::tuple<Value, Value, Value>
94imgradient3(const Value &V, const std::string &method,
95 std::pmr::memory_resource *mr = nullptr);
96std::tuple<Value, Value, Value>
97imgradient3_from_grads(const Value &Gx, const Value &Gy, const Value &Gz,
98 std::pmr::memory_resource *mr = nullptr);
99
125Value edge(const Value &I, const std::string &method,
126 double thresh_lo, double thresh_hi,
127 std::pmr::memory_resource *mr = nullptr);
128
166Value cornermetric(const Value &I, const std::string &method,
167 double sensitivity_factor,
168 const Value &filter_coef,
169 std::pmr::memory_resource *mr = nullptr);
170
189Value corner(const Value &I, const std::string &method, int maxN,
190 double quality_level, double sensitivity,
191 const Value &filter_coef,
192 std::pmr::memory_resource *mr = nullptr);
193
219void hough(const Value &BW, double rho_res,
220 const Value &theta_deg,
221 Value &H_out, Value &T_out, Value &R_out,
222 std::pmr::memory_resource *mr = nullptr);
223
254Value houghpeaks(const Value &H, std::size_t numpeaks,
255 double threshold,
256 std::size_t nhoodRho, std::size_t nhoodTheta,
257 const Value &theta_deg,
258 std::pmr::memory_resource *mr = nullptr);
259
288Value houghlines(const Value &BW, const Value &theta_deg,
289 const Value &rho, const Value &peaks,
290 double fillgap, double minlength,
291 std::pmr::memory_resource *mr = nullptr);
292
293
295} // namespace nk::image
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
std::tuple< Value, Value, Value > imgradient3(const Value &V, const std::string &method, std::pmr::memory_resource *mr=nullptr)
3-D gradient magnitude + spherical direction ([Gmag, Gaz, Gelev] = imgradient3(V, method) or (Gx,...
Value cornermetric(const Value &I, const std::string &method, double sensitivity_factor, const Value &filter_coef, std::pmr::memory_resource *mr=nullptr)
Corner metric matrix (C = cornermetric(I, method, ...)).
Value houghlines(const Value &BW, const Value &theta_deg, const Value &rho, const Value &peaks, double fillgap, double minlength, std::pmr::memory_resource *mr=nullptr)
Extract line segments from Hough-transform peaks (lines = houghlines(BW, theta, rho,...
Value edge(const Value &I, const std::string &method, double thresh_lo, double thresh_hi, std::pmr::memory_resource *mr=nullptr)
Binary edge map (BW = edge(I, method, thresh_lo, thresh_hi)).
std::tuple< Value, Value, Value > imgradientxyz(const Value &V, const std::string &method, std::pmr::memory_resource *mr=nullptr)
3-D component gradients ([Gx, Gy, Gz] = imgradientxyz(V, method)).
std::tuple< Value, Value > imgradient(const Value &I, const std::string &method, std::pmr::memory_resource *mr=nullptr)
Gradient magnitude and direction ([Gmag, Gdir] = imgradient(I, method)).
Value corner(const Value &I, const std::string &method, int maxN, double quality_level, double sensitivity, const Value &filter_coef, std::pmr::memory_resource *mr=nullptr)
Detect corner points (C = corner(I, ...)).
std::tuple< Value, Value > imgradientxy(const Value &I, const std::string &method, std::pmr::memory_resource *mr=nullptr)
Component gradients ([Gx, Gy] = imgradientxy(I, method)).
Value houghpeaks(const Value &H, std::size_t numpeaks, double threshold, std::size_t nhoodRho, std::size_t nhoodTheta, const Value &theta_deg, std::pmr::memory_resource *mr=nullptr)
Find peaks in a Hough-transform accumulator (P = houghpeaks(H, NumPeaks, ...)).
void hough(const Value &BW, double rho_res, const Value &theta_deg, Value &H_out, Value &T_out, Value &R_out, std::pmr::memory_resource *mr=nullptr)
Standard Hough transform ([H, T, R] = hough(BW, ...)).