?? volume.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 + -