资源简介
1、详情看博客http://blog.csdn.net/raby_gyl/article/details/12450885

代码片段和文件信息
//------------------------------------------------------------------------------
// Graphing functions for OpenCV. Part of “ImageUtils.cpp“ a set of handy utility functions for dealing with images in OpenCV.
// by Shervin Emami (http://www.shervinemami.co.cc/) on 20th May 2010.
//------------------------------------------------------------------------------
#define USE_HIGHGUI // Enable this to display graph windows using OpenCV‘s HighGUI. (Supports Windows Linux & Mac but not iPhone).
#include
#include
//#include
// OpenCV
#include
#include
#ifdef USE_HIGHGUI
#include
#endif
#ifndef UCHAR
typedef unsigned char UCHAR;
#endif
#include “GraphUtils.h“
//------------------------------------------------------------------------------
// Graphing functions
//------------------------------------------------------------------------------
const CvScalar BLACK = CV_RGB(000);
const CvScalar WHITE = CV_RGB(255255255);
const CvScalar GREY = CV_RGB(150150150);
int countGraph = 0; // Used by ‘getGraphColor()‘
CvScalar customGraphColor;
int usingCustomGraphColor = 0;
// Get a new color to draw graphs. Will use the latest custom color or change between blue green red dark-blue dark-green and dark-red until a new image is created.
CvScalar getGraphColor(void)
{
if (usingCustomGraphColor) {
usingCustomGraphColor = 0;
return customGraphColor;
}
countGraph++;
switch (countGraph) {
case 1: return CV_RGB(6060255); // light-blue
case 2: return CV_RGB(6025560); // light-green
case 3: return CV_RGB(2556040); // light-red
case 4: return CV_RGB(0210210); // blue-green
case 5: return CV_RGB(1802100); // red-green
case 6: return CV_RGB(2100180); // red-blue
case 7: return CV_RGB(00185); // dark-blue
case 8: return CV_RGB(01850); // dark-green
case 9: return CV_RGB(18500); // dark-red
default:
countGraph = 0; // start rotating through colors again.
return CV_RGB(200200200); // grey
}
}
// Call ‘setGraphColor()‘ to reset the colors that will be used for graphs.
void setGraphColor(int index)
{
countGraph = index;
usingCustomGraphColor = 0; // dont use a custom color.
}
// Specify the exact color that the next graph should be drawn as.
void setCustomGraphColor(int R int B int G)
{
customGraphColor = CV_RGB(R G B);
usingCustomGraphColor = 1; // show that it will be used.
}
// Draw the graph of an array of floats into imageDst or a new image between minV & maxV if given.
// Remember to free the newly created image if imageDst is not given.
IplImage* drawFloatGraph(const float *arraySrc int nArrayLength IplImage *imageDst float minV float maxV int width int height char *graphLabel bool showScale)
{
int w = width;
int h = height;
int b = 10; // border around graph within the image
if (w <= 20)
w = nArrayLength + b*2; // width of the image
if (h
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 14810 2011-04-11 12:16 GraphUtils.cpp
文件 3894 2010-06-02 00:40 GraphUtils.h
相关资源
- 基于OpenCV的数字识别468815
- 使用opencv去掉二值化图像中黑色面积
- opencv环境配置
- win10 64位下编译的opencv4.5.5库,opencv
- NVIDIAOpticalFlowSDK-79c6cee80a2df9a196f20afd6
- opencv_contrib-3.4.0.zip
- opencv2.4.9源码分析——SIFT
- 用两个摄像头实现,双目标定,双目
- opencv_traincascade训练分类器,手势识别
- opencv3.0交叉编译用parallel.cpp
- 基于opencv的图像识别识别图像中的色
- 基于openCV的识别特定颜色区域
- 基于OpenCV的分水岭算法实现
- QT+opencv+OCR 身份证号码,银行卡号识别
- opencv视频特定颜色区域识别
- 把RGB转换为HSV和HSI然后根据黄色和蓝
- opencv视觉测距
- 基于Qt和opencv的身份证号码识别系统
- opencv_ffmpeg249.dll
- SfM稀疏三维点云重建--完整工程文件
- 基于opencv的数人头程序源代码
- 利用OpenCV中的Stitcher类实现全景图像拼
- opencv实现的sift算法源码,包含了图像
- openCV 上的小波变换
- 基于OPENCV的车牌识别系统设计
- 617张国内车牌60-17bmp图片用于OpenCV正样
- hog特征提取,c版本代码
- 基于Qt5.8+OpenCV3.2的Basler多相机触发开
- 基于Opencv实现的图像纠偏
- ImageWatch2019.vsix
评论
共有 条评论