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

📄 videoinedgedetection.h

📁 这个是balckfin533/561的视频输入和输出的源代码
💻 H
字号:
/*****************************************************************************

Copyright (c) 2006 Analog Devices, Inc.	All	Rights Reserved. 

This software is proprietary and confidential to Analog	Devices, Inc. 
and	its	licensors.

*****************************************************************************

$RCSfile: VideoInEdgeDetection.h,v $
$Revision: 1.3 $
$Date: 2006/07/28 05:11:05 $

Project:	BlackfinSDK (Edge Detection on ITU656 Video In)
Title:		System Defines for Edge Detection on ITU 656 Video In
Author(s):	bmk
Revised	by:	

Description:
			Defines for Edge Detection algorithm(s) used by this application
			
			Edge Detection Algorithm(s) used:
			SOBEL Method

References:
			None

*****************************************************************************
Tab	Setting:			4

Target Processor:		ADSP-BF5xx
Target Tools Revision:	ADSP VisualDSP++ v4.5
******************************************************************************

Modification History:
====================
$Log: VideoInEdgeDetection.h,v $
Revision 1.3  2006/07/28 05:11:05  bmk
modified code for actual NTSC resolution
Previous rev- 720 x 480, now - 720 x 486

Revision 1.2  2006/07/06 07:26:28  bmk
modified project to use video utility file macros

Revision 1.1  2006/06/30 01:33:54  bmk
Initial entry


*****************************************************************************/

#ifndef	__VIDEOINEDGEDETECTION_H__
#define	__VIDEOINEDGEDETECTION_H__

#include <adi_itu656.h>			// ITU 656 Video utility definitions

/***************************************************************************** 
Edge Detection Algorithim defines
******************************************************************************
Sobel Method:
-------------
Process	incomming video	active fields (luma	values)	only
Each line is split in to 6 blocks and each active field	is split in	to 3 or 4 blocks
i.e., 
NTSC active	field(even or odd) will	be split in	to 18 blocks (120 *	81 pixels per block)
PAL	active field(even or odd) will be split	in to 24 blocks	(120 * 72 pixels per block)

NTSC Active field (even or	odd)

			<---------------------720 Pixels---------------------->
			<- 120 ->
			  pixels
			+--------+--------+--------+--------+--------+--------+	  *
81 lines	|		 |		  |		   |		|		 |		  |	  *
			+--------+--------+--------+--------+--------+--------+	  *
81 lines	|		 |		  |		   |		|		 |		  |	243 lines  
			+--------+--------+--------+--------+--------+--------+	  *
81 lines	|		 |		  |		   |		|		 |		  |	  *
			+--------+--------+--------+--------+--------+--------+	  *

PAL Active field (even or odd)

			<---------------------720 Pixels---------------------->
			<- 120 ->
			  pixels
			+--------+--------+--------+--------+--------+--------+	  *
72 lines	|		 |		  |		   |		|		 |		  |	  *
			+--------+--------+--------+--------+--------+--------+	  *
72 lines	|		 |		  |		   |		|		 |		  |	  *
			+--------+--------+--------+--------+--------+--------+	288 lines
72 lines	|		 |		  |		   |		|		 |		  |	  *
			+--------+--------+--------+--------+--------+--------+	  *
72 lines	|		 |		  |		   |		|		 |		  |	  *
			+--------+--------+--------+--------+--------+--------+	  *
				
												
*****************************************************************************/

// Active video data in each line is spilt to # blocks (for both NTSC and PAL)
#define	SOBEL_ACTIVE_VIDEO_BLOCKS	6
// NTSC video frame - Active field spilt to # number of blocks
#define	SOBEL_FIELD_BLOCKS_NTSC		3
// NTSC video frame - Active field spilt to # number of blocks
#define	SOBEL_FIELD_BLOCKS_PAL		4
// Number of Sobel blocks per active field (for NTSC)
#define	SOBEL_BLOCK_COUNT_NTSC		(SOBEL_ACTIVE_VIDEO_BLOCKS * SOBEL_FIELD_BLOCKS_NTSC)
// Number of Sobel blocks per active field (for NTSC)
#define	SOBEL_BLOCK_COUNT_PAL		(SOBEL_ACTIVE_VIDEO_BLOCKS * SOBEL_FIELD_BLOCKS_PAL)

// Offset for Sobel Algorithm (sobel.h)
// always first and last row in a Sobel out buffer is invalid
// always first and last column in each Sobel out buffer row is invalid
#define	SOBEL_OFFSET				2

// Sobel buffer column size (for valid data only)
#define	SOBEL_COLUMN_SIZE			(ITU_PIXEL_PER_LINE / SOBEL_ACTIVE_VIDEO_BLOCKS)
// Sobel buffer size (give maximum size as dynamic memory allocation is not used)
#define	SOBEL_BUF_SIZE				((SOBEL_COLUMN_SIZE+SOBEL_OFFSET) * ((NTSC_ACTIVE_FLINES / SOBEL_FIELD_BLOCKS_NTSC)+SOBEL_OFFSET))

/***************************************************************************** 
Defines for Edge Detection on ITU 656 Video Frame
*****************************************************************************/

// Size	of an in/out video frame buffer - set to maximum size
#define	VIDEO_BUF_SIZE				PAL_VIDEO_FRAME_SIZE

#endif // __VIDEOINEDGEDETECTION_H__

/*****/

⌨️ 快捷键说明

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