-
大小: 28.24MB文件類型: .zip金幣: 1下載: 0 次發(fā)布日期: 2023-08-03
- 語言: 其他
- 標簽: OpenCV,LBP??
資源簡介
自己寫的一個結合了OPENCV的LBP特征提取,LBP特征是自己算的,OPENCV做了預處理和直方圖。打印部分按照libsvm要求的格式打印的。
代碼片段和文件信息
/******************************************************************************
*?File?Name??????????:?edge.c
*?Author?????????????:?Kid?Zhang
*?Version????????????:?v1.0
*?Date???????????????:?Nov?4?2011
*?Description????????:?This?file?is?help?user?to?abstract?the?edge?of?the?piture
********************************************************************************/
/*?Includes?------------------------------------------------------------------*/
#include?“edge.h“
/*?Private?typedef?-----------------------------------------------------------*/
/*?Private?define?------------------------------------------------------------*/
/*?Private?macro?-------------------------------------------------------------*/
/*?Private?variables?---------------------------------------------------------*/
/*?Private?function?prototypes?-----------------------------------------------*/
/*?Private?functions?---------------------------------------------------------*/
/*******************************************************************************
*?Function?Name??:?Pyr_Segmentation
*?Description????:?This?function?is?help?user?to?do?the?pyramid?segmentation?of?the?piture
*?Input??????????:?-?src:?The?point?of?the?original?picture
*?Output?????????:?-?dst:?The?destination?point?of?the?picture
*?Return?????????:?None
*******************************************************************************/
void?Pyr_Segmentation?(IplImage?*?src?IplImage?*dst)
{
????CvMemStorage*?storage?=?cvCreateMemStorage(0);??
????CvSeq*?comp?=?NULL;??
????cvPyrSegmentation(?src?dst?storage?&comp?4?200?50?);??
????cvReleaseMemStorage(?&storage?);
}
/*******************************************************************************
*?Function?Name??:?Abstract_Edge
*?Description????:?This?function?is?help?user?to?abstract?the?edge?of?the?piture
*?Input??????????:?-?src:?The?point?of?the?original?picture
*?Output?????????:?-?dst:?The?destination?point?of?the?picture
*?Return?????????:?The?destination?point?of?the?picture
*******************************************************************************/
void?Abstract_Edge(IplImage?*srcIplImage?*dst)
{
//IplImage?*?temp?=?cvCreateImage(cvGetSize(src)?IPL_DEPTH_8U3);
IplImage?*?temp?=?cvCreateImage(cvGetSize(src)?IPL_DEPTH_8U3);?
IplConvKernel?*kernel?=?cvCreateStructuringElementEx(3?3?1?1?CV_SHAPE_RECT);
cvMorphologyEx(srctempNULLkernelCV_MOP_GRADIENT1);//邊緣提取
Pyr_Segmentation?(dstdst);//金字塔分割
cvCvtColor(tempdstCV_BGR2GRAY);//轉為灰度圖像
//cvCvtColor(tempdstCV_BGR2GRAY);//轉為灰度圖像
}
/*********************END?OF?FILE*************************/
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-12-25?00:10??test\
?????目錄???????????0??2011-12-13?19:25??test\Debug\
?????文件???????52224??2011-12-13?19:59??test\Debug\test.exe
?????文件??????592280??2011-12-13?19:59??test\Debug\test.ilk
?????文件?????1215488??2011-12-13?19:59??test\Debug\test.pdb
?????目錄???????????0??2011-12-25?00:09??test\ipch\
?????目錄???????????0??2011-12-25?00:09??test\ipch\test-134d8497\
?????文件????77594624??2011-12-25?00:09??test\ipch\test-134d8497\test-2434c52c.ipch
?????目錄???????????0??2011-11-04?12:14??test\test\
?????文件????38031360??2011-12-25?00:10??test\test.sdf
?????文件?????????879??2011-11-02?21:45??test\test.sln
?????文件???????18432??2011-12-25?00:10??test\test.suo
?????目錄???????????0??2011-12-13?19:59??test\test\Debug\
?????文件????????2958??2011-12-13?19:59??test\test\Debug\cl.command.1.tlog
?????文件??????113870??2011-12-13?19:59??test\test\Debug\CL.read.1.tlog
?????文件????????6022??2011-12-13?19:59??test\test\Debug\CL.write.1.tlog
?????文件???????78185??2011-11-07?21:00??test\test\Debug\edge.obj
?????文件???????96405??2011-12-13?18:45??test\test\Debug\hist.obj
?????文件???????78368??2011-12-13?14:55??test\test\Debug\LBP.obj
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
?????文件???????????2??2011-12-13?19:59??test\test\Debug\li
............此處省略59個文件信息
評論
共有 條評論