/*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*/
#ifndef OPENCV_CORE_C_H
#define OPENCV_CORE_C_H
#include "opencv2/core/types_c.h"
#ifdef __cplusplus
# ifdef _MSC_VER
/* disable warning C4190: 'function' has C-linkage specified, but returns UDT 'typename'
which is incompatible with C
It is OK to disable it because we only extend few plain structures with
C++ constructors for simpler interoperability with C++ API of the library
*/
# pragma warning(disable:4190)
# elif defined __clang__ && __clang_major__ >= 3
# pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/** @addtogroup core_c
@{
*/
/****************************************************************************************\
* Array allocation, deallocation, initialization and access to elements *
\****************************************************************************************/
/** `malloc` wrapper.
If there is no enough memory, the function
(as well as other OpenCV functions that call cvAlloc)
raises an error. */
CVAPI(void*) cvAlloc( size_t size );
/** `free` wrapper.
Here and further all the memory releasing functions
(that all call cvFree) take double pointer in order to
to clear pointer to the data after releasing it.
Passing pointer to NULL pointer is Ok: nothing happens in this case
*/
CVAPI(void) cvFree_( void* ptr );
#define cvFree(ptr) (cvFree_(*(ptr)), *(ptr)=0)
/** @brief Creates an image header but does not allocate the image data.
@param size Image width and height
@param depth Image depth (see cvCreateImage )
@param channels Number of channels (see cvCreateImage )
*/
CVAPI(IplImage*) cvCreateImageHeader( CvSize size, int depth, int channels );
/** @brief Initializes an image header that was previously allocated.
The returned IplImage\* points to the initialized header.
@param image Image header to initialize
@param size Image width and height
@param depth Image depth (see cvCreateImage )
@param channels Number of channels (see cvCreateImage )
@param origin Top-left IPL_ORIGIN_TL or bottom-left IPL_ORIGIN_BL
@param align Alignment for image rows, typically 4 or 8 bytes
*/
CVAPI(IplImage*) cvInitImageHeader( IplImage* image, CvSize size, int depth,
int channels, int origin CV_DEFAULT(0),
int align CV_DEFAULT(4));
/** @brief Creates an image header and allocates the image data.
This function call is equivalent to the following code:
@code
header = cvCreateImageHeader(size, depth, channels);
cvCreateData(header);
@endcode
@param size Image width and height
@param depth Bit depth of image elements. See IplImage for valid depths.
@param channels Number of channels per pixel. See IplImage for details. This function only creates
images with interleaved channels.
*/
CVAPI(IplImage*) cvCreateImage( CvSize size, int depth, int channels );
/** @brief Deallocates an image header.
This call is an analogue of :
@code
if(image )
{
iplDeallocate(*image, IPL_IMAGE_HEADER | IPL_IMAGE_ROI);
*image = 0;
}
@endcode
but it does not use IPL functions by default (see the CV_TURN_ON_IPL_COMPATIBILITY macro).
@param image Double pointer to the image header
*/
CVAPI(void) cvReleaseImageHeader( IplImage** image );
/** @brief Deallocates the image header and the image data.
This call is a shortened form of :
@code
if(*image )
{
cvReleaseData(*image);
cvReleaseImageHeader(image);
}
@endcode
@param image Double pointer to the image header
*/
CVAPI(void) cvReleaseImage( IplImage** image );
/** Creates a copy of IPL image (widthStep may differ) */
CVAPI(IplImage*) cvCloneImage( const IplImage* image );
/** @brief Sets the channel of interest in an IplImage.
If the ROI is set to NULL and the coi is *not* 0, the ROI is allocated. Most OpenCV functions do
*not* support the COI setting, so to process an individual image/matrix channel one may copy (via
cvCopy or cvSplit) the channel to a separate image/matrix, process it and then copy the result
back (via cvCopy or cvMerge) if needed.
@param image A pointer to the image header
@param coi The channel of interest. 0 - all channels are selected, 1 - first channel is selected,
etc. Note that the channel indices become 1-based.
*/
CVAPI(void) cvSetImageCOI( IplImage* image, int coi );
/** @brief Returns the index of the channel of interest.
Returns the channel of interest of in an IplImage. Returned values correspond to the coi in
cvSetImageCOI.
@param image A pointer to the image header
*/
CVAPI(int) cvGetImageCOI( const IplImage* image );
/** @brief Sets an image Region Of Interest (ROI) for a given rectangle.
If the original image ROI was NULL and the rect is not the whole image, the ROI structure is
allocated.
Most OpenCV functions support the use of ROI and treat the image rectangle as a separate image. For
example, all of the pixel coordinates are counted from the top-left (or bottom-left) corner of the
ROI, not the original image.
@param image A pointer to the image header
@param rect The ROI rectangle
*/
CVAPI(void) cvSetImageROI( IplImage* image, CvRect rect );
/** @brief Resets the image ROI to include the entire image and releases the ROI structure.
This produces a similar result to the following, but in addition it releases the ROI structure. :
@code
cvSetImageROI(image, cvRect(0, 0, image->width, image->height ));
cvSetImageCOI(image, 0);
@endcode
@param image A pointer to the image header
*/
CVAPI(void)
opencv4.5.4 release and debug版库,亲测好用
需积分: 0 87 浏览量
更新于2023-07-08
收藏 156.76MB ZIP 举报
OpenCV(开源计算机视觉库)是一个强大的跨平台计算机视觉库,包含了众多图像处理和计算机视觉的算法。在标题和描述中提到的"opencv4.5.4 release and debug版库",指的是OpenCV的4.5.4版本,这个版本包含了用于不同编译配置的库文件,包括Release和Debug模式。
在软件开发中,Release版本的库是经过优化的,旨在提供最快的运行速度,通常用于部署到生产环境。而Debug版本的库则包含额外的信息,用于调试代码,它允许开发者更容易地定位程序中的错误。这两种版本的库在开发过程中都十分关键。
OpenCV 4.5.4的更新可能包括性能提升、新功能的添加、已知问题的修复以及对最新硬件和软件平台的支持。例如,它可能增加了对新的人脸识别模型、目标检测算法或者深度学习模块的改进。此外,OpenCV 4.5.4可能优化了多线程处理,提升了在高并发场景下的处理效率。
在使用OpenCV时,开发人员首先需要将库文件添加到项目的依赖中。对于C++项目,这通常涉及到设置头文件路径和库链接。Release版本用于编译最终的可执行文件,而Debug版本则用于开发和调试阶段。在CMakeLists.txt或Visual Studio项目设置中,可以切换使用哪种版本的库。
OpenCV支持多种编程语言,如C++、Python、Java等,提供了丰富的API供开发者调用。其核心功能包括图像读取与写入、基本图像操作(如滤波、边缘检测)、颜色空间转换、几何变换、特征检测与匹配、物体检测、人脸识别、视频处理、图像拼接、机器学习和深度学习等。
在使用OpenCV进行图像处理时,比如进行边缘检测,我们可以使用Canny、Sobel或Laplacian等经典算法。对于深度学习,OpenCV集成了DNN模块,可以加载预训练的TensorFlow、Caffe或ONNX模型进行图像分类、目标检测等任务。
OpenCV是一个功能强大的工具,广泛应用于图像分析、计算机视觉研究和开发中。4.5.4版本的发布意味着用户可以获得最新的功能和改进,同时针对Release和Debug两种模式的库文件提供,使得开发和调试过程更加便捷。无论是初学者还是经验丰富的开发者,OpenCV都是一个不可或缺的资源。
小小小代码
- 粉丝: 1
- 资源: 5
最新资源
- 白色大气风格的摇滚音乐网站模板下载.zip
- 白色大气风格的医疗公司模板下载.zip
- 白色大气风格的医院网站模板下载.zip
- 白色大气风格的医疗设备企业网站模板.zip
- 白色大气风格的医院网页模板下载.zip
- 白色大气风格的英文网站模板下载.zip
- 白色大气风格的医院医疗网站模板下载.zip
- 白色大气风格的移动设备APP官网模板下载.zip
- 白色大气风格的有机小麦种植业网站模板下载.zip
- 白色大气风格的游泳体育竞技网站模板下载.zip
- 白色大气风格的影视传媒公司企业网站源码下载.zip
- 白色大气风格的中国教学教育网站模板下载.zip
- 白色大气风格的运动鞋销售网站模板下载.zip
- 白色大气风格的重工业公司模板下载.zip
- 白色大气风格的珠宝首饰网站模板下载.zip
- 白色大气风格的珠宝首饰官网整站网站源码下载.zip