错误错误C3861:'cvPyrSegmentation':未找到标识符

编程入门 行业动态 更新时间:2024-10-22 22:56:54
本文介绍了错误错误C3861:'cvPyrSegmentation':未找到标识符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你能帮我吗?下面执行编码时出现错误。我是一个新手使用OpenCV。我的老师是Google先生和你在这个领域的专家。

Could you please help me???Getting an error when executing coding below. I'm a newbie using OpenCV. My teacher is Mr. Google and you guys who expert in this field.

IntelliSense:标识符cvPyrSegmentation未定义

IntelliSense: identifier "cvPyrSegmentation" is undefined

错误错误C3861:'cvPyrSegmentation':找不到标识符

Error error C3861: 'cvPyrSegmentation': identifier not found

#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <stdlib.h> #include <stdio.h> static void help(void) { printf("\nThis program present the function of pyramid segmentation which is cvcvPyrSegmentation()\n""we can controlled the value of threshold by creating the taskbar\n""Usage :\n"); } IplImage* image[2] = { 0, 0 }, *image0 = 0, *image1 = 0; CvSize size; int w0, h0,i; int threshold1, threshold2; int l,level = 4; int sthreshold1, sthreshold2; int l_comp; int block_size = 1000; float parameter; double threshold; double rezult, min_rezult; int filter = CV_GAUSSIAN_5x5; CvConnectedComp *cur_comp, min_comp; CvSeq *comp; CvMemStorage *storage; CvPoint pt1, pt2; static void START_SEGMENT(int a) { (void) a; cvPyrSegmentation (image0, image1, storage, &comp, level, threshold1+1, threshold2+1); cvShowImage("Segmentation", image1); } int main( int argc, char** argv ) { char* filename; help(); filename = argc == 2 ? argv[1] : (char*)"C:/Users/acer/Documents/Visual Studio 2012/Projects/me2.jpg"; if( (image[0] = cvLoadImage( filename, 1)) == 0 ) { help(); printf("Cannot load fileimage - %s\n", filename); return -1; } cvNamedWindow("Source", 0); cvShowImage("Source", image[0]); cvNamedWindow("Segmentation", 0); storage = cvCreateMemStorage ( block_size ); image[0]->width &= -(1<<level); image[0]->height &= -(1<<level); image0 = cvCloneImage( image[0] ); image1 = cvCloneImage( image[0] ); // segmentation of the color image l = 1; threshold1 =255; threshold2 =30; START_SEGMENT(1); sthreshold1 = cvCreateTrackbar("Threshold1", "Segmentation", &threshold1, 255, START_SEGMENT); sthreshold2 = cvCreateTrackbar("Threshold2", "Segmentation", &threshold2, 255, START_SEGMENT); cvShowImage("Segmentation", image1); cvWaitKey(0); cvDestroyWindow("Segmentation"); cvDestroyWindow("Source"); cvReleaseMemStorage(&storage ); cvReleaseImage(&image[0]); cvReleaseImage(&image0); cvReleaseImage(&image1); return 0; } #ifdef _EiC main(1,"pyramid_segmentation.c"); #endif

推荐答案

#include <opencv2/imgproc/imgproc_c.hpp>

更多推荐

错误错误C3861:'cvPyrSegmentation':未找到标识符

本文发布于:2023-10-07 15:24:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469764.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   标识符   未找到   cvPyrSegmentation

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!