⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 volume.c

📁 将OpenCV移植到DSP上
💻 C
字号:
/*
 *  Copyright 2003 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) DSP/BIOS 4.90.270 01-13-05 (barracuda-o07)" */
/***************************************************************************/
/*                                                                         */
/*     V O L U M E . C                                                     */
/*                                                                         */
/*     Audio gain processing in a main loop                                */
/*                                                                         */
/***************************************************************************/


#include <stdlib.h>
#include <stdio.h>
#include "_cv.h"
#include "_cxcore.h"

#include "volume.h"

/* Global declarations */
int inp_buffer[BUFSIZE];       /* processing data buffers */
int out_buffer[BUFSIZE];

int gain = MINGAIN;                      /* volume control variable */
unsigned int processingLoad = BASELOAD;  /* processing routine load value */

struct PARMS str =
{
    2934,
    9432,
    213,
    9432,
    &str
};

/* Functions */


/*
 * ======== main ========
 */
int main()
{
    FILE*     f_in = NULL;
    FILE*     f_out = NULL;
    long len = 0;
    char*    buf=NULL;
    //声明IplImage指针
IplImage* pImg = NULL; 
IplImage* pBinImg = NULL;
if( (pImg = cvLoadImage("../Lena_Little8.bmp", 1)) != 0 )
    {

      //为canny边缘图像申请空间
      pBinImg = cvCreateImage(cvGetSize(pImg),
                    IPL_DEPTH_8U,
                    1);
      cvThreshold(pImg,pBinImg,91, 255.0, CV_THRESH_BINARY);

      cvSaveImage("../Lena_Little8_Bin.bmp",pBinImg);
      cvReleaseImage( &pImg ); 
      cvReleaseImage( &pBinImg ); 

    }

   

    puts("volume example started\n");
	return 0;

    /* loop forever */
    
}

/*
 *  ======== processing ========
 *
 * FUNCTION: apply signal processing transform to input signal.
 *
 * PARAMETERS: address of input and output buffers.
 *
 * RETURN VALUE: TRUE.
 */

/*
 *  ======== dataIO ========
 *
 * FUNCTION: read input signal and write processed output signal.
 *
 * PARAMETERS: none.
 *
 * RETURN VALUE: none.
 */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -