/*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
/* disable MSVC warning C4190 / clang-cl -Wreturn-type-c-linkage:
'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
*/
# if defined(__clang__)
// handle clang on Linux and clang-cl (i. e. clang on Windows) first
# pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
# elif defined(_MSC_VER)
// then handle MSVC
# pragma warning(disable:4190)
# 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) cvResetImageROI( IplImage* image );
/** @brief Returns the image ROI.
If there is no R
人才程序员
- 粉丝: 3w+
- 资源: 31
最新资源
- 运输工具检测17-YOLO(v5至v9)、COCO、CreateML、Paligemma、TFRecord数据集合集.rar
- 西门子V90效率倍增-伺服驱动功能库详解-简易非循环功能库之绝对值编码器校准.mp4
- COMSOL 远场偏振通用计算方法,包含远场偏振图,能带,matlab 程序 展示包含仿真文件截图,所见即所得
- MATLAB基础知识到高级应用全面介绍
- 配电网有功电压控制的多智能体强化学习(代码) 针对电压主动控制问题的不同场景,采用7种最先进的MARL算法进行了大规模实验,将电压约束转化为势垒函数,并从实验结果中观察到设计合适的电压势垒函数的重要性
- PLC立体车库智能仿真 博途V15 3×2立体车库 西门子1200PLC 触摸屏仿真 不需要实物 自带人机界面 小车上下行有电梯效果 每一个程序段都有注释 FC块标准化编写 自带变频器输出也可以仿真
- 运输工具检测20-YOLO(v5至v9)、COCO、CreateML、Darknet、Paligemma、TFRecord数据集合集.rar
- Fortran语言全面教程:从基础语法到高级特性
- comsol电树枝,电击穿
- 基于条件风险价值CVaR的微网 电厂多场景随机规划 摘要:构建了含风、光、燃、储的微网 电厂优化调度模型,在此基础上,考虑多个风光出力场景,构建了微网随机优化调度模型,并在此基础上,基于条件风险价值理
- agv 1221.fbx111
- Kotlin编程语言基础教程与高级特性实践
- 燃料电池功率跟随cruise仿真模型 此模型基于Cruise2019版及Matlab2018a搭建调试而成,跟随效果很好,任务仿真结束起始soc几乎相同 控制模型主要包括燃料堆控制、DCDC控制
- 飞机、桥、人、游泳池、车辆、风车检测13-YOLO(v5至v9)、COCO、CreateML、Darknet、Paligemma、TFRecord、VOC数据集合集.rar
- 基于LQR最优控制算法实现的轨迹跟踪控制,建立了基于车辆的质心侧偏角、横摆角速度,横向误差,航向误差四自由度动力学模型作为控制模型,通过最优化航向误差和横向误差,实时计算最优的K值,计算期望的前轮转角
- 北京大学 博士研究生申请汇报答辩.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈