lbp特征提取代码


利用VS2008+opencv2.3.1编写的几种经典LBP特征提取算法,包括经典LBP,统一模式LBP等。
资源截图
代码片段和文件信息
/******************************************************************************
* 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 “stdafx.h“
#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  2014-10-16 21:38  LBP
     目录           0  2014-10-16 21:35  LBPDebug
     文件       49152  2014-10-16 21:38  LBPDebugLBP.exe
     文件      533732  2014-10-16 21:38  LBPDebugLBP.ilk
     文件     1747968  2014-10-16 21:38  LBPDebugLBP.pdb
     目录           0  2015-06-27 11:18  LBPLBP
     文件    20007936  2014-10-16 22:19  LBPLBP.ncb
     文件         875  2014-10-13 16:15  LBPLBP.sln
     文件       28672  2014-10-16 22:19  LBPLBP.suo
     文件       91814  2014-09-21 14:43  LBPLBP001.jpg
     目录           0  2014-10-16 21:38  LBPLBPDebug
     文件       10382  2014-10-16 21:38  LBPLBPDebugBuildLog.htm
     文件      129043  2014-10-16 15:56  LBPLBPDebugedge.obj
     文件      134701  2014-10-16 21:38  LBPLBPDebughist.obj
     文件         663  2014-10-13 16:26  LBPLBPDebugLBP.exe.embed.manifest
     文件         728  2014-10-13 16:27  LBPLBPDebugLBP.exe.embed.manifest.res
     文件         621  2014-10-16 21:38  LBPLBPDebugLBP.exe.intermediate.manifest
     文件      129186  2014-10-16 16:49  LBPLBPDebugLBP.obj
     文件     3211264  2014-10-13 16:23  LBPLBPDebugLBP.pch
     文件      149535  2014-10-16 21:38  LBPLBPDebugmain.obj
     文件          65  2014-10-16 21:38  LBPLBPDebugmt.dep
     文件       11889  2014-10-13 16:23  LBPLBPDebugstdafx.obj
     文件      150350  2014-10-16 17:05  LBPLBPDebuguniform_LBP.obj
     文件     1190912  2014-10-16 21:38  LBPLBPDebugvc90.idb
     文件     1167360  2014-10-16 21:38  LBPLBPDebugvc90.pdb
     文件        2690  2014-10-16 15:56  LBPLBPedge.cpp
     文件         965  2014-10-16 15:55  LBPLBPedge.h
     文件        2934  2014-10-16 22:19  LBPLBPhist.cpp
     文件         964  2014-10-16 21:27  LBPLBPhist.h
     文件        2711  2014-10-16 16:49  LBPLBPLBP.cpp
     文件         953  2014-10-16 15:55  LBPLBPLBP.h
............此处省略27个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)