HighMap library (C++)
Loading...
Searching...
No Matches
opencv.hpp
Go to the documentation of this file.
1/* Copyright (c) 2023 Otto Link. Distributed under the terms of the GNU General
2 Public License. The full license is in the file LICENSE, distributed with
3 this software. */
4
11#pragma once
12
13#include <string>
14
15#include <opencv2/core.hpp>
16
17#include "highmap/array.hpp"
18
19namespace hmap
20{
21
26Array cv_mat_to_array(const cv::Mat &mat,
27 bool remap_values = true,
28 bool flip_j = false);
29
34
38cv::Mat to_cv_mat(Array &array);
39
40} // namespace hmap
Declaration of the Array class for 2D floating-point arrays with various mathematical operations and ...
Array class, helper to manipulate 2D float array with "(i, j)" indexing.
Definition array.hpp:31
Definition opencv.hpp:20
Array cv_mat_to_array(const cv::Mat &mat, bool remap_values=true, bool flip_j=false)
Converts an OpenCV cv::Mat to a 2D Array with optional value scaling to [0, 1].
Definition opencv_wrapper.cpp:37
std::string get_opencv_build_information()
Returns OpenCV build information string.
Definition opencv_wrapper.cpp:59
cv::Mat to_cv_mat(Array &array)
Converts a 2D Array to a non-owning OpenCV cv::Mat (CV_32FC1).
Definition opencv_wrapper.cpp:19