ADLINK Technology RTV Series User Manual

Multi-channel real-time video frame grabber series
Table of Contents

Advertisement

Quick Links

Multi-Channel Real-Time Video
Manual Rev.
Revision Date:
Part No:
Advance Technologies; Automate the World.
RTV Series
Frame Grabber Series
User's Manual
2.03
April 22, 2009
50-1R001-1010

Advertisement

Table of Contents
loading

Summary of Contents for ADLINK Technology RTV Series

  • Page 1 RTV Series Multi-Channel Real-Time Video Frame Grabber Series User’s Manual Manual Rev. 2.03 Revision Date: April 22, 2009 Part No: 50-1R001-1010 Advance Technologies; Automate the World.
  • Page 2 Copyright 2009 ADLINK TECHNOLOGY INC. All Rights Reserved. The information in this document is subject to change without prior notice in order to improve reliability, design, and function and does not represent a commitment on the part of the manufacturer.
  • Page 3 Getting Service from ADLINK Customer Satisfaction is top priority for ADLINK Technology Inc. Please contact us should you require any service or assistance. ADLINK TECHNOLOGY INC. Web Site: http://www.adlinktech.com Sales & Service: Service@adlinktech.com TEL: +886-2-82265877 FAX: +886-2-82265717 Address: 9F, No. 166, Jian Yi Road, Chungho City,...
  • Page 5: Table Of Contents

    System Requirements ............3 RTV-24 Benchmarks ............4 PCIe-RTV-24 Benchmarks ..........6 2 Hardware Reference............9 RTV Series ................9 PCIe-RTV24 Specifications ..........9 RTV-24 Specifications ..........15 RTV-E4 Extension Board (Optional) ......21 RTV-I4 Isolation GPIO Board (Optional) ....... 22 cRTV Series...............
  • Page 6 WDM Driver Installation ..........50 DirectShow Driver Installation ........56 RTV-LVIEW Installation ..........61 Uninstall RTV-LVIEW ........... 63 Linux Driver Installation ..........64 4 ViewCreatorPro Utility ............67 Overview ................67 Component Description ............. 68 Operation Theory ............... 69 Devices Panel ............... 69 Adjustment Panel ............
  • Page 7: List Of Tables

    List of Tables Table 1-1: RTV Series Acquisition Speed ......... 1 Table 2-1: GPIO Characteristics ..........10 Table 2-2: RTV Video Inputs ........... 11 Table 2-3: Channel Extension Video Input (CN2) ....12 Table 2-4: Channel Extension Video Input (CN3) ....12 Table 2-5: Channel Extension Video Input (CN5) ....
  • Page 8 Table 5-2: C/C++ Data Types ..........83 Table 5-3: Pixel Data ............. 122 List of Tables...
  • Page 9: List Of Figures

    List of Figures Figure 2-1: PCIe-RTV24 Appearance.......... 9 Figure 2-2: Trigger Signal Waveform......... 11 Figure 2-3: Trigger Signal Waveform......... 16 Figure 2-4: RTV-24 Appearance..........16 Figure 2-5: RTV-E4 Appearance ..........21 Figure 2-6: RTV-I4 Appearance..........22 Figure 2-7: Relay Address Jumpers .......... 23 Figure 2-8: STRG Address Jumpers..........
  • Page 11: Introduction

    Introduction The RTV series acquisition board is designed without compromise for security and video surveillance applications as a PC-based multiple channel digital video recorder. This 32-bit/64bit, 33MHz/66MHz PCI/cPCI/PMC bus frame grab- ber simultaneously captures four video analog streams in real- time.
  • Page 12: I/O Lines

    Automatic chrominance gain control.  1.1.2 I/O Lines The RTV series is fitted with TTL compatible I/O lines protected against overloads and electrostatic discharges. Each line may be configured as an input or output. They can be used to trigger acquisition or report alarm signals.
  • Page 13: Applications

    Angelo RTV series (RTV-24, cRTV-24, cRTV-44 and PMC-RTV21/G). VIs for Windows 98/NT/2000/XP operation sys- tems and LabView™ sample programs are provided for users' ref- erence. 1.2 Applications PC Based Surveillance System  Digital Video Recorder (DVR)  Factory Monitoring System ...
  • Page 14: Benchmarks

    1.4 RTV-24 Benchmarks Motherboard: ASUS P5E64 WS EVOLUTION CPU: Intel Core2 Duo CPU E4600 @ 2.4GHz RAM: DDR3_SDRAM 2GB Windows XP /SP3 Image Format RGB16, Full(640*480) Card# Card 0 Card 1 Port# Real-Time        ...
  • Page 15 Motherboard: NuPRO-965 CPU: Intel Core2 Quad Q6600 @ 2.4GHz RAM: DDR2_SDRAM 2GB Windows XP /SP3 Image Format RGB16, CIF(320*240) Card# Card 0 Card 1 Port# Real-Time         Frame Rate 29.966 29.960 29.964 29.958 29.961 29.958 29.966 29.964 Card# Card 2 Card 3...
  • Page 16: Pcie-Rtv-24 Benchmarks

    1.5 PCIe-RTV-24 Benchmarks Motherboard: ASUS P5E64 WS EVOLUTION CPU: Intel Core2 Duo CPU E4600 @ 2.4GHz RAM: DDR3_SDRAM 2GB Windows XP /SP3 Image Format RGB16, Full(640*480) Card# Card 0 Card 1 Port# Real-Time        ...
  • Page 17 Motherboard: NuPRO-965 CPU: Intel Core2 Quad Q6600 @ 2.4GHz RAM: DDR2_SDRAM 2GB Windows XP /SP3 Image Format RGB16, CIF(320*240) Card# Card 0 Card 1 Port# Real-Time         Frame Rate 29.810 29.09 29.810 29.809 29.809 29.810 29.808 29.809 Card# Card 2 Card 3...
  • Page 18 Introduction...
  • Page 19: Hardware Reference

    Hardware Reference 2.1 RTV Series 2.1.1 PCIe-RTV24 Specifications Figure 2-1: PCIe-RTV24 Appearance Dimensions W x L:167.65 (mm) x 111.15 (mm)  Operating Environment Temperature: 0 to 55°C  Humidity: 5 to 90% RHNC  Storage Environment Temperature: 0 to 70°C ...
  • Page 20: Table 2-1: Gpio Characteristics

    Video Input Four composite video color digitizers  Video input interface: Four composite BNC connectors  Coaxial cable suggested  Channel Extension Expandable to up to 16 channels  Channel extension interface:  10-pin ribbon cable to on-board 10-pin header connector ...
  • Page 21: Table 2-2: Rtv Video Inputs

    Figure 2-2: Trigger Signal Waveform User EEPROM Includes 1kbit available EEPROM  RTV-24 Standard Accessories Watchdog reset cable  GPIO bracket  User Manual  All in One CD  RTV-24 Connectors & Pin Definitions Connector Definition Video IN – CH 0 Video IN –...
  • Page 22: Table 2-3: Channel Extension Video Input (Cn2)

    Function Function CH4 video in CH5 video in CH6 video in CH7 video in Table 2-3: Channel Extension Video Input (CN2) Function Function CH8 video in CH9 video in CH10 video in CH11 video in Table 2-4: Channel Extension Video Input (CN3) Hardware Reference...
  • Page 23: Table 2-5: Channel Extension Video Input (Cn5)

    Function Function CH12 video in CH13 video in CH14 video in CH15 video in Table 2-5: Channel Extension Video Input (CN5) Function Function IN0 (External interrupt) OUT0 Software Trigger 0 IN1 (External interrupt) Software Trigger 1 OUT1 Table 2-6: GPIO (CN8) Hardware Reference...
  • Page 24: Table 2-7: Gpio (Cn9)

    Function Function IN2 (External interrupt) OUT0 Software Trigger 2 IN3 (External interrupt) Software Trigger 3 OUT1 Table 2-7: GPIO (CN9) Function System reset Table 2-8: Watchdog Timer Hardware Reference...
  • Page 25: Specifications

    2.1.2 RTV-24 Specifications Video Input Four composite video color digitizers  Video input interface: Four composite BNC connectors  Coaxial cable suggested  Channel Extension Expandable to up to 16 channels  Channel extension interface:  10-pin ribbon cable to on-board 10-pin header connector ...
  • Page 26: Figure 2-3: Trigger Signal Waveform

    Figure 2-3: Trigger Signal Waveform User EEPROM Includes 1kbit available EEPROM  Form Factor 32-bit, 33MHz PCI half-size board  Figure 2-4: RTV-24 Appearance Dimensions W x L: 106.68(mm) x 174.62(mm)  Operating Environment Temperature: 0 to 55°C  Humidity: 5 to 90% RHNC ...
  • Page 27: Table 2-10: Rtv Video Inputs

    Storage Environment Temperature: 0 to 70°C  Humidity: 0 to 95% RHNC  Power Requirements +5V max. 1.5A  +3.3 V max. 0.5A  RTV-24 Standard Accessories Watchdog reset cable  GPIO bracket  User Manual  All in One CD ...
  • Page 28: Table 2-11: Channel Extension Video Input (Cn2)

    Function Function CH4 video in CH5 video in CH6 video in CH7 video in Table 2-11: Channel Extension Video Input (CN2) Function Function CH8 video in CH9 video in CH10 video in CH11 video in Table 2-12: Channel Extension Video Input (CN3) Hardware Reference...
  • Page 29: Table 2-13: Channel Extension Video Input (Cn5)

    Function Function CH12 video in CH13 video in CH14 video in CH15 video in Table 2-13: Channel Extension Video Input (CN5) Function Function IN0 (External interrupt) OUT0 Software Trigger 0 IN1 (External interrupt) Software Trigger 1 OUT1 Table 2-14: GPIO (CN8) Hardware Reference...
  • Page 30: Table 2-15: Gpio (Cn9)

    Function Function IN2 (External interrupt) OUT0 Software Trigger 2 IN3 (External interrupt) Software Trigger 3 OUT1 Table 2-15: GPIO (CN9) Function System reset Table 2-16: Watchdog Timer Hardware Reference...
  • Page 31: Rtv-E4 Extension Board (Optional)

    2.1.3 RTV-E4 Extension Board (Optional) Figure 2-5: RTV-E4 Appearance RTV-E4 Connectors & Pin Definitions Function Function CH4 video in CH5 video in CH6 video in CH7 video in Table 2-17: Channel Extension Video Input (CN11) Hardware Reference...
  • Page 32: Rtv-I4 Isolation Gpio Board (Optional)

    2.1.4 RTV-I4 Isolation GPIO Board (Optional) Figure 2-6: RTV-I4 Appearance RTV-I4 Connectors & Pin Definitions Relay output signal select: Relay output types: Normal open or Normal closed  Signal names: RY1, RY2, RY3, RY4  Jumper addresses J5, J6, J7, J8 ...
  • Page 33: Table 2-19: Strg Jumper Settings

    Figure 2-7: Relay Address Jumpers Relay I/O voltage requirements Input:+5V to +24V  Output:AC: 0.5A/125V, DC: 1A/30V or 0.3A/100V  STRG output signal select: STRG output signal types: Active high or Active low  Signal names: STRG_OUT1, STRG_OUT2, STRG_OUT3,  STRG_OUT4 Jumper addresses: J1, J2, J3, J4 ...
  • Page 34: Figure 2-8: Strg Address Jumpers

    Figure 2-8: STRG Address Jumpers Hardware Reference...
  • Page 35: Table 2-20: Rtv-I4 Gpio (Cn1) <--> Rtv-24 Gpio (Cn8)

    2R10P Input Pin Header Definitions Function Function GPIO Input 1 GPIO Output 1 PORT1 STRG Output GPIO Input 2 PORT2 STRG Output GPIO Output 2 Table 2-20: RTV-I4 GPIO (CN1) <--> RTV-24 GPIO (CN8) Function Function GPIO Input 3 GPIO Output 3 PORT3 STRG Output GPIO Input 4 PORT4 STRG Output...
  • Page 36: Table 2-22: D-Sub 25-Pin Connector

    Signal Signal RY3_COM DI1_COM RY4_COM DI2_COM 17 STRG_OUT1 18 STRG_OUT2 DI3_COM 19 STRG_OUT3 20 STRG_OUT4 DI4_COM STRG_GND STRG_GNG 10 RY1_COM 23 12 RY2_COM 25 Table 2-22: D-sub 25-pin Connector Hardware Reference...
  • Page 37: Crtv Series

    2.2 cRTV Series 2.2.1 cRTV-24 Specifications Video Input Four composite video color digitizers  Video input interface: Four composite BNC connectors  Channel status report LED  Coaxial cable recommended  Channel Extension Expandable to up to 8 channels  Channel extension interface ...
  • Page 38: Table 2-23: Crtv Video Inputs

    Dimensions W x L: 160(mm) x 100(mm)  Operating Environment Temperature: 0 to 55°C  Humidity: 5 to 90% RHNC  Storage Environment Temperature: 0 to 70°C  Humidity: 0 to 95% RHNC  Power Requirements +5V max. 1.5A  +3.3 V max.
  • Page 39: Table 2-24: Channel Extension Video Input (Cn8)

    Function Function CH4 video in CH5 video in CH6 video in CH7 video in Table 2-24: Channel Extension Video Input (CN8) Hardware Reference...
  • Page 40: Crtv-44 Specifications

    2.2.2 cRTV-44 Specifications Video Input Four composite video color digitizers  Video input interface: Four composite BNC connectors  Channel status report LED  Coaxial cable recommended  General Purpose I/O Lines All I/O lines are TTL compatible with 4 input, 4 output, and 4 ...
  • Page 41: Figure 2-10: Crtv-44 Appearance

    Figure 2-10: cRTV-44 Appearance Dimensions W x L: 160(mm) x 233.35(mm)  Operating Environment Temperature: 0 to 55°C  Humidity: 5 to 90% RHNC  Storage Environment Temperature: 0 to 70°C  Humidity: 0 to 95% RHNC  Hardware Reference...
  • Page 42: Table 2-26: Crtv Video Inputs

    Power Requirements +5V max. 1.5A  +3.3 V max. 0.65A  cRTV-44 Standard Accessories User Manual  All in One CD  Connector Definition CH0 (Channel 0 BNC) CH1 (Channel 1 BNC) CH2 (Channel 2 BNC) CH3 (Channel 3 BNC) Table 2-26: cRTV Video Inputs Hardware Reference...
  • Page 43: Table 2-27: Channel Extension Video Input (Cn8)

    Function Function CH4 video in CH5 video in CH6 video in CH7 video in Table 2-27: Channel Extension Video Input (CN8) GPIO 0 Pins IN0 and OUT0 are used by channel 0  Pins IN1 and OUT1 are used by channel 1 ...
  • Page 44: Table 2-29: Gpio 1 Pinout

    Function PIN Function IN2 (External interrupt) OUT2 IN3 (External interrupt) OUT3 Table 2-29: GPIO 1 Pinout Hardware Reference...
  • Page 45: Pmc-Rtv Series

    2.3 PMC-RTV Series 2.3.1 PMC-RTV21 Specifications Video Input Four composite video color digitizers  Video input interface: DB-9 female connectors  Coaxial cable recommended  General Purpose I/O Lines The I/O lines are TTL compatible with 1 input and 1 output ...
  • Page 46: Figure 2-11: Pmc-Rtv21 Appearance

    Figure 2-11: PMC-RTV21 Appearance Dimensions W x L: 74(mm) x 149(mm)  Operating Environment Temperature: 0 to 55°C  Humidity: 5 to 90% RHNC  Storage Environment Temperature: 0 to 70°C  Humidity: 0 to 95% RHNC  Power Requirements +5V max.
  • Page 47: Table 2-31: Video Input

    PMC-RTV21 Connectors & Pin Definition Figure 2-12: PMC-RTV21 Video Input & GPIO Function Function CH0 Video In CH1 Video In CH2 Video In CH3 Video In Table 2-31: Video Input Hardware Reference...
  • Page 48: Table 2-32: Gpio Pinout

    Function PIN Function IN0 (External interrupt) OUT0 Table 2-32: GPIO Pinout Hardware Reference...
  • Page 49: Pmc-Rtv24 Specifications

    2.3.2 PMC-RTV24 Specifications Dimensions W x L: 74(mm) x 149(mm)  Operating Environment Temperature: 0 to 55°C  Humidity: 5 to 90% RHNC  Storage Environment Temperature: 0 to 70°C  Humidity: 0 to 95% RHNC  Power Requirements +5V max. 1.5A ...
  • Page 50 General Purpose I/O Lines The I/O lines are TTL compatible with 1 input and 1 output  GPIO interface:  One DB-15 male connector  The I/O lines are internally pulled up and have the fol-  low¬ing characteristics: Hardware Reference...
  • Page 51: Table 2-33: Gpio Characteristics

    Voltage Input high voltage (20 uA) 2.0V 5.25V Table 2-33: GPIO Characteristics Voltage Input low voltage (-0.2 uA) 0.0V 0.80V Input high voltage (-1.0 mA) 5.0V Output low voltage (100.0 mA) 0.5V Table 2-34: GPIO Characteristics User EEPROM Includes 1kbit available EEPROM ...
  • Page 52: Table 2-35: Video Input

    Function Function CH0 Video In CH1 Video In CH2 Video In CH3 Video In Table 2-35: Video Input Function Function PIN Function IN0 (External interrupt) +5V output(Max.1A) OUT0 IN1 (External interrupt) OUT1 IN2 (External interrupt) OUT2 IN3 (External interrupt) OUT3 Table 2-36: GPIO Pin-out Hardware Reference...
  • Page 53: Installation Guide

    Installation Guide 3.1 Hardware Installation 3.1.1 RTV Series Use the following steps to install the RTV series board on the PCI bus: 1. Remove the computer cover using the instructions from the computer manual. 2. Check that there is an empty PCI (32-bit) slot t accom- modate the board.
  • Page 54: Crtv Series

    6. Anchor the board by replacing the screw. 7. Connect your video sources for image acquisition tests. For details, refer to the ‘ViewCreator Utility.” 8. Turn on the computer. In some cases, when the com- puter boots up, the “Plug and Play” feature of Windows will detect the new PCI card 8 times (4 videos and 4 audios) and you will require drivers.
  • Page 55: Figure 3-2: Crtv-24 (3U Cpci)

    Figure 3-2: cRTV-24 (3U cPCI) Installation Guide...
  • Page 56: Figure 3-3: Crtv-44 (6U Cpci)

    Figure 3-3: cRTV-44 (6U cPCI) 5. Carefully slide the cRTV-24 (3U)/cRTV-44 (6U) along the guide of the chosen slot to the backplane and push the board firmly but carefully into the connector, Lock the board in place by pushing the release lever outwards. 6.
  • Page 57: Pmc-Rtv Series

    The PMC socket may be integrated with the cPCI CPU board or as a standalone system board for an embedded system. Use the following steps to install the PMC-RTV series board onto the PMC socket: 1. Remove the computer cover using the instructions from the computer manual.
  • Page 58: Rtv-E4 Extension Board (Optional)

    3.1.4 RTV-E4 Extension Board (Optional) 1.For main board installation, please refer to ‘RTV series’. 2.Each RTV-E4 will attach one signal cable for connect with RTV- 24 as below Figure 3-4: RTV-E4 Attachment Installation Guide...
  • Page 59: Rtv-I4 Extension Board (Optional)

    3.1.5 RTV-I4 Extension Board (Optional) 1.For main board installation, please refer to ‘RTV series’. 2.Each RTV-I4 will attach one signal cable for connect with RTV- 24 as below Figure 3-5: RTV-I4 Attachment Installation Guide...
  • Page 60: Driver Installation

    3.2 Driver Installation 3.2.1 WDM Driver Installation 1. Run setup. 2. Click Next until the driver is completely installed. Installation Guide...
  • Page 61 Installation Guide...
  • Page 62 Installation Guide...
  • Page 63 3. Click yes and restart system. 4. Open the Device Manager and check for the following 8 items: ADLINK Angelo Audio Device (4 instances)  ADLINK Angelo Video Device (4 instances)  Installation Guide...
  • Page 64 The Device Manager should be as follows: Installation Guide...
  • Page 65 Note: If using Windows Vista, the User Account Control (UAC) needs to be turned off before using the device. To turn off the UAC, go to [Start] - [Settings] - [Control Panel] - [User Ac- counts] - [Turn User Account Control on or off]. Uncheck the UAC and restart the computer, then the device can work nor- mally.
  • Page 66: Directshow Driver Installation

    3.2.2 DirectShow Driver Installation 1. Run setup. 2. Click Next until the driver is completely installed. Installation Guide...
  • Page 67 Installation Guide...
  • Page 68 3. When the following window appears, please click “Con- tinue Anyway”. Installation Guide...
  • Page 69 4. Open the Device Manager and check for the following 8 items: ADLINK Bt878 DirectX Audio Capture (4 instances)  ADLINK Bt878 DirectX Video Capture (4 instances)  Installation Guide...
  • Page 70 The Device Manager should be as follows: Installation Guide...
  • Page 71: Rtv-Lview Installation

    3.2.3 RTV-LVIEW Installation 1. Double-click the setup.exe file to start RTV-LVIEW installation. 2. Continuously click the Next button to install RTV-LVIEW. Installation Guide...
  • Page 72 3. Click the Finish button to finish the installation. Installation Guide...
  • Page 73: Uninstall Rtv-Lview

    3.2.4 Uninstall RTV-LVIEW Open the Control Panel and double-click Add/Remove Pro- grams. Select RTV-LVIEW and click the Change/Remove button to uninstall it. After un-installation, all files in the directory of RTV-LVIEW will be removed, except the ADLINK_Vision palette. If you do not want to use it any more, you can remove the Angelo.llb in the user.lib folder and the menus\ADLINK_Vision folder.
  • Page 74: Linux Driver Installation

    3.2.5 Linux Driver Installation The driver is compiled as a kernel module and works for kernel version 2.6. Compile bttv for your system BTTV is an open source driver and conforms to Video for Linux standard. 1. Open a terminal console and enter the following com- mands to start installation: 2.
  • Page 75 7. Restart the computer. The driver should be loaded auto- matically while booting. Enter the following command to see if the driver was loaded: # lsmod | grep bttv 8. If there is a bttv module, the driver is loaded success- fully.
  • Page 76 Installation Guide...
  • Page 77: Viewcreatorpro Utility

    ViewCreatorPro Utility Once hardware installation is complete, ensure that they are con- figured correctly before running the ViewCreatorPro utility. This chapter outlines how to establish a vision system and hot to manu- ally controlling Angelo series cards to verify correct operation. ViewCreatorPro provides a simple yet powerful means to setup, configure, test, and debug the vision system.
  • Page 78: Component Description

    4.2 Component Description Start the utility and the view should like below: ViewCreatorPro Utility...
  • Page 79: Operation Theory

    4.3 Operation Theory ViewCreatorPro provides many functions for the Angelo RTV series cards as described below: 4.3.1 Devices Panel Local Current active Device All operations will apply to this device. Inactive Device Click the port after this icon to activate this device. Current active port All operations will apply to this port.
  • Page 80: Adjustment Panel

    4.3.2 Adjustment Panel A panel allows user adjusting video images. Click and hold the left mouse button on the slider of the Adjustment Panel and drag the cursor to change its value. Or type value into the edit tool to change its value directly.
  • Page 81 Original Size Restore the images which are selected to original size. The images which are selected will have a blue frame. Zoom In Zoom in the images which are selected. The images which are selected will have a blue frame. Zoom Out Zoom in the images which are selected.
  • Page 82 After stopping grabbing, the background color of focus value win- dow is black. The x-axis size is the width of the whole image. The window is shown below: If the image is chromatic and is RGB type, there are three curves represented red, green, and blue individual in the chart.
  • Page 83 If the image is chromatic and is YUV type, there are three curves represented y, u, and v individual in the chart. The window is shown below: Zoom In Open a window to zoom in the green rectangle region. Differential Open a window to show the slop of the line for the green rectangle region.
  • Page 84: Status Bar

    Show/Hide Y Values Show or hide the y value of the pixels. Show/Hide U Values Show or hide the u value of the pixels. Show/Hide V Values Show or hide the v value of the pixels. Focus Cross See pixel values of the selected point of the image on toolbar. The display image shows a blue cross line on it.
  • Page 85: Display Panel

    4.3.5 Display Panel Press left mouse button on the image and then there will be a blue frame around the image. It means the image is selected. If user wants select more images, please keep pressing Ctrl and click the other images.
  • Page 86 Press left mouse button and then drag it, display panel will appear a green rectangle region which will be zoomed in. Keep pressing Shift during dragging, the image will be zoomed in at the same proportion of width and height. Shown below: Press right mouse button, the cursor will become a move2D icon.
  • Page 87: Main Menu

    4.3.6 Main Menu File menu Open Image  Open an image from a file and display it to the display panel. Save Image  Save current displaying image to a bitmap file. Exit  Terminate ViewCreatorPro. View menu Devices  Hide or unhide Devices panel.
  • Page 88 Image Size menu Full Image   Set buffer sizes of the channels showed on display panel to full image size. Cif Image  Set buffer sizes the channels showed on display panel to cif image size. Qcif Image  Set buffer sizes the channels showed on display panel to qcif image size.
  • Page 89 EEPROM  Click Tool in the menu bar and select EEPROM to bring up the EEPROM dialog box. Select the card you wish to access, enter the offset and output values, and then click the Write button to write the value into the EEPROM. Enter the offset value and click the Read button to read the value from the EEPROM.
  • Page 90 Help menu About  Click Help in the menu bar and select About ViewCreator- Pro to bring up the About ViewCreatorPro box. This window will show ViewCreatorPro version. AboutDevice  Click Help in the menu bar and select About Device to bring up the About Device box.
  • Page 91: Function Library

    Function Library This chapter describes the API for Angelo RTV series cards. Users can use these functions to develop application programs under Visual C++, Visual Basic, C++ Builder, C#, Visual Basic .Net, and Delphi. Function Library...
  • Page 92: List Of Functions

    5.1 List of Functions Category Section Function AngeloRTV_Initial(PortNo) AngeloRTV_Close(PortNo) System AngeloRTV_Software_Reset(PortNo) AngeloRTV_Read_Serial(CardNo, HighByte, LowByte) AngeloRTV_Get_Version(DriverVersion, DLLVersion, Reserved) AngeloRTV_Set_Image_Config(PortNo, ConfigIndex,Value) AngeloRTV_Get_Image_Config(PortNo, ConfigIndex, Value) AngeloRTV_Set_Color_Format(PortNo, ColorFormat) AngeloRTV_Get_Color_Format(PortNo, ColorFormat) Configuration AngeloRTV_Set_Video_Format(PortNo, Value) AngeloRTV_Get_Video_Format(PortNo, Value) AngeloRTV_Set_Image_Geometric(PortNo, X_Offset, Y_Offset, X_Active, Y_Active, X_Scale, Y_Scale) AngeloRTV_Detect_Video_Format(PortNo, FormatValue) AngeloRTV_Capture_Start(PortNo, CaptureNo) AngeloRTV_Select_Channel(PortNo, Multiplex) Image Grabbing...
  • Page 93: C/C++ Programming Library

    5.2 C/C++ Programming Library Function prototypes and common data types are defined in Angelo.h. The Angelo series library uses these data types. We suggest that these data types be used in your application pro- grams. The following table shows the data types and their range: Type Name Description Range...
  • Page 94: System Functions

    5.3 System Functions @ Name AngeloRTV_Initial(PortNo) Initialize the port in Angelo series card. AngeloRTV_Close(PortNo) Close the port in Angelo series card. AngeloRTV_Software_Reset(PortNo) Reset the port in Angelo series card. AngeloRTV_Read_Serial(CardNo, HighByte, LowByte) Read the unique 48-Bit Serial Number of Angelo Series Card (Only for RTV-24 Rev.B1 above, PCI-2100 Rev.A2 above) AngeloRTV_Get_Version(DriverVersion, DLLVersion, Reserved) Get the version of driver of AngeloRTV card and AngeloRTV.dll.
  • Page 95 I16 AngeloRTV_Close(U16 PortNo) I16 AngeloRTV_Software_Reset(U16 PortNo) U16 AngeloRTV_Read_Serial(U16 CardNo, U32* HighByte, U32* LowByte); I16 AngeloRTV_Get_Version(U32 *DriverVersion, U32 *DLLVersion, U32 *Reserved) Visual Basic (Windows/CE.NET) AngeloRTV_Initial (ByVal PortNo As Integer) As Integer AngeloRTV_Close(ByVal PortNo As Integer) As Integer AngeloRTV_Software_Reset (ByVal PortNo As Integer) As Integer AngeloRTV_Read_Serial(Byval CardNo as Integer, ByRef HighByte As Long, ByRef LowByte As...
  • Page 96 DriverVersion: Indicate the current version of AngeloRTV driver. This parameter is a pointer to an integer array with length 4. DLLVersion: Indicate the current version of AngeloRTV.dll file. This parameter is a pointer to an integer array with length 4. @ Return Code 0: ERROR_NoError ...
  • Page 97 I16 Result; U32 DriverVersion[4] = {0}, DLLVersion[4] = {0}, Reserved[4] = {0}; char strDriverVersion[20], strDLLVersion[20]; Result = AngeloRTV_Get_Version (DriverVersion, DLLVersion, Reserved); sprintf(strDriverVersion, "%d.%d.%d.%d", DriverVersion[0], DriverVersion[1], DriverVersion[2], DriverVersion[3]); sprintf(strDLLVersion, "%d.%d.%d.%d", DLLVersion[0], DLLVersion[1], DLLVersion[2], DLLVersion[3]); < Visual Basic > AngeloRTV_Initial – Dim Result As Integer Dim PortNo As Integer For PortNo= 0 To 3 Result = AngeloRTV_Initial (ByVal PortNo)
  • Page 98 Result = AngeloRTV_Get_Version (DriverVersion(0), DLLVersion(0), Reserved(0)) strDriverVersion = CStr(DriverVersion(0)) + "." + CStr(DriverVersion(1)) + "." + CStr(DriverVersion(2)) + "." + CStr(DriverVersion(3)) strDLLVersion = CStr(DLLVersion(0)) + "." + CStr(DLLVersion(1)) + "." + CStr(DLLVersion(2)) + "." + CStr(DLLVersion(3)) <Delphi > AngeloRTV_Initial – var PortNo,Result:SmallInt;...
  • Page 99 Result := AngeloRTV_Get_Version (DriverVersion[1], DLLVersion[1], Reserved[1]); strDriverVersion := IntToStr(DriverVersion[1]); strDriverVersion := strDriverVersion + '.' + IntToStr(DriverVersion[2]); strDriverVersion := strDriverVersion + '.' + IntToStr(DriverVersion[3]); strDriverVersion := strDriverVersion + '.' + IntToStr(DriverVersion[4]); strDLLVersion := IntToStr(DLLVersion[1]); strDLLVersion := strDLLVersion + '.' + IntToStr(DLLVersion[2]); strDLLVersion := strDLLVersion + '.' + IntToStr(DLLVersion[3]);...
  • Page 100: Configuration Functions

    5.4 Configuration Functions @ Name AngeloRTV_Set_Image_Config(PortNo, ConfigIndex ,Value) Set the video adjustments. AngeloRTV_Get_Image_Config(PortNo, ConfigIndex, Value) Get the video adjustments. AngeloRTV_Set_Color_Format(PortNo, ColorFormat) Set the color format. AngeloRTV_Get_Color_Format(PortNo, ColorFormat) Get the color format. AngeloRTV_Set_Video_Format(PortNo, Value) Set the video format. AngeloRTV_Get_Video_Format(PortNo, Value) Set the video format. AngeloRTV_Set_Image_Geometric(PortNo, X_Offset, Y_Offset, X_Active, Y_Active, X_Scale, Y_Scale) Advanced image processing.
  • Page 101: Figure 5-1: Video Frame

    Sets the Video format of the port for the Angelo series card. Valid color formats are: NTSC, EIA, PAL, CCIR. AngeloRTV_Get_ Video _Format: Retrieves the video format of the port for the Angelo series card. AngeloRTV_Set_Image_Geometric: This function is used for image cropping and scaling. AngeloRTV_Detect_Video_Format: Use the function to retrieve the video format.
  • Page 102 I16 AngeloRTV_Set_Video _Format (U16 PortNo, U8 VideoFormat); I16 AngeloRTV_Set_Video _Format (U16 PortNo, U8* VideoFormat); I16 AngeloRTV_Set_Image_Geometric(U16 PortNo, U32 X_Offset, U32 Y_Offset, U32 X_Active, U32 Y_Active,double X_Scale,double Y_Scale); I16 AngeloRTV_Detect_Video_Format (U16 PortNo, U8 *FormatValue); Visual Basic (Windows/CE.NET) AngeloRTV_Set_Image_Config(ByVal PortNo As Integer, ByVal ConfigIndex As Byte,ByVal Value As Byte) As Integer AngeloRTV_Get_Image_Config(ByVal PortNo As Integer, ByVal ConfigIndex As Byte, ByRef...
  • Page 103 AngeloRTV_Get_Color_Format(PortNo:Smallint;var ColorFormat:Byte):Smallint; AngeloRTV_Set_Video_Format(PortNo:Smallint;Video Format:Byte):Smallin; AngeloRTV_Get_Video_Format(PortNo:Smallint;var VideoFormat:Byte):Smallint; AngeloRTV_Set_Image_Geometric (PortNo:Smallint; X_Offset:LongInt; Y_Offset:LongInt; X_Active:LongInt; Y_Active:LongInt; X_Scale:Double; Y_Scale:Double):Smallint; AngeloRTV_Detect_Video_Format(PortNo:Smallint; var FormatValue:Byte):Smallint; @ Arguments PortNo: Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.”...
  • Page 104 Color Format: RGB16 = 0,  GRAY = 1,  RGB15 = 2,  RGB24 = 3,  RGB32 = 4,  RGB8 = 5,  RAW8X = 6,  YUY24:2:2= 7,  Video Format: Full NTSC (640*480) = 0, ...
  • Page 105 This parameter value is the number of lines to skip before the first line of the active video image. FormatValue: If the return value of this parameter is 0 that means there is no video signal input. And if the value is 1 or 2, the video format of the port is NTSC.
  • Page 106 U32 Y_Offset = 80; Double X_Scale = 1.0; Double Y_Scale = 1.0; Result = AngeloRTV_Set_Image_Geometric (PortNo, X_Offset, Y_Offset, X_Active, Y_Active, X_Scale, Y_Scale); AngeloRTV_Detect_Video_Format – I16 Result; U16 PortNo; FormatValue; PortNo = 0; Result = AngeloRTV_Detect_Video_Format (PortNo, &FormatValue); < Visual Basic > AngeloRTV_Set_Image_Config –...
  • Page 107 Result = AngeloRTV_Set_Video_Format(ByVal PortNo, ByVal VideoFormat) Result = AngeloRTV_Get_Video_Format(ByVal PortNo, ByRef VideoFormat) AngeloRTV_Set_Image_Geometric – Dim Result As Integer Dim PortNo As Integer Dim X_Active As Long Dim Y_Active As Long Dim X_Offset As Long Dim Y_Offset As Long Dim X_Scale As Double Dim Y_Scale As Double PortNo = 0 X_Active = 600...
  • Page 108 Result := AngeloRTV_Get_Image_Config (PortNo, ConfigIndex, Value); AngeloRTV_Set_Color_Format – AngeloRTV_Get_Color_Format – AngeloRTV_Set_Video_Format – AngeloRTV_Get_Video_Format – Result : SmallInt; PortNo : SmallInt; VideoFormat: Byte; ColorFormat: Byte; PortNo:=0; VideoFormat:=0; ColorFormat:=3; Result := AngeloRTV_Set_Color_Format(PortNo,ColorForm at); Result := AngeloRTV_Get_Color_Format(PortNo,ColorForm at); Result := AngeloRTV_Set_Video_Format(PortNo,VideoForm at); Result := AngeloRTV_Get_Video_Format(PortNo, VideoFormat);...
  • Page 109 Result := AngeloRTV_Set_Image_Geometric(PortNo, X_Offset, Y_Offset, X_Active, Y_Active, X_Scale, Y_Scale); AngeloRTV_Detect_Video_Format – Result : SmallInt; PortNo : SmallInt; FormatValue : Byte; PortNo := 0; Result := AngeloRTV_Detect_Video_Format (PortNo, FormatValue); Function Library...
  • Page 110: Image Grabbing

    5.5 Image Grabbing @ Name AngeloRTV_Capture_Start(PortNo, CaptureNo) Start to grab the video image AngeloRTV_Select_Channel(PortNo, Multiplex) Channel extension of video signal, for advanced only AngeloRTV_Capture_Stop(PortNo) Stop to grab the video image AngeloRTV_Capture_Config(PortNo, Start_Field) Set the starting field of image AngeloRTV_Sync_Grab(PortNo, Start_Address, Width, Height, Size_Byte) Get an image frame with start address of memory @ Description...
  • Page 111 @ Syntax C/C++ (Windows/CE.NET) I16 AngeloRTV_Capture_Start (U16 PortNo, U32 CaptureNo) I16 AngeloRTV_Select_Channel (U16 PortNo, U16 Multiplex) I16 AngeloRTV_Capture_Stop (U16 PortNo) I16 AngeloRTV_Capture_Config (U16 PortNo, U32 Start_Field) I16 AngeloRTV_Sync_Grab(U16 PortNo, U32* Start_Address, U32* Width, U32* Height, U32* Size_Byte) Visual Basic (Windows/CE.NET) AngeloRTV_Capture_Start (ByVal PortNo As Integer, ByVal CaptureNo As Long) As Integer AngeloRTV_Select_Channel (ByVal PortNo As...
  • Page 112 Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.” CaptureNo: Total number of frames to capture.
  • Page 113 Memory size in bytes. @ Return Code 0: ERROR_NoError  -7: ERROR_Not_Initialized – Make sure the port has been  initialized by “AngeloRTV_Initial”. -9: ERROR_Invalid_PortNo – Please input the correct  “PortNo” parameter. @ Example <VC/BCB > AngeloRTV_Capture_Config – AngeloRTV_Capture_Start – AngeloRTV_Sync_Grab –...
  • Page 114 Result = AngeloRTV_Capture_Config (ByVal PortNo, ByVal Start_Field) Result = AngeloRTV_Capture_Start (ByVal PortNo, ByVal CaptureNo) Result = AngeloRTV_Sync_Grab (ByVal PortNo, StrAddr, Width, Height, Size_Byte) Result = AngeloRTV_Capture_Stop (ByVal PortNo) <Delphi > AngeloRTV_Capture_Config – AngeloRTV_Capture_Start – AngeloRTV_Sync_Grab – AngeloRTV_Capture_Stop – Result : SmallInt; PortNo: SmallInt;...
  • Page 115: Gpio & Eeprom Functions

    5.6 GPIO & EEPROM Functions @ Name AngeloRTV_Set_GPIO_Sts (PortNo, Status) Set Digital Output status. AngeloRTV_Get_GPIO_Sts (PortNo, Status) Get Digital Input status. AngeloRTV_Set_GPIO_Int_Logic (PortNo, Logic) Configure the Digital Input Interrupt condition AngeloRTV_Write_EEPROM (PortNo, Offset, Value) Write data into EEPROM AngeloRTV_Read_EEPROM (PortNo, Offset, Value) Read data from EEPROM AngeloRTV_Set_LED_Sts (PortNo, LEDStatus) Set LED status for cPci RTV24 card.
  • Page 116 @ Syntax C/C++ (Windows/CE.NET) I16 AngeloRTV_Set_GPIO_Sts(U16 PortNo,U8 Status); I16 AngeloRTV_Get_GPIO_Sts(U16 PortNo,U8* Status); I16 AngeloRTV_Set_GPIO_Int_Logic(U16 PortNo, U16 Logic); I16 AngeloRTV_Write_EEPROM(U16 CardNo, U8 Offset, U8 Value); I16 AngeloRTV_Read_EEPROM(U16 CardNo, U8 Offset, U8* Value); I16 AngeloRTV_Set_LED_Sts (U16 PortNo, U8 LEDStatus); Visual Basic (Windows/CE.NET) AngeloRTV_Set_GPIO_Sts (ByVal PortNo As Integer, ByVal Status As Byte) As Integer AngeloRTV_Get_GPIO_Sts (ByVal PortNo As Integer,...
  • Page 117 @ Argument PortNo: Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.”...
  • Page 118 AngeloRTV_Get_GPIO_Sts – I16 Result; I16 PortNo = 0; Status = 1; Result = AngeloRTV_Set_GPIO_Sts (PortNo, Status); Result = AngeloRTV_Get_GPIO_Sts (PortNo, & Status); AngeloRTV_Set_GPIO_Int_Logic – I16 Result; U16 PortNo = 0; U16 Logic = 0; Result = AngeloRTV_Set_GPIO_Int_Logic (PortNo, Logic); AngeloRTV_Write_EEPROM AngeloRTV_Read_EEPROM I16 Result;...
  • Page 119 AngeloRTV_Set_GPIO_Int_Logic – Dim Result As Integer Dim PortNo As Integer Logic As Integer PortNo = 0 Logic = 0 Result = AngeloRTV_Set_GPIO_Int_Logic (ByVal PortNo, ByVal Logic) AngeloRTV_Write_EEPROM AngeloRTV_Read_EEPROM Dim Result As Integer Dim PortNo As Integer Dim Offset As Byte Dim Value As Byte PortNo = 0 Offset =0...
  • Page 120 Result: SmallInt; PortNo: SmallInt; Logic: SmallInt; PortNo := 0; Logic := 0; Result := AngeloRTV_Set_GPIO_Int_Logic (PortNo, Logic); AngeloRTV_Write_EEPROM AngeloRTV_Read_EEPROM Result : SmallInt; PortNo : SmallInt; Offset: Byte; Value: Byte; PortNo:=0; Offset:=0; Value:=128; Result := AngeloRTV_Write_EEPROM (PortNo, Offset, Value); Result := AngeloRTV_Read_EEPROM (PortNo, Offset, Value);...
  • Page 121: Callback & Thread Functions

    5.7 Callback & Thread Functions @ Name AngeloRTV_Get_Int_Status (PortNo, IntStatus) Gets the current interrupt status AngeloRTV_Set_Int_Event (PortNo,hEvent) Assigns the windows interrupt event AngeloRTV_Set_Callback(PortNo, CallBackProc) Sets the callback function when an interrupt is generated @ Description AngeloRTV_Get_Int_Status: Allows users to identify what caused an interrupt signal. Bit 0: GPIO interrupt, when Digital input channel is changed.
  • Page 122 I16 AngeloRTV_Set_Callback (U16 PortNo, void ( __stdcall *CallBackProc)(U32 VideoBufferaddress ,U16 PortNo)); Visual Basic (Windows/CE.NET) AngeloRTV_Set_Int_Event (ByVal PortNo As Integer, ByRef hEvent As Long) As Integer AngeloRTV_Get_Int_Status(ByVal PortNo As Integer, ByRef IntStatus As Long) As Integer AngeloRTV_Set_Callback(ByVal PortNo As Integer, ByVal CallBack As Long) As Integer Delphi (Windows) AngeloRTV_Set_Int_Event(PortNo:Smallint;var hEvent:Integer):Smallint;...
  • Page 123 @ Return Code 0: ERROR_NoError  -7: ERROR_Not_Initialized – Make sure the port has been  initialized by “AngeloRTV_Initial”. -9: ERROR_Invalid_PortNo – Please input the correct  “PortNo” parameter. @ Example < VC/BCB > Use Thread: HANDLE hEvent=NULL; void *pThread=NULL; U32 threadID;...
  • Page 124 ResetEvent(hEvent); Return TRUE; AngeloRTV_Set_Int_Event(PortNo,&hEvent); pThread =CreateThread(NULL, 0, IntThreadProc, 0, 0, &threadID); Use Callback Function: U16 PortNo = 0; void __stdcall MediaStreamProc( U32 VideoBufferaddress ,U16 PortNo) U32 Status; AngeloRTV_Get_Int_Status(PortNo,&Status); if((Status&0x01)==1)//GPIO if((Status>>1&0x01)==1)//Channel 0 of the nPort else if((Status>>2&0x01)==1)//Channel 1 of the nPort else if((Status>>3&0x01)==1)//Channel 2 of the nPort else if((Status>>4&0x01)==1)//Channel 3 of...
  • Page 125 Dim Status As Long Result = AngeloRTV_Get_Int_Status(PortNo, Status) End Sub PortNo = 0 Result = AngeloRTV_Set_Callback(PortNo, AddressOf lpcallback) <Delphi > Use Thread ISR_ON : SmallInt; Event_Angelo:Integer; ThreadId : LongInt; PortNo: SmallInt; PortNo:=0; function ThreadFunc(Parameter: Pointer): Integer ; Str_Add :Pointer; Size_Byte :Longint; intstatus : LongInt;...
  • Page 126 Use Callback function PortNo: SmallInt; PortNo:=0; procedure MyCallback(VideoBufferAddress : LongInt;PortNo : SmallInt);stdcall Str_Add :Pointer; Result :Smallint; Size_Byte :LongInt; intstatus :LongInt; begin AngeloRTV_Get_Int_Status(PortNo,intstatus); if intstatus = 2 then begin end; end; AngeloRTV_Set_Callback(Cur_Port,MyCallback); Function Library...
  • Page 127: Watchdog Timer

    5.8 Watchdog Timer Note: This function is only available for RTV-24. @ Name AngeloRTV_Set_WDT(CardNo, Enable, Interval) Sets the watch dog status(Only for PCI-RTV24) @ Description AngeloRTV_Set_WDT: Enables or disables the watch dog timer in the Angelo series cards, and set the interval of timer. When users have enabled the watch dog timer and selected a 16 seconds interval, a system reset signal will be triggered if this function is not called after 16 seconds.
  • Page 128 @ Return Code 0 : ERROR_NoError  -7: ERROR_Not_Initialized – Make sure the port has been  initialized by “AngeloRTV_Initial”. -9 : ERROR_Invalid_PortNo – Please input the correct  “PortNo” parameter. @ Example <VC/BCB > AngeloRTV_Set_WDT I16 Result; U16 CardNo = 0; U16 Enable = 1;...
  • Page 129: Software Trigger

    5.9 Software Trigger @ Name AngeloRTV_Trigger_Config (PortNo,Interval) Sets software trigger configuration(Only for PCI-RTV24, cPCI- RTV-24, cPCI-RTV44) AngeloRTV_Trigger_Start (CardNo, Multiplex) Generates single or multiple trigger output simultaneously(Only for PCI-RTV24, cPCI-RTV-24, cPCI-RTV44) @ Description AngeloRTV_Trigger_Config: Configures the pulse output interval. AngeloRTV_Trigger_Start: Generates a one shot pulse output for single or multiple ports. @ Syntax C/C++ (Windows/CE.NET) I16 AngeloRTV_Trigger_Config(U16 PortNo,U16...
  • Page 130 Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.” Interval: Indicates the trigger output interval, the valid range is from 0 to 253, the definition is as following...
  • Page 131 I16 Result; U16 CardNo = 0; U16 PortNo = 0; U16 Multiplex = 1; U16 Interval = 32; Result = AngeloRTV_Trigger_Config(PortNo,Interval); Result = AngeloRTV_Trigger_Start(CardNo, Multiplex); < Visual Basic > AngeloRTV_Trigger_Config AngeloRTV_Trigger_Start Dim Result As Integer Dim CardNo As Integer Dim PortNo As Integer Dim Multiplex As Integer Dim Interval As Integer CardNo = 0...
  • Page 132: Frame Buffer

    5.10 Frame Buffer @ Name AngeloRTV_Copy_frame (PortNo, Dest_Address, Size_Byte) Copies the frame date to the user allocated destination memory (bytes). AngeloRTV_Get_frame(PortNo, Start_Address,Width, Height, Size_Byte) Gets the frame memory start address and size of frame (bytes). AngeloRTV_Save_File(PortNo, FileName, FileFormat, nQuality) Save the video frame into an image file. @ Description AngeloRTV_Copy_frame: Copies frame data to memory or an array that the user has allo-...
  • Page 133 Format DWORD(32Bit) Pixel Data {0,R0[30:26], {0,R0[14:10], RGB15 G0[25:21], G0[9:5], B0[20:16]} B0[4:0]} Gray Scale(Y8) Table 5-3: Pixel Data @ Syntax C/C++ (Windows/CE.NET) I16 AngeloRTV_Copy_Frame(U16 PortNo,U8 *Dest_Address,U32 Size_Byte); I16 AngeloRTV_Get_Frame(U16 PortNo,U32* Start_Address, U32* Width, U32* Height, U32* Size_Byte); 16 AngeloRTV_Save_File(U16 PortNo, char* FileName,U8 FileFormat,U32 nQuality);...
  • Page 134 Port number is the zero index of the Angelo series card. For exam- ple, if there are two PCI-RTV-24 Angelo cards (card 0, card 1) in the system, and each PCI-RTV-24 has four ports, the first port of card 0 is “0”, and the first port of card 1 is “4.” Dest_Address: User allocated destination memory address or array.
  • Page 135 U32 Size_Byte = 640*480*3; U8* Dest_Address =NULL; Dest_Address = (U8*)malloc(Size_Byte ); Result = AngeloRTV_Copy_Frame (PortNo, Dest_Address, Size_Byte); AngeloRTV_Get_Frame I16 Result; U16 PortNo = 0; U32 Size_Byte,Width,Height ; U32 StrAddr ; Result = AngeloRTV_Get_Frame(PortNo,&StrAddr, &Width, &Height,&Size_Byte); AngeloRTV_Save_File I16 Result; U16 PortNo = 0; U8 File_Format = 2;...
  • Page 136: Result = Angelortv_Copy_Frame

    PortNo = 0 File_Format = 2 NQuality = 25 Result = AngeloRTV_Save_File (PortNo, “Image.jpg”, File_Format, NQuality) <Delphi > AngeloRTV_Copy_Frame Result : SmallInt; PortNo: SmallInt; Size_Byte :Longint; Dest_Add : array of Byte; PortNo := 0; Size_Byte := 640*480*3; SetLength(Dest_Add, Size_Byte); Result := AngeloRTV_Copy_Frame (PortNo, Dest_Add[0], Size_Byte);...
  • Page 137: Angel Rtv Labview Function Library

    5.11 Angel RTV LabVIEW Function Library AngeloRTV_Init.vi This VI initializes the port of RTV card. Set video format and color format for the port of RTV card. Call this VI before AngeloRTV_Snap.vi. Video Format 0: Full NTSC (640*480)  1: Full PAL (768*576) ...
  • Page 138 AngeloRTV_Hardware_Initial.vi This VI initializes the port of RTV card. Each application program must call this function before any other function. If the initialization succeeds, it returns a value 0. AngeloRTV_Hardware_Close.vi Release resources of all ports. AngeloRTV_Int_Enable.vi This VI links the event and the interrupt automatically. AngeloRTV_Wait_Int.vi Wait for interrupt events.
  • Page 139 AngeloRTV_Get_Color_Format.vi Retrieve the color format of the port AngeloRTV_Set_Image_Config.vi Adjust hue, contrast, saturation and brightness for the port of RTV card. ConfigIndex: 0 for BRIGHTNESS  1 for HUE  2 for SATURATION (U)  3 for SATURATION (V)  4 for CONTRAST (LUMA) ...
  • Page 140 X_Active This parameter is the length of the active video line. X_Offset This parameter is the number of scaled pixels to skip before the start of the active video line. Y_Scale This parameter is the scaling factor applied to the RTV sam- pled data lines in the vertical direction.
  • Page 141 Start_Filed Indicate the first field of image. 0: First field is odd, so the image will be odd field + even  field. 1: First field is even, so the image will be even field + odd  field. 2: First field depends on the current field, so the image ...
  • Page 142 Interval Indicates the trigger output interval. The valid range is from 0 to 253. The definition is as follows: 0: 16 ms  32: 12 ms  128: 8 ms  253: 60μs  AngeloRTV_Sync_Grab.vi Use this VI to obtain an image frame. Retrieve the memory start address from the frame data, width, height, and size in bytes of the image.
  • Page 143: Angelortv_Save_File.vi

    Offset This parameter is valid between 0 and 127 Value Value in byte. This parameter is valid between 0 and 255. AngeloRTV_Read_EEPROM.vi Read data from EEPROM. Data in EEPROM will not be lost when power off. Offset: This parameter is valid between 0 and 127 Value: Value in byte.
  • Page 144 Function Library...
  • Page 145: Programming Guide

    Programming Guide 6.1 DirectShow Programming Guide Introduction A complete documentation on DirectShow application program- ming can be found at: http://msdn.microsoft.com/library/default.asp?url=/library/en- us/directx9_c/directX/htm/introductiontodirectshow.asp. If a DirectX 9.0 is installed, this documentation is also available from DirectX SDK Help. The main goal of writing a DirectShow Application is to build a filter graph by connecting several filters together to perform a given task such as previewing video/audio, capturing video/audio and multiplexing them to write into a file.
  • Page 146 Source Filter ADLink Bt878 Video Capture ADLink Bt878 Video Capture Filter belongs to the category of WDM Streaming Capture Devices. It is actually a kernel-mode KsProxy plug-in. An application can treat it simply as a filter. Use System Device Enumerator to add this filter to a filter graph. Filter Name ADLink Bt878 Video Capture Filter CLSID...
  • Page 147 CrossBar Filter If the device is a capture board, a CrossBar filter is needed for switching video source. In hardware design, crossbar can switch channel input of same port. Filter Name ADLink Bt878 CrossBar Filter Category Name WDM_Streaming Crossbar Devices Example Graphs The Microsoft DirectX SDK provides a very useful debugging utility called GraphEdit, which can be used to simulate graph building.
  • Page 148 Video Proc Amp: ADLink Bt878 Crossbar filter: Select video input before or during video previewing. Programming Guide...
  • Page 149 Example Graph Controlling Driver The ADLink Bt878 Video Capture Filter provides property pages and exposes COM interfaces to control video. So an application can have two ways to control video configurations: using the prop- erty pages and using the COM interfaces. Use Property Pages There are two embedded property pages in the driver.
  • Page 150 Below is the example code for adding property pages: // pFilter points to the capture filter ISpecifyPropertyPages *pSpecify; HRESULT hr; hr = pFilter- >QueryInterface(IID_ISpecifyPropertyPages, (void **)&pSpecify); if (SUCCEEDED(hr)) FILTER_INFO FilterInfo; pFilter->QueryFilterInfo(&FilterInfo); FilterInfo.pGraph->Release(); CAUUID caGUID; pSpecify->GetPages(&caGUID); pSpecify->Release(); OleCreatePropertyFrame( NULL, // Parent window // x (Reserved) // y (Reserved) FilterInfo.achName,// Caption for the...
  • Page 151 Use COM interfaces Use the methods of IAMVideoProvAmp interface of standard DirectShow Interface to get or set the qualities of an incoming video signal. ADLink Bt878 Crossbar The ADLink Bt878 Crossbar filter implements an IAMCrossbar interface. It routes signals from an analog or digital source to a video capture filter.
  • Page 152 if (pFilter- >QueryInterface(IID_IKsPropertySet, (void **)&pKs) == S_OK) hr = pKs- >QuerySupported(PROPSETID_CUSTOMBT848, KSPROPERTY_CUSTOMBT848_GPIO, &TypeSupport); if(TypeSupport & KSPROPERTY_SUPPORT_GET) ZeroMemory(&rc,sizeof(rc)); rc.dwOperation=BT848_CUSTPROP_GPIO_SETGPDAT ABITS; rc.dwFromBit = bit; rc.dwToBit = bit; rc.dwValue = value; rc.dwOffset =0; hr = pKs->Get( PROPSETID_CUSTOMBT848, KSPROPERTY_CUSTOMBT848_GPIO, INSTANCE_DATA_OF_PROPERTY_PTR(&rc), INSTANCE_DATA_OF_PROPERTY_SIZE(rc), &rc, sizeof(rc), &ret); pKs->Release();...
  • Page 153 DWORD ReturnValue=0; DWORD bit = 6;// Offset of GPIO pin if (pFilter == NULL) return 0; if (pFilter- >QueryInterface(IID_IKsPropertySet, (void **)&pKs) == S_OK) hr = pKs- >QuerySupported(PROPSETID_CUSTOMBT848, KSPROPERTY_CUSTOMBT848_GPIO, &TypeSupport); if(TypeSupport & KSPROPERTY_SUPPORT_GET) ZeroMemory(&rc,sizeof(rc)); rc.dwOperation = BT848_CUSTPROP_GPIO_GETGPDATABITS; rc.dwFromBit = bit; rc.dwToBit = bit; rc.dwOffset =0;...
  • Page 154 EEPROM Access ADLink Bt878 Video Capture provides a method for accessing I2C register. The interface can store a few data, for example, board identification. Sample: #define INSTANCE_DATA_OF_PROPERTY_PTR(x)  ( (PKSPROPERTY((x)) ) + 1 ) #define INSTANCE_DATA_OF_PROPERTY_SIZE(x)  ( sizeof((x)) - sizeof(KSPROPERTY) ) BYTE EEPROMRead(IBaseFilter *pFilter, BYTE offset) Purpose:...
  • Page 155 uAddress = 0xa0; // address for the EEPROM device // Set frequency first ZeroMemory(&I2C,sizeof(I2C)); I2C.bDontWaitACK = true; I2C.dwOperation = BT848_CUSTPROP_I2C_SETFREQ; I2C.dwFreq = 100000; hr = pKs->Get( PROPSETID_CUSTOMBT848, KSPROPERTY_CUSTOMBT848_I2C, INSTANCE_DATA_OF_PROPERTY_PTR(&I2C), INSTANCE_DATA_OF_PROPERTY_SIZE(I2C), &I2C, sizeof(I2C), &ret); // Read value then I2C.dwOperation=BT848_CUSTPROP_I2C_R3; I2C.ucAddress= uAddress; I2C.ucInBuf[0] = offset;...
  • Page 156 void EEPROMWrite(IBaseFilter *pFilter, BYTE offset, BYTE value) Purpose: Write.the value to EEPROM Parameters: pFilter: Interface of BT878 filter offset: the offset (0~127) based on starting address of EEPROM value: the data to EEPROM IKsPropertySet *pKs = NULL; DWORD TypeSupport = 0; KSPROPERTY_CUSTOMBT848_I2C_S I2C;...
  • Page 157 hr = pKs->Get( PROPSETID_CUSTOMBT848, KSPROPERTY_CUSTOMBT848_I2C, INSTANCE_DATA_OF_PROPERTY_PTR(&I2C), INSTANCE_DATA_OF_PROPERTY_SIZE(I2C), &I2C, sizeof(I2C), &ret); // Write value then I2C.dwOperation=BT848_CUSTPROP_I2C_WR; I2C.ucAddress= uAddress; I2C.ucOutBuf[0] = offset; I2C.ucOutBuf[1] = value; I2C.dwOutLen = 2; I2C.dwInLen I2C.bDontWaitACK = TRUE; hr = pKs->Get( PROPSETID_CUSTOMBT848, KSPROPERTY_CUSTOMBT848_I2C, INSTANCE_DATA_OF_PROPERTY_PTR(&I2C), INSTANCE_DATA_OF_PROPERTY_SIZE(I2C), &I2C, sizeof(I2C), &ret); pKs->Release();...
  • Page 158 Build Environment Settings Include Files All applications need include the file shown in the following table. Include File Description DShow.h The header file is required for all C++ applications. Custprop.h The header file is required for all C++ applications. The header file is required for all C++ applications Bt848guid.h which need access BT878 proprietary interfaces, for instance, EEPROM and GPIO.
  • Page 159 Microsoft Visual C++ Users VC++ users need to setup the builder environment prior to start to build your program. There are few steps you need to follow as below: 1. Open the solution file (baseclasses.sln) or the project file (baseclasses.dsw) under %DXSDK%\Sam- ples\C++\DirectShow\BaseClasses and build it.
  • Page 160: Labview Programming Guide

    6.2 LabVIEW Programming Guide ADLINK_Vision Controls/Functions Palettes To use RTV-LVIEW VIs, you have to switch the Controls/Func- tions palettes to the ADLINK_Vision palette view first. In Lab- VIEW 7.0, select Tools>>Options to display the Options dialog box. Select Controls/Functions Palettes from the top pull-down menu in the Options dialog box, and select ADLINK_Vision from the Palette View pull-down menu.
  • Page 161 Click ADLINK Vision icon to display the ADLINK_Vision palette view. Then click the AngeloRTV icon, you can find RTV-LVIEW VIs. In LabVIEW 6, click the Options button on the Functions palette toolbar to display the Function Browser Options dialog box. Programming Guide...
  • Page 162 Select ADLINK_Vision from the Palette Set pull-down menu and click OK button. Then you can see the ADLINK_Vision Functions Palette as below. Programming Guide...
  • Page 163 How-to Program with RTV-LVIEW Here we provide a simplest sample showing how to capture a frame with RTV-LVIEW VI. For more complicated samples with RTV-LVIEW, you can reference those located in the  C:\Program Files\ADLINK\RTV-LVIEW\Samples folder. 1. Open a blank VI and switch to the block diagram. Drag and drop AngeloRTV_Init.vi, AngeloRTV_Snap.vi, and AngeloRTV_Close.vi on the block diagram.
  • Page 164 2. Create Constant or Control to each input and connect these VIs. In order to show the captured frame on the front panel, we also drag and drop another VI provided by LabVIEW, named Draw Flattened Pixmap.vi. 3. Push the upper left Run button and you can see a cap- tured frame on the front panel.
  • Page 165 Get Help of RTV-LVIEW You can display the Context Help window by selecting Help>>Show Context Help. LabVIEW will show the information of the RTV-LVIEW VI when you move the cursor over it. Programming Guide...
  • Page 166: Linux Programming Guide

    6.3 Linux Programming Guide Introduction Video4 Linux or V4L is intended to provide a standard video cap- ture application programming interface on Linux. V4L is in its sec- ond version. V4L2 driver include a compatibility mode for V4L1 application that is V4L application can mix the two modes of V4L1 and V4L2.
  • Page 167 Close device Close the device with close () if you no longer use this device. Close ( fd); IO control IO control is a technology communication with driver. V4L sets up many standard IO controls which control video parameters to or get information from driver.
  • Page 168 exit (EXIT_FAILURE); /* Change to the default channel */ int channel = 0; if (-1 == ioctl (fd, VIDIOC_S_INPUT, &channel)) { exit (EXIT_FAILURE); memset (&cropcap, 0, sizeof (cropcap)); cropcap.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (0 == ioctl (fd, VIDIOC_CROPCAP, &cropcap)) { crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;...
  • Page 169 Memory map Memory map system call, mmap (), allows the mapping of device memory directly into a user processor’s address space. From device viewpoint, Direct Memory Access (DMA) operations pro- vide peripherals with direct access to system memory without CPU processing. This can save large of time and loading that application or driver doesn’t need to move data from devices to system memory.
  • Page 170 if (!buffers) { fprintf (stderr, "Out of memory\n"); exit (EXIT_FAILURE); for (n_buffers = 0; n_buffers < req.count; ++n_buffers) { struct v4l2_buffer buf; memset (&buf, o, sizeof (buf)); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = n_buffers; if (-1 == ioctl (fd, VIDIOC_QUERYBUF, &buf)) exit (EXIT_FAILURE);...
  • Page 171 Start capturing void start_capturing (void) unsigned int i; enum v4l2_buf_type type; for (i = 0; i < n_buffers; ++i) { struct v4l2_buffer buf; memset (&buf, 0, sizeof (buf)); buf.type V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; buf.index = i; if (-1 == ioctl (fd, VIDIOC_QBUF, &buf)) exit (EXIT_FAILURE);...
  • Page 172 Read frame Read frame image when an image was ready and prepare next frame. Int read_frame (void) struct v4l2_buffer buf; memset (&buf, 0, sizeof (buf)); buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buf.memory = V4L2_MEMORY_MMAP; /* read frame */ if (-1 == ioctl (fd, VIDIOC_DQBUF, &buf)) { switch (errno) { case EAGAIN: return 0;...
  • Page 173 Proprietary properties Except standard APIs, we also provide a proprietary IO control which can read and write external general purpose IO pin. /* configure the direction (in or out) of each gpio bit prior to reading or writing gpio. int config_gpio (void) unsigned int value = 0xC3FEFF;...
  • Page 174 Programming Guide...
  • Page 175: Appendix

    Appendix 7.1 Glossary Brightness: Attribute of a visual sensation according to which an area appears to exhibit more or less light CCIR: An acronym to designate a scanning system used in Europe. The CCIR system is made of two interlaced fields of 312.5 lines, for a total of 625 lines.
  • Page 176 Frame: One frame (two fields) of video contains the full vertical interlaced information content of the picture. For NTSC this consists of 525 lines and PAL a frame is consisted of 625 lines. Gamma: Cathode ray tubes (CRTs) do not have a linear relationship between brightness and the input voltage applied.
  • Page 177: Standards Compliance

    7.2 Standards Compliance Notice for USA Compliance Information Statement (Declaration of Conformity Procedure) DoC FCC Part 15 This equipment has been tested and found to comply with the lim- its for a Class A digital device, pursuant to Part 15 of the FCC Rules.
  • Page 178 Notice for Europe This product is in conformity with the Council Directive 89/336/EEC amended by 92/31/EEC and 93/68/EEC This equipment has been tested and found to comply with EN55022/CISPR22 and EN55024/CISPR24. To meet EC require- ments, shielded cables must be used to connect a peripheral to the card.

Table of Contents