资源简介
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
相关资源
- Mastering_OpenCV_第六章车牌识别word版本
- 3d结构光扫描 opencv
- 九点标定opencv+VS2015)
- opencv调整图像亮度对比度的
- libopencv_info.so
- 自实现双边滤波代码及测试图像
- opencv2.4.7安装程序及教学
- 虚拟视点绘制DIBR源码
- qt+zbar+opencv 环境配置
- opencv图像配准
- OpenCV利用查找表Look-up table增加图像对
- VS2017下用OpenCV实时播放RTSP视频流并截
- OpenCV 飞行游戏手势控制源码.rar
- Qt+Opencv实现四步相移
- 相机标定棋盘图
- Opencv实战项目
- opencv.txt
- 利用Opencv较高效率的视频图像传输
- opencv人脸识别源码
- libopencv_core300.dll
- 坦克大战地图生成代码
- opencv_imgproc249d.dll
- opencv_highgui249d.dll
- 高级形态学变换
- opencv.rar
- FCN模型实现图像分割配套资料分享.
- 用于车牌识别的字符模板,数字,字
- OpenCVForUnity
- opencv 3.1.0 自带例程介绍
- OpenCV3.3百度云链接
评论
共有 条评论