📄 videoinedgedetection_bf561_main.c
字号:
/*****************************************************************************
Copyright (c) 2006 Analog Devices, Inc. All Rights Reserved.
This software is proprietary and confidential to Analog Devices, Inc.
and its licensors.
*****************************************************************************
$RCSfile: VideoInEdgeDetection_BF561_main.c,v $
$Revision: 1.2 $
$Date: 2006/07/06 07:26:53 $
Project: BlackfinSDK (Edge Detection on ITU656 Video In)
Title: Main program
Author(s): bmk
Revised by:
Description:
Main program for Edge Detection on ITU 656 Video Input for BF561
References:
None
*****************************************************************************
Tab Setting: 4
Target Processor: ADSP-BF561
Target Tools Revision: ADSP VisualDSP++ v4.5
******************************************************************************
Modification History:
====================
$Log: VideoInEdgeDetection_BF561_main.c,v $
Revision 1.2 2006/07/06 07:26:53 bmk
modified project to use video utility file macros
Revision 1.1 2006/06/30 01:33:04 bmk
Initial entry
*****************************************************************************/
#include <VideoInEdgeDetection_System.h> // Video In Edge detection system includes
#include <SDK-ezkitutilities.h> // EZ-Kit utility definitions
/*********************************************************************
Function: main
Description: Edge Detection main function
*********************************************************************/
section ("App_Code_L1")
void main (void)
{
SystemFlag.KeepRunningFlag = TRUE; // Initialise flag to continue executing this application
InitSystem (); // Initialise EZ kit & Video Parameters
InstallSystemServices (); // Installs system services
InstallVideoDecoder (); // Instal Video decoder (video input - ADV7183)
InstallVideoEncoder (); // Instal Video Encoder (video output - ADV717x)
SubmitVideoOutBuffers(); // submit Video Out buffer(s)
EnableVideoIn(TRUE); // enable video in dataflow (ADV7183)
EnableVideoOut(TRUE); // enable video out dataflow (ADV717x)
// Continue executing the app until Terminate button (SW9) is pressed
while (SystemFlag.KeepRunningFlag == TRUE)
{
// check sobel edge detection is enabled
if (SystemFlag.SobelEnable)
{
do_SobelEdgeDetection (); // if so, do sobel edge detection
}
}
TerminateSystem(); // Close all devices and terminate this app
}
/****/
void sobel_fast(unsigned char* in, int row, int col, unsigned char *out)
{
int i,j;//循环变量
int temp_image[i][j];//
for(i=0; i<row; i++)
for(j=0; j<col; j++)
temp_image[i][j]=0;
for(i=0; i<row; i++)
for(j=0; j<col; j++)
temp_image[i][j]= in;
for(i=0; i<row; i++)
for(j=0; j<col; j++)
{
if(100<temp_image[i][j]<200)
temp_image[i][j]=0;
else
temp_image[i][j]=255;
}
for(i=0; i<row; i++)
for(j=0; j<col; j++)
{
temp_image[i][j]= out;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -