资源简介
Harris Corner Detector
代码片段和文件信息
#include
#include
int main()
{
double minVal=0.0 maxVal=0.0;
double scale shift;
double min=0 max=255;
char * fileName =“pic3.png“;
IplImage * inputImage = cvLoadImage(fileName );
IplImage *grayImage =cvCreateImage
(cvGetSize(inputImage)IPL_DEPTH_8U 1);
IplImage *sobelImage16 =cvCreateImage
(cvGetSize(inputImage)IPL_DEPTH_16S 1);
IplImage *sobelImage8 =cvCreateImage
(cvGetSize(inputImage)IPL_DEPTH_8U 1);
IplImage *cannyImage =cvCreateImage
(cvGetSize(inputImage)IPL_DEPTH_8U 1);
/* origin (start) of image must be the same */
grayImage->origin = inputImage->origin;
sobelImage16->origin = inputImage->origin;
sobelImage8->origin = inputImage->origin;
cvCvtColor (inputImagegrayImageCV_BGR2GRAY);
cvNamedWindow( “Grayscale“ 1);
cvShowImage( “Grayscale“ gra
- 上一篇:C++读写注册表的类
- 下一篇:西北农林科技大学C++实验题及代码
评论
共有 条评论