vendor: OpenCV 5.0.0 snapshot at 40738fb16ceddb5fb3fea747585f7ce6abb0605b
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,54 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#ifndef OPENCV_IMGPROC_BINDINGS_HPP
|
||||
#define OPENCV_IMGPROC_BINDINGS_HPP
|
||||
|
||||
// This file contains special overloads for OpenCV bindings
|
||||
// No need to use these functions in C++ code.
|
||||
|
||||
namespace cv {
|
||||
|
||||
/** @brief Finds lines in a binary image using the standard Hough transform and get accumulator.
|
||||
*
|
||||
* @note This function is for bindings use only. Use original function in C++ code
|
||||
*
|
||||
* @sa HoughLines
|
||||
*/
|
||||
CV_WRAP static inline
|
||||
void HoughLinesWithAccumulator(
|
||||
InputArray image, OutputArray lines,
|
||||
double rho, double theta, int threshold,
|
||||
double srn = 0, double stn = 0,
|
||||
double min_theta = 0, double max_theta = CV_PI,
|
||||
bool use_edgeval = false
|
||||
)
|
||||
{
|
||||
std::vector<Vec3f> lines_acc;
|
||||
HoughLines(image, lines_acc, rho, theta, threshold, srn, stn, min_theta, max_theta, use_edgeval);
|
||||
Mat(lines_acc).copyTo(lines);
|
||||
}
|
||||
|
||||
/** @brief Finds circles in a grayscale image using the Hough transform and get accumulator.
|
||||
*
|
||||
* @note This function is for bindings use only. Use original function in C++ code
|
||||
*
|
||||
* @sa HoughCircles
|
||||
*/
|
||||
CV_WRAP static inline
|
||||
void HoughCirclesWithAccumulator(
|
||||
InputArray image, OutputArray circles,
|
||||
int method, double dp, double minDist,
|
||||
double param1 = 100, double param2 = 100,
|
||||
int minRadius = 0, int maxRadius = 0
|
||||
)
|
||||
{
|
||||
std::vector<Vec4f> circles_acc;
|
||||
HoughCircles(image, circles_acc, method, dp, minDist, param1, param2, minRadius, maxRadius);
|
||||
Mat(1, static_cast<int>(circles_acc.size()), CV_32FC4, &circles_acc.front()).copyTo(circles);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // OPENCV_IMGPROC_BINDINGS_HPP
|
||||
@@ -0,0 +1,269 @@
|
||||
#ifndef CV_IMGPROC_HAL_HPP
|
||||
#define CV_IMGPROC_HAL_HPP
|
||||
|
||||
#include "opencv2/core/cvdef.h"
|
||||
#include "opencv2/core/cvstd.hpp"
|
||||
#include "opencv2/core/utility.hpp"
|
||||
#include "opencv2/core/hal/interface.h"
|
||||
|
||||
namespace cv { namespace hal {
|
||||
|
||||
//! @addtogroup imgproc_hal_functions
|
||||
//! @{
|
||||
|
||||
//---------------------------
|
||||
//! @cond IGNORED
|
||||
|
||||
struct CV_EXPORTS Filter2D
|
||||
{
|
||||
CV_DEPRECATED static Ptr<hal::Filter2D> create(uchar * , size_t , int ,
|
||||
int , int ,
|
||||
int , int ,
|
||||
int , int ,
|
||||
int , double ,
|
||||
int , int ,
|
||||
bool , bool );
|
||||
virtual void apply(uchar * , size_t ,
|
||||
uchar * , size_t ,
|
||||
int , int ,
|
||||
int , int ,
|
||||
int , int ) = 0;
|
||||
virtual ~Filter2D() {}
|
||||
};
|
||||
|
||||
struct CV_EXPORTS SepFilter2D
|
||||
{
|
||||
CV_DEPRECATED static Ptr<hal::SepFilter2D> create(int , int , int ,
|
||||
uchar * , int ,
|
||||
uchar * , int ,
|
||||
int , int ,
|
||||
double , int );
|
||||
virtual void apply(uchar * , size_t ,
|
||||
uchar * , size_t ,
|
||||
int , int ,
|
||||
int , int ,
|
||||
int , int ) = 0;
|
||||
virtual ~SepFilter2D() {}
|
||||
};
|
||||
|
||||
|
||||
struct CV_EXPORTS Morph
|
||||
{
|
||||
CV_DEPRECATED static Ptr<hal::Morph> create(int , int , int , int , int ,
|
||||
int , uchar * , size_t ,
|
||||
int , int ,
|
||||
int , int ,
|
||||
int , const double *,
|
||||
int , bool , bool );
|
||||
virtual void apply(uchar * , size_t , uchar * , size_t , int , int ,
|
||||
int , int , int , int ,
|
||||
int , int , int , int ) = 0;
|
||||
virtual ~Morph() {}
|
||||
};
|
||||
|
||||
//! @endcond
|
||||
//---------------------------
|
||||
|
||||
CV_EXPORTS void filter2D(int stype, int dtype, int kernel_type,
|
||||
uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int full_width, int full_height,
|
||||
int offset_x, int offset_y,
|
||||
uchar * kernel_data, size_t kernel_step,
|
||||
int kernel_width, int kernel_height,
|
||||
int anchor_x, int anchor_y,
|
||||
double delta, int borderType,
|
||||
bool isSubmatrix);
|
||||
|
||||
CV_EXPORTS void sepFilter2D(int stype, int dtype, int ktype,
|
||||
uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int full_width, int full_height,
|
||||
int offset_x, int offset_y,
|
||||
uchar * kernelx_data, int kernelx_len,
|
||||
uchar * kernely_data, int kernely_len,
|
||||
int anchor_x, int anchor_y,
|
||||
double delta, int borderType);
|
||||
|
||||
CV_EXPORTS void morph(int op, int src_type, int dst_type,
|
||||
uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int roi_width, int roi_height, int roi_x, int roi_y,
|
||||
int roi_width2, int roi_height2, int roi_x2, int roi_y2,
|
||||
int kernel_type, uchar * kernel_data, size_t kernel_step,
|
||||
int kernel_width, int kernel_height, int anchor_x, int anchor_y,
|
||||
int borderType, const double borderValue[4],
|
||||
int iterations, bool isSubmatrix);
|
||||
|
||||
|
||||
CV_EXPORTS void resize(int src_type,
|
||||
const uchar * src_data, size_t src_step, int src_width, int src_height,
|
||||
uchar * dst_data, size_t dst_step, int dst_width, int dst_height,
|
||||
double inv_scale_x, double inv_scale_y, int interpolation);
|
||||
|
||||
CV_EXPORTS void warpAffine(int src_type,
|
||||
const uchar * src_data, size_t src_step, int src_width, int src_height,
|
||||
uchar * dst_data, size_t dst_step, int dst_width, int dst_height,
|
||||
const double M[6], int interpolation, int borderType, const double borderValue[4]);
|
||||
|
||||
CV_EXPORTS void warpAffineBlocklineNN(int *adelta, int *bdelta, short* xy, int X0, int Y0, int bw);
|
||||
|
||||
CV_EXPORTS void warpAffineBlockline(int *adelta, int *bdelta, short* xy, short* alpha, int X0, int Y0, int bw);
|
||||
|
||||
CV_EXPORTS void warpPerspective(int src_type,
|
||||
const uchar * src_data, size_t src_step, int src_width, int src_height,
|
||||
uchar * dst_data, size_t dst_step, int dst_width, int dst_height,
|
||||
const double M[9], int interpolation, int borderType, const double borderValue[4]);
|
||||
|
||||
CV_EXPORTS void warpPerspectiveBlocklineNN(const double *M, short* xy, double X0, double Y0, double W0, int bw);
|
||||
|
||||
CV_EXPORTS void warpPerspectiveBlockline(const double *M, short* xy, short* alpha, double X0, double Y0, double W0, int bw);
|
||||
|
||||
CV_EXPORTS void cvtBGRtoBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int scn, int dcn, bool swapBlue);
|
||||
|
||||
CV_EXPORTS void cvtBGRtoBGR5x5(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int scn, bool swapBlue, int greenBits);
|
||||
|
||||
CV_EXPORTS void cvtBGR5x5toBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int dcn, bool swapBlue, int greenBits);
|
||||
|
||||
CV_EXPORTS void cvtBGRtoGray(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int scn, bool swapBlue);
|
||||
|
||||
CV_EXPORTS void cvtGraytoBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int dcn);
|
||||
|
||||
CV_EXPORTS void cvtBGR5x5toGray(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int greenBits);
|
||||
|
||||
CV_EXPORTS void cvtGraytoBGR5x5(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int greenBits);
|
||||
CV_EXPORTS void cvtBGRtoYUV(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int scn, bool swapBlue, bool isCbCr,
|
||||
AlgorithmHint hint = ALGO_HINT_DEFAULT);
|
||||
|
||||
CV_EXPORTS void cvtYUVtoBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int dcn, bool swapBlue, bool isCbCr,
|
||||
AlgorithmHint hint = ALGO_HINT_DEFAULT);
|
||||
|
||||
CV_EXPORTS void cvtBGRtoXYZ(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int scn, bool swapBlue);
|
||||
|
||||
CV_EXPORTS void cvtXYZtoBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int dcn, bool swapBlue);
|
||||
|
||||
CV_EXPORTS void cvtBGRtoHSV(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int scn, bool swapBlue, bool isFullRange, bool isHSV);
|
||||
|
||||
CV_EXPORTS void cvtHSVtoBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int dcn, bool swapBlue, bool isFullRange, bool isHSV);
|
||||
|
||||
CV_EXPORTS void cvtBGRtoLab(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int scn, bool swapBlue, bool isLab, bool srgb);
|
||||
|
||||
CV_EXPORTS void cvtLabtoBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int depth, int dcn, bool swapBlue, bool isLab, bool srgb);
|
||||
|
||||
CV_EXPORTS void cvtTwoPlaneYUVtoBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int dst_width, int dst_height,
|
||||
int dcn, bool swapBlue, int uIdx,
|
||||
AlgorithmHint hint = ALGO_HINT_DEFAULT);
|
||||
|
||||
//! Separate Y and UV planes
|
||||
CV_EXPORTS void cvtTwoPlaneYUVtoBGR(const uchar * y_data, const uchar * uv_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int dst_width, int dst_height,
|
||||
int dcn, bool swapBlue, int uIdx,
|
||||
AlgorithmHint hint = ALGO_HINT_DEFAULT);
|
||||
|
||||
CV_EXPORTS void cvtTwoPlaneYUVtoBGR(const uchar * y_data, size_t y_step, const uchar * uv_data, size_t uv_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int dst_width, int dst_height,
|
||||
int dcn, bool swapBlue, int uIdx,
|
||||
AlgorithmHint hint = ALGO_HINT_DEFAULT);
|
||||
|
||||
CV_EXPORTS void cvtThreePlaneYUVtoBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int dst_width, int dst_height,
|
||||
int dcn, bool swapBlue, int uIdx,
|
||||
AlgorithmHint hint = ALGO_HINT_DEFAULT);
|
||||
|
||||
CV_EXPORTS void cvtBGRtoThreePlaneYUV(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int scn, bool swapBlue, int uIdx,
|
||||
AlgorithmHint hint = ALGO_HINT_DEFAULT);
|
||||
|
||||
//! Separate Y and UV planes
|
||||
CV_EXPORTS void cvtBGRtoTwoPlaneYUV(const uchar * src_data, size_t src_step,
|
||||
uchar * y_data, uchar * uv_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int scn, bool swapBlue, int uIdx);
|
||||
|
||||
CV_EXPORTS void cvtOnePlaneYUVtoBGR(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int dcn, bool swapBlue, int uIdx, int ycn,
|
||||
AlgorithmHint hint = ALGO_HINT_DEFAULT);
|
||||
|
||||
CV_EXPORTS void cvtOnePlaneBGRtoYUV(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height,
|
||||
int scn, bool swapBlue, int uIdx, int ycn,
|
||||
AlgorithmHint hint = ALGO_HINT_DEFAULT);
|
||||
|
||||
CV_EXPORTS void cvtRGBAtoMultipliedRGBA(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height);
|
||||
|
||||
CV_EXPORTS void cvtMultipliedRGBAtoRGBA(const uchar * src_data, size_t src_step,
|
||||
uchar * dst_data, size_t dst_step,
|
||||
int width, int height);
|
||||
|
||||
CV_EXPORTS void integral(int depth, int sdepth, int sqdepth,
|
||||
const uchar* src, size_t srcstep,
|
||||
uchar* sum, size_t sumstep,
|
||||
uchar* sqsum, size_t sqsumstep,
|
||||
uchar* tilted, size_t tstep,
|
||||
int width, int height, int cn);
|
||||
|
||||
//! @}
|
||||
|
||||
}}
|
||||
|
||||
#endif // CV_IMGPROC_HAL_HPP
|
||||
@@ -0,0 +1,52 @@
|
||||
#ifndef OPENCV_IMGPROC_HAL_INTERFACE_H
|
||||
#define OPENCV_IMGPROC_HAL_INTERFACE_H
|
||||
|
||||
//! @addtogroup imgproc_hal_interface
|
||||
//! @{
|
||||
|
||||
//! @name Interpolation modes
|
||||
//! @sa cv::InterpolationFlags
|
||||
//! @{
|
||||
#define CV_HAL_INTER_NEAREST 0
|
||||
#define CV_HAL_INTER_LINEAR 1
|
||||
#define CV_HAL_INTER_CUBIC 2
|
||||
#define CV_HAL_INTER_AREA 3
|
||||
#define CV_HAL_INTER_LANCZOS4 4
|
||||
#define CV_HAL_INTER_LINEAR_EXACT 5
|
||||
#define CV_HAL_INTER_NEAREST_EXACT 6
|
||||
#define CV_HAL_INTER_MAX 7
|
||||
#define CV_HAL_WARP_FILL_OUTLIERS 8
|
||||
#define CV_HAL_WARP_INVERSE_MAP 16
|
||||
#define CV_HAL_WARP_RELATIVE_MAP 32
|
||||
//! @}
|
||||
|
||||
//! @name Morphology operations
|
||||
//! @sa cv::MorphTypes
|
||||
//! @{
|
||||
#define CV_HAL_MORPH_ERODE 0
|
||||
#define CV_HAL_MORPH_DILATE 1
|
||||
//! @}
|
||||
|
||||
//! @name Threshold types
|
||||
//! @sa cv::ThresholdTypes
|
||||
//! @{
|
||||
#define CV_HAL_THRESH_BINARY 0
|
||||
#define CV_HAL_THRESH_BINARY_INV 1
|
||||
#define CV_HAL_THRESH_TRUNC 2
|
||||
#define CV_HAL_THRESH_TOZERO 3
|
||||
#define CV_HAL_THRESH_TOZERO_INV 4
|
||||
#define CV_HAL_THRESH_MASK 7
|
||||
#define CV_HAL_THRESH_OTSU 8
|
||||
#define CV_HAL_THRESH_TRIANGLE 16
|
||||
//! @}
|
||||
|
||||
//! @name Adaptive threshold algorithm
|
||||
//! @sa cv::AdaptiveThresholdTypes
|
||||
//! @{
|
||||
#define CV_HAL_ADAPTIVE_THRESH_MEAN_C 0
|
||||
#define CV_HAL_ADAPTIVE_THRESH_GAUSSIAN_C 1
|
||||
//! @}
|
||||
|
||||
//! @}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,48 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// * The name of the copyright holders may not be used to endorse or promote products
|
||||
// derived from this software without specific prior written permission.
|
||||
//
|
||||
// This software is provided by the copyright holders and contributors "as is" and
|
||||
// any express or implied warranties, including, but not limited to, the implied
|
||||
// warranties of merchantability and fitness for a particular purpose are disclaimed.
|
||||
// In no event shall the Intel Corporation or contributors be liable for any direct,
|
||||
// indirect, incidental, special, exemplary, or consequential damages
|
||||
// (including, but not limited to, procurement of substitute goods or services;
|
||||
// loss of use, data, or profits; or business interruption) however caused
|
||||
// and on any theory of liability, whether in contract, strict liability,
|
||||
// or tort (including negligence or otherwise) arising in any way out of
|
||||
// the use of this software, even if advised of the possibility of such damage.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifdef __OPENCV_BUILD
|
||||
#error this is a compatibility header which should not be used inside the OpenCV library
|
||||
#endif
|
||||
|
||||
#include "opencv2/imgproc.hpp"
|
||||
Reference in New Issue
Block a user