#include "iostream"
#include "highgui.h"
#include "cv.h"
#include "cxcore.h"
#include <opencv/cxcore.h>
#include "D:\Program Files\opencv\build\include\opencv2\core\core.hpp"
using namespace cv;
CvBox2D Box2D;
int main(int argc, char* argv[])
{
IplImage *src=cvLoadImage("text.jpg",1);
///***************************************************
int data[16]=
{
0,0,0,0,
0,0,1,0, ///图像的腐蚀
0,1,1,0,
0,0,0,0
};
IplConvKernel *Element= cvCreateStructuringElementEx(4,4,2,2,CV_SHAPE_RECT,data);;
cvErode(src,src,Element,2);
// ***********************************************/
#include "highgui.h"
#include "cv.h"
#include "cxcore.h"
#include <opencv/cxcore.h>
#include "D:\Program Files\opencv\build\include\opencv2\core\core.hpp"
using namespace cv;
CvBox2D Box2D;
int main(int argc, char* argv[])
{
IplImage *src=cvLoadImage("text.jpg",1);
///***************************************************
int data[16]=
{
0,0,0,0,
0,0,1,0, ///图像的腐蚀
0,1,1,0,
0,0,0,0
};
IplConvKernel *Element= cvCreateStructuringElementEx(4,4,2,2,CV_SHAPE_RECT,data);;
cvErode(src,src,Element,2);
// ***********************************************/

这篇博客介绍了如何使用OpenCV进行Canny边缘检测和二值化处理,进而提取图像的轮廓。通过展示代码cvShowImage("src", Canny_Image)和cvShowImage("src_RGB", src_RGB),博主分享了图像处理的过程,并邀请读者对初学者的尝试给予指导。"
134036192,10764745,Cesium 实体高亮与动态Label展示技巧,"['三维地球', 'GIS', 'WebGL', '可视化']
最低0.47元/天 解锁文章
2131

被折叠的 条评论
为什么被折叠?



