![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OpenCV1.0
一串字符串
这个作者很懒,什么都没留下…
展开
-
OpenCV-将图像作平滑处理并显示
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"void example2_4(IplImage* image){ cvNamedWindow("Example4-in");//创建窗口显示输入 cvNamedWindow("Example4-out");//创建窗口显示输出 cvShowIma原创 2017-09-29 17:32:49 · 693 阅读 · 0 评论 -
OpenCV矩阵和图像操作之cvAbs、cvAbsDiff、cvAbsDiffS
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;#include <cxcore.h> void PrintMat2(CvMat*target, char * name)//第一个参数为cvMat矩阵指针,第...原创 2019-05-25 23:28:19 · 376 阅读 · 0 评论 -
OpenCV-矩阵和图像操作之cvAbs、cvAbsDiff、cvAbsDiffS
1:cvAbs原型为 voidcvAbs(CvMat* src,CvMat* dst),计算src中的所有元素的绝对值,然后将值赋给dst中的元素。示例代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;#include <cxco...原创 2019-05-25 23:28:58 · 1286 阅读 · 0 评论 -
OpenCV-利用其它widthStep方法把interest——img的所有像素值增加200
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;int main(){ IplImage* interest_img=cvLoadImage("C:\\horse.jpg"); cvNamedWindow("inte原创 2017-09-30 17:28:58 · 385 阅读 · 0 评论 -
OpenCV-用imageROI来增加某范围的像素
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;int main(){ IplImage* src; //IplImage* cvLoadImage( const char* filename, int flags原创 2017-09-30 17:03:13 · 332 阅读 · 0 评论 -
OpenCV-将JPG图像的第二个通道和第三个通道的值设置为最大值
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;void saturate_sv(IplImage* img){ for(int y=0;yheight;y++) { uchar* ptr=(ucha原创 2017-09-30 16:46:20 · 1193 阅读 · 0 评论 -
OpenCV-累加矩阵中的所有元素
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;void PrintMat2(CvMat*target, char * name)//第一个参数为cvMat矩阵指针,第二个参数为输出的矩阵的名字{ printf("%s:\n原创 2017-09-30 16:35:25 · 2145 阅读 · 0 评论 -
OpenCV-利用cvPtr2D存取矩阵元素和用cvGetReal2D取矩阵元素
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;void PrintMat2(CvMat*target, char * name)//第一个参数为cvMat矩阵指针,第二个参数为输出的矩阵的名字{ printf("%s:\n原创 2017-09-30 16:27:32 · 2824 阅读 · 0 评论 -
OpenCV-利用CV_MAT_ELEM宏和CV_MAT_ELEM_PTR宏存取CVMat数组元素
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;void PrintMat2(CvMat*target, char * name)//第一个参数为cvMat矩阵指针,第二个参数为输出的矩阵的名字{ printf("%s:\n原创 2017-09-30 16:19:20 · 1397 阅读 · 0 评论 -
OpenCV-用固定数据创建一个opencv矩阵,并输出
1:代码如下:#include "stdafx.h"#include"highgui.h"#include"cv.h"void PrintMat2(CvMat*target, char * name)//第一个参数为cvMat矩阵指针,第二个参数为输出的矩阵的名字{ printf("%s:\n", name); for (int i=0; irows; i++)原创 2017-09-30 16:12:52 · 1226 阅读 · 0 评论 -
OpenCV-将图像两次缩放+转化为灰度图+边缘检测
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;IplImage* doCanny(IplImage* in,double lowThresh,double highThresh,double aperture){ if(i原创 2017-09-30 15:58:01 · 402 阅读 · 0 评论 -
OpenCV-将图像转化为灰度图,然后边缘检测
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"#include "iostream"using namespace std;IplImage* doCanny(IplImage* in,double lowThresh,double highThresh,double aperture){ ...原创 2017-09-30 15:46:58 · 5087 阅读 · 0 评论 -
OpenCV-将图像缩放并显示
1:代码如下:#include "stdafx.h"#include "highgui.h"#include "cv.h"IplImage* doPyrDown(IplImage* in,int filter=IPL_GAUSSIAN_5x5){ assert(in->width%2==0 && in->height%2==0); //创建首地址并分配存储空间IplI原创 2017-09-29 17:38:05 · 2504 阅读 · 0 评论 -
opencv_将图像上的4个点按逆时针排序
opencv_将图像上的4个点按逆时针排序1:代码如下:#include "stdafx.h"#include "cxcore.h"#include "cvcam.h"#include "windows.h"#include "cv.h"#include "highgui.h"#include "iostream"using namespace std;CvMat* Ra...原创 2016-09-13 10:58:00 · 1283 阅读 · 0 评论