# HDV62

# Full HD 1080p Frame Grabbers

# User’s Manual

Manual Rev. 2.00

Revision Date: January 18, 2010

Part No: 50-11164-1000

![The image features a black circle containing a white recycling symbol, known as the Mobius loop. The symbol consists of three white arrows arranged in a triangular formation, pointing clockwise to chase one another. Each arrow has a distinct chevron-like head and parallel lines along its body.](.hdv62-50-11164-1000-005-en/c2417ef25a7eec36fd5b29c3a261a895a80a4b3c34fa816039671a8b3b8c2e20.jpg)
Recycled Paper

Copyright 2010 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.

In no event will the manufacturer be liable for direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages.

This document contains proprietary information protected by copyright. All rights are reserved. No part of this manual may be reproduced by any mechanical, electronic, or other means in any form without prior written permission of the manufacturer.

# Trademarks

Product names mentioned herein are used for identification purposes only and may be trademarks and/or registered trademarks of their respective companies.

# Getting Service

Contact us should you require any service or assistance.

# ADLINK Technology Inc.

Address: 9F, No.166 Jian Yi Road, Chungho City, Taipei County 235, Taiwan ؀קᗼխࡉؑ৬ԫሁ 166 ᇆ 9 ᑔ

Tel: +886-2-8226-5877

Fax: +886-2-8226-5717

Email: service@adlinktech.com

# Ampro ADLINK Technology Inc.

Address: 5215 Hellyer Avenue, #110, San Jose, CA 95138, USA

Tel: +1-408-360-0200

Toll Free: +1-800-966-5200 (USA only)

Fax: +1-408-360-0222

Email: info@adlinktech.com

# ADLINK Technology Beijing

Address: ࣫ҀᏖ⍋⎔ऎϞഄϰ䏃 1োⲜ߯ ࡯ࡼ ໻ॺ Eᑻ 801ᅸ (100085) Rm. 801, Power Creative E, No. 1, B/D Shang Di East Rd., Beijing 100085, China

Tel: +86-10-5885-8666

Fax: +86-10-5885-8625

Email: market@adlinktech.com

# ADLINK Technology Shanghai

Address: Ϟ⍋Ꮦⓩ⊇⋒催⾥ᡔᓔথऎ䩺∳䏃 333 ো 39 ᐶ 4 ሖ (200233)

Tel: +86-21-6495-5210

Fax: +86-21-5450-0414

Email: market@adlinktech.com

# ADLINK Technology Shenzhen

Address: ⏅ഇᏖफቅऎ⾥ᡔುफऎ催ᮄफϗ䘧᭄ᄫᡔᴃು A1 ᷟ 2 ὐ C ऎ (518057) 2F, C Block, Bld. A1, Cyber-Tech Zone, Gao Xin Ave. Sec 7, High-Tech Industrial Park S. Shenzhen, 518054 China

Tel: +86-755-2643-4858

Fax: +86-755-2664-6353

Email: market@adlinktech.com

# ADLINK Technology Inc. (German Liaison Office)

Address: Nord Carree 3, 40477 Duesseldorf, Germany

Tel: +49-211-495-5552

Fax: +49-211-495-5557

Email: emea@adlinktech.com

# ADLINK (French Liaison Office)

Address: 15 rue Emile Baudot, 91300 MASSY Cedex, France

Tel: +33 (0) 1 60 12 35 66

Fax: +33 (0) 1 60 12 35 66

Email: france@adlinktech.com

# ADLINK Technology Japan Corporation

Address: 151-0072 ᧲੩ㇺᷦ⼱඙ᐈ䊱⼱ 1-1-2 ᦺᣣ↢๮ᐈ䊱⼱䊎䊦 8F Asahiseimei Hatagaya Bldg. 8F 1-1-2 Hatagaya, Shibuya-ku, Tokyo 151-0072, Japan

Tel: +81-3-4455-3722

Fax: +81-3-5333-6040

Email: japan@adlinktech.com

# ADLINK Technology Inc. (Korean Liaison Office)

Address: 昢殾柢 昢爎割 昢爎壟 1506-25 穢壊 B/D 2 猻 2F, Hando B/D, 1506-25, Seocho-Dong, Seocho-Gu,Seoul, 137-070, Korea

+82-2-2057-0565

Fax: +82-2-2057-0563

Email: korea@adlinktech.com

# ADLINK Technology Singapore Pte Ltd.

Address: 84 Genting Lane #07-02A, Cityneon Design Centre, Singapore 349584

Tel: +65-6844-2261

Fax: +65-6844-2263

Email: singapore@adlinktech.com

# ADLINK Technology Singapore Pte Ltd. (Indian Liaison Office)

Address: No. 1357, "Anupama", Sri Aurobindo Marg, 9th Cross, JP Nagar Phase I, Bangalore - 560078, India

Tel: +91-80-65605817

Fax: +91-80-22443548

Email: india@adlinktech.com

# Table of Contents

# List of Tables ......... iv

# List of Figures ......... v

# 1 Introduction ........

1.1 Features... 1
1.2 Applications .... 2
1.3 System Requirements ... 2

# 2 Hardware Reference........ 3

2.1 HDV62 . 3

Hardware Specifications 3

HDV62 Outline and Mechanical Dimensions .... . 5

Trigger I/O Timing Diagram . 6

HDV62 Connectors and Pin Definitions 7

# 3 Installation Guide ....... 1 3

3.1 Windows Driver Installation . 13

# 4 Function Library ......... . 21

4.1 Function List ... 22
4.2 Setting up the Build Environment .. 26
4.3 Device Control Functions.... 27

Device Count . 27
Device Open .
Device Close . .. 29
Device Vendor Name . .. 30
Device Model Name . 31
Device Version . . 32
Device Firmware Version . . 33
Driver Version . 34
Library Version .. . 35
Device ID . 36
Device Reset . 37

4.4 Image Format Functions.. 38

Channel .. 38

Sensor Format

Sensor Width .. 42

Sensor Height .. 43

Width . . 44

Height .. 45

X Offset .. . 46

Y Offset . . 47

Output Format . .. 48

HDelay . 52

Contrast . 53

Hue . 54

Saturation .55

4.5 Event and Callback Functions ... 56

Event Selector . 56

Event Handle . 57

CallbackSelector . . 59

Callback .. 60

4.6 Acquisition Control Functions .... 61

Acquisition Frame Count .. 61

Acquisition Start . . 63

Acquisition Stop . 64

One Shot .... .. 65

Image Stream .. 66

Acquisition Status .. 67

Acquisition Statistics . 68

Sensor Status . 69

Save Image . . 70

4.7 Trigger Control Functions .. 71

Trigger In Source . 71

Trigger In Polarity .. 72

Software Trigger . 73

One Pulse Out . 74

Trigger Out Polarity . . 75

Trigger Out Pulse Width .. 76

4.8 Digital I/O Functions... 77

4.8.1 Digital IO Selector . 77

DI . 78

DI Event . 79

DO . 80

4.9 Other Functions .. 81

Error Text . . 81

4.10 EDID Functions.. 82

Ready Status .. 82

Access Permission . 84

Write Protection . 86

Rom Selector . 87

Rom Read/Write .. 88

# 5 Programming Guide........... 8 9

5.1 Introduction .. 89

5.2 Descriptions of Filters .. 90

Source Filter . 90

Example Graphs . 92

5.3 Controlling Driver ..... 99

Use Property Pages . . 99

Use COM interfaces . 101

Color Space .. 103

5.4 Proprietary Interfaces . . 106

IVideoFormat . 106

IAdvance . . 111

ICardInfo . 124

INotify .. 127

5.5 Build Environment Settings..... . 128

# 6 ViewCreatorPro Utility ......... 131

6.1 Overview... 131

6.2 Component Description . . 132

Devices panel . 133

Adjustment Panel . . 134

Tool panel . . 135

Status Panel . 139

Display panel . 139

Main Menu . 141

# List of Tables

Table 2-1: Hardware Specifications . 3

Table 2-2: DVI-I Connector Pin Definition (CN1) 7

Table 2-3: D-sub Connector Pin Definition (CN2) 8

Table 2-4: Box Header Pin Definition (CN3) . 9

Table 2-5: Trigger Output Mode Select (SW1) 10

Table 2-6: Digital Output Mode Select (SW2) . 10

Table 2-7: Card ID DIP Switch (SW3) 11

Table 2-8: FPGA Golden Flash Selection (SW4) . 12

Table 4-1: ADLINK HDV62 API Function List .. 25

# List of Figures

Figure 2-1: HDV62 Outline and Mechanical Dimensions............. 5

Figure 2-2: Trigger I/O Timing Diagram .. 6

Figure 4-1: Signals of Frame Image . 42

Figure 4-2: EDID ROM Architecture .. 83

# 1 Introduction

ADLINK’s HDV62 is a PCI Express® x4 lane frame grabber that acquires image and video streams from both HD (High Definition) and SD (Standard Definition) video up to a 170 MHz DVI input, in addition to RGB and YPbPr component analog inputs.

ADLINK's HDV62 delivers the superior quality of high definition video to medical imaging, scientific imaging, military, and high-end video surveillance applications. Equipped with an FPGA (Field Programmable Gate Array) and 512 MB memory buffer, the HDV62 provides the ability to stream image of a specified area to the host PC, and real-time hardware color space conversion to Offload repetitive tasks from the host CPU.

The HDV62 provides the ViewCreator Pro® utility to setup, configure, test, and debug the system without any software programming. And, ADLINK's WDM driver is compatible with Microsoft® Directshow to reduce engineering effort and accelerate the time to market.

# 1.1 Features

 Resolutions up to 1920 x 1080p, 60 fps
 PCI Express® x4 interface
 Supports standard definition and high-definition video input
 Hardware color space conversion, supports RGB, YUV, and monochrome pixel output formats
 512 MB of DDR2 SDRAM frame buffer
 Supports graphical overlays and stream imaging of a specified area
 Configurable EDID
 4 TTL digital inputs/outputs and 1 trigger output Video Input

# 1.2 Applications

 Medical Imaging
 Scientific Imaging
 Broadcast
 Military & Defense
 Video Surveillance

# 1.3 System Requirements

The minimum system requirements for 1-CH real-time Full HD image acquisition are:

 Platform: Pentium 4, 2.4 GHz CPU, 512 MB RAM or above.
Display settings: 1920 x 1080 resolution or above, 16-bit color or above.

# 2 Hardware Reference

# 2.1 HDV62

2.1.1 Hardware Specifications

<table><tr><td>Item</td><td colspan="2">Specifications</td></tr><tr><td rowspan="2">Acquisition Interface</td><td>Digital</td><td>Standard TMDS, DVI 1.0, HDMI 1.3 (non-HDCP and non-audio)</td></tr><tr><td>Analog</td><td>R,G,BY,Pb,Pr</td></tr><tr><td rowspan="5">Video Input Resolutions</td><td>SD(YPbPr@D-Sub 9 Connector)</td><td>720x480i@30fps720x480p@60fps720x576i@25fps720x576p@50fps</td></tr><tr><td>HD(Digital@DVI-I Connector)</td><td>720p@50fps720p@60fps1080i@25fps1080i@30fps1080p@25fps1080p@30fps1080p@50fps1080p@60fps</td></tr><tr><td>HD(YPbPr@D-Sub 9 Connector)</td><td>720p@50fps720p@60fps1080i@25fps1080i@30fps1080p@50fps1080p@60fps</td></tr><tr><td>Computer(Digital@DVI-I Connector)</td><td>VGA (640x480@60)SVGA (800x600@60)XGA (1024x768@60)SXGA (1280x1024@60)UXGA (1600x1200@60)**UXGA mode 30bit 4:4:4 YCrCb/RGB max 30fps</td></tr><tr><td>Computer(Analog@DVI-I Connector)</td><td>VGA(640x480@60)SVGA(800x600@60)XGA(1024x768@60)SXGA(1280x1024@60)</td></tr><tr><td>ADC Resolution</td><td colspan="2">10-bit digitization</td></tr></table>

Table 2-1: Hardware Specifications

<table><tr><td>Item</td><td colspan="3">Specifications</td></tr><tr><td>Pixel Output Formats</td><td colspan="3">► RGB: 32/30/24 bit► YCrCb: 444/422► Monochrome:10/8 bit</td></tr><tr><td>ADC Sampling Rate</td><td colspan="3">► 170 MHz</td></tr><tr><td>Frame Buffer</td><td colspan="3">► DDR2 / 512MB</td></tr><tr><td>Video IO Connector</td><td colspan="3">► D-SUB9 female : YPbPr► DVI-I: DVI-D , RGB with sync input</td></tr><tr><td>Digital In/Out</td><td colspan="3">► 4 TTL input, 4 TTL output , input can generate interrupt (change of state), Manual enable/disable this function</td></tr><tr><td>Trigger In/Out</td><td colspan="3">► 1 TTL Trigger input and 1 TTL trigger output for external hardware trigger capture mode.► Programmable trigger output plus wide and trigger output delay time(See Trigger I/O timing diagram)</td></tr><tr><td rowspan="3">DIO/Trigger IO Level Threshold</td><td>Input</td><td colspan="2">► Maximum of input voltage:5V► Minimum threshold of high level:2.4V► Maximum threshold of Low level:1V</td></tr><tr><td rowspan="2">Output (Select by SW1 and SW2)</td><td>Open collector</td><td>► Maximum of IC:200mA► Maximum of VCEO:40V</td></tr><tr><td>TTL output</td><td>► Maximum of source current:20mA► Output voltage of high level:5V► Output voltage of low level:0V</td></tr><tr><td>Configurable EDID</td><td colspan="3">► EDID 1.3</td></tr><tr><td>FPGA Golden Boot Flash ROM</td><td colspan="3">► Dip switch selection (see FPGA Golden flash selection)Use golden flash ROM to initiate card in failure mode.</td></tr><tr><td>+12 V Power Output Current</td><td colspan="3">► Maximum 1 A</td></tr><tr><td>Power Consumption</td><td colspan="3">► Maximum 0.5 mA@ +12 V► Maximum 2 A@ +3.3 V</td></tr><tr><td>Operating Temperature</td><td colspan="3">► 0 - 55°C</td></tr></table>

Table 2-1: Hardware Specifications

# 2.1.2 HDV62 Outline and Mechanical Dimensions

![CN1\n126.31\nCN2\n100.36\n(4.5)\n176.42\n174.52\nCN3\nSW4\nSW1 SW2\nSW3](.hdv62-50-11164-1000-005-en/28ab8db4e54f14f7335aafd986f995ac66b734536d9443ab82e173c1c716382f.jpg)

Figure 2-1: HDV62 Outline and Mechanical Dimensions

# 2.1.3 Trigger I/O Timing Diagram

![Trigger in X\nT1\nT1\nT1\nT2\nT2\nT2\nT3\nT3\nT3\nTrigger out X](.hdv62-50-11164-1000-005-en/6f6850b2cb69756fde566a3ce7a707d88388c03e56d47128b54e66b47937b8e0.jpg)

<table><tr><td>Symbol</td><td>Characteristic</td><td>Specification</td></tr><tr><td>T1</td><td>Trigger input pulse width</td><td>Minimumwidth is 0.1 msec</td></tr><tr><td>T2</td><td>Trigger delay</td><td>0- 1000msec selectable(1 msec/step)</td></tr><tr><td>T3</td><td>Output trigger pulse width</td><td>0.1- 50 msec selectable(0.1 msec/step)</td></tr></table>

Figure 2-2: Trigger I/O Timing Diagram

# 2.1.4 HDV62 Connectors and Pin Definitions DVI-I Connector Pin Definition (CN1)

![1\n8\n9\n16\n17\n24\nC1\nC2\nC3\nC4\nC5](.hdv62-50-11164-1000-005-en/39d6a4a8f4649957177ab06cb008de8c4202a090e6d2aaf4a4bbd8d35af5d5da.jpg)

<table><tr><td>Pin</td><td>Signal</td><td>Pin</td><td>Signal</td></tr><tr><td>1</td><td>T.M.D.S data2-</td><td>16</td><td>Hot plug detect</td></tr><tr><td>2</td><td>T.M.D.S data2+</td><td>17</td><td>T.M.D.S data0-</td></tr><tr><td>3</td><td>T.M.D.S data2 shield</td><td>18</td><td>T.M.D.S data0+</td></tr><tr><td>4</td><td>NC</td><td>19</td><td>T.M.D.S data0 shield</td></tr><tr><td>5</td><td>NC</td><td>20</td><td>NC</td></tr><tr><td>6</td><td>DDC clock</td><td>21</td><td>NC</td></tr><tr><td>7</td><td>DDC data</td><td>22</td><td>T.M.D.S clock shield</td></tr><tr><td>8</td><td>Analog Vertical sync</td><td>23</td><td>T.M.D.S clock+</td></tr><tr><td>9</td><td>T.M.D.S data1-</td><td>24</td><td>T.M.D.S clock-</td></tr><tr><td>10</td><td>T.M.D.S data1+</td><td colspan="2"></td></tr><tr><td>11</td><td>T.M.D.S data1 shield</td><td>C1</td><td>Analog Red</td></tr><tr><td>12</td><td>NC</td><td>C2</td><td>Analog Green</td></tr><tr><td>13</td><td>NC</td><td>C3</td><td>Analog Blue</td></tr><tr><td>14</td><td>+5V Power</td><td>C4</td><td>Analog Horizontal Sync</td></tr><tr><td>15</td><td>Ground(return for +5V,Hsync and Vsync)</td><td>C5</td><td>Analog Ground(analog R,G and B return)</td></tr></table>

Table 2-2: DVI-I Connector Pin Definition (CN1)

# D-sub Connector Pin Definition (CN2)

![Technical line drawing of a connector with two hexagonal pins and a central port (no text or symbols)](.hdv62-50-11164-1000-005-en/c6a6bfc1f756f423c281158b9a3d2b7f5b87ad7606de83c7e02d893c182f6f43.jpg)

<table><tr><td>Pin</td><td>Signal</td><td>Pin</td><td>Signal</td></tr><tr><td>1</td><td>Analog Ground</td><td>6</td><td>Analog Ground</td></tr><tr><td>2</td><td>YPbPr-Pr</td><td>7</td><td>Analog Ground</td></tr><tr><td>3</td><td>YPbPr-Pb</td><td>8</td><td>Analog Ground</td></tr><tr><td>4</td><td>YPbPr-Y</td><td>9</td><td>Analog Ground</td></tr><tr><td>5</td><td>Analog Ground</td><td colspan="2"></td></tr></table>

Table 2-3: D-sub Connector Pin Definition (CN2)

# Box Header Pin Definition (CN3)

$_ { \infty } \sqsupset$ □□□□□□□□□□口口

$_ { 2 5 } \square$ $\boldsymbol { \Pi } _ { 2 }$

<table><tr><td>Pin</td><td>Signal</td><td>Pin</td><td>Signal</td></tr><tr><td>1</td><td>+12 Power out</td><td>14</td><td>Digital Output 2</td></tr><tr><td>2</td><td>+12 Power out</td><td>15</td><td>Digital Ground</td></tr><tr><td>3</td><td>+12 Power out</td><td>16</td><td>Digital Ground</td></tr><tr><td>4</td><td>+12 Power out</td><td>17</td><td>Digital Input3</td></tr><tr><td>5</td><td>Digital Ground</td><td>18</td><td>Digital Output 3</td></tr><tr><td>6</td><td>Digital Ground</td><td>19</td><td>Digital Input4</td></tr><tr><td>7</td><td>Digital Ground</td><td>20</td><td>Digital Output 4</td></tr><tr><td>8</td><td>Digital Ground</td><td>21</td><td>Digital Ground</td></tr><tr><td>9</td><td>Digital Ground</td><td>22</td><td>Digital Ground</td></tr><tr><td>10</td><td>Digital Ground</td><td>23</td><td>Trigger Input1</td></tr><tr><td>11</td><td>Digital Input1</td><td>24</td><td>Trigger output1</td></tr><tr><td>12</td><td>Digital Output 1</td><td>25</td><td>Digital Ground</td></tr><tr><td>13</td><td>Digital Input2</td><td>26</td><td>Digital Ground</td></tr></table>

Table 2-4: Box Header Pin Definition (CN3)

Trigger Output Mode Select (SW1)
![ON\n1 2](.hdv62-50-11164-1000-005-en/934819da6e8c5ccaece258914ae0b28ec4b0d09f932c6a9e953f18053307d2da.jpg)

<table><tr><td>Trigger output channel</td><td>Switch is On.</td><td>Switch is Off.</td></tr><tr><td>1</td><td>TTL output</td><td>Open collector</td></tr><tr><td>2</td><td>TTL output</td><td>Open collector</td></tr></table>

Table 2-5: Trigger Output Mode Select (SW1)

Digital Output Mode Select (SW2)
![ON\n1 2 3 4](.hdv62-50-11164-1000-005-en/ef97d5950c0b830012ba59b88e8468e06c8c61a2c7a7f77edf43809a51e3d6e2.jpg)

<table><tr><td>Digital output channel</td><td>Switch is On.</td><td>Switch is Off.</td></tr><tr><td>1</td><td>TTL output</td><td>Open collector</td></tr><tr><td>2</td><td>TTL output</td><td>Open collector</td></tr><tr><td>3</td><td>TTL output</td><td>Open collector</td></tr><tr><td>4</td><td>TTL output</td><td>Open collector</td></tr></table>

Table 2-6: Digital Output Mode Select (SW2)

Card ID DIP Switch (SW3)
![ON\n1 2 3 4](.hdv62-50-11164-1000-005-en/1e6366392736270a3b12a7063289dc48efedeaad32f5137bded61f137ef84046.jpg)

<table><tr><td>Card Identification</td><td>Setting(4321) On=&gt;0/OFF=&gt;1</td><td>Card Identification</td><td>Setting (4321)</td></tr><tr><td>0</td><td>0000</td><td>8</td><td>1000</td></tr><tr><td>1</td><td>0001</td><td>9</td><td>1001</td></tr><tr><td>2</td><td>0010</td><td>10</td><td>1010</td></tr><tr><td>3</td><td>0011</td><td>11</td><td>1011</td></tr><tr><td>4</td><td>0100</td><td>12</td><td>1100</td></tr><tr><td>5</td><td>0101</td><td>13</td><td>1101</td></tr><tr><td>6</td><td>0110</td><td>14</td><td>1110</td></tr><tr><td>7</td><td>0111</td><td>15</td><td>1111</td></tr></table>

Table 2-7: Card ID DIP Switch (SW3)

FPGA Golden Flash Selection (SW4)
![ON\n1 2](.hdv62-50-11164-1000-005-en/8790fa8c8ed1daea121727a63e278e948bfcb219ec75b721253d5e5a54332599.jpg)

<table><tr><td>Boot flash selection of Host FPGA</td><td>Setting of Switch(21)</td></tr><tr><td>Working flash</td><td>OFF,OFF</td></tr><tr><td>Golden flash</td><td>ON,ON</td></tr></table>

Table 2-8: FPGA Golden Flash Selection (SW4)

# 3 Installation Guide

# 3.1 Windows Driver Installation

The driver installation procedure for a Windows Vista operation system is described below. Installation on other Windows systems will be similar to these steps.

1. Run setup program.
2. The installation will begin

![InstallShield Wizard\nPreparing to Install...\nPCIe-HDV62 Setup is preparing the InstallShield Wizard,\nwhich will guide you through the program setup process.\nPlease wait.\nExtracting: PCIe-HDV62.msi\nCancel](.hdv62-50-11164-1000-005-en/c8f20ab915c509de664e18f6b6575425f943fa591ae9031dbc6dd559ff187fbb.jpg)

3. If .Net Framework 2.0 is not currently installed on the system, the following window will be displayed. Click Yes to install .Net Framework.

![InstallShield\nPCIe-HDV62 optionally uses the Microsoft (R) .NET 2.0 Framework. Would you like to install it now?\nYes	No](.hdv62-50-11164-1000-005-en/927df8591e4c3c5b14e404697bb3299af1cd34443527e68409144b1749ed0ead.jpg)

![Microsoft .NET Framework 2.0 Setup\nWelcome to Microsoft .NET Framework 2.0\nSetup\n\nThis wizard will guide you through the installation process.\n\nNext )\nCancel](.hdv62-50-11164-1000-005-en/9caebc8b8785366c3952fb6e61a8133dcab93942524fd735e5bf52cab9d22434.jpg)

![The image displays a vertical section of a blue interface, likely a taskbar or sidebar, featuring a computer icon. The icon depicts two stylized computer monitors arranged diagonally, with one in the foreground slightly to the left and another behind it to the right. The monitors have light blue screens with a grid pattern. To the left of the monitors, the number '10' is visible in white text.](.hdv62-50-11164-1000-005-en/2da109d93c9f55ccbe1df24f723fb89bdd98edc1aa041c923128b2e30f718e4e.jpg)

# Microsoft .NET Framework 2.0 Setup

![The image displays a blue rectangular object with rounded corners. Inside the blue area, there is a white horizontal rectangle positioned near the bottom center. Faint, blurry white shapes are visible against the blue background. There is no legible text in the image.](.hdv62-50-11164-1000-005-en/e7b275ebb3c34987e76b5d51308720b15d95527881d1fb5fa7edff392ce831f7.jpg)

![The image displays a close-up of a pattern featuring concentric squares. From the outside in, there is a blue square frame, followed by a white square frame, then a blue square frame, and finally a solid blue square in the center. The background is a very light blue or white.](.hdv62-50-11164-1000-005-en/70017ca03cd7f957f47e5aa0b3602bb7cd8af84e0014e15fd44c8e8bb0b9253f.jpg)

![The image shows a close-up of two identical square buttons positioned side-by-side. Each button has a reddish-orange background with rounded corners and features a centered white 'X' symbol. Small vertical strips of a blue background are visible on the far left and far right edges. This appearance is characteristic of a 'close' or 'cancel' button found in software user interfaces.](.hdv62-50-11164-1000-005-en/7c0988c9310afdad1ad8a4199a01769e53fe3943b66d48ed704d4f4841a998c1.jpg)

# End-User License Agreement

# End-User License Agreement

MICROSOFT SOFTWARE SUPPLEMENTAL LICENSE TERMS MICROSOFT .NET FRAMEWORK 2.0

Microsoft Corporation (or based on where you live, one of its afiliates) licenses this supplement to you，If you arelicensed to use Microsoft Windows operating system software (the “software"), you may use this supplement， You may not use it if you do not have alicense for the software.You may use a copy of this supplement with each validly licensed copy of the software.

![The image displays a close-up of four light blue keys arranged in a two-by-two grid. The top two keys both display a single black caret symbol (`^`). The bottom left key displays a single black forward slash (`/`), and the bottom right key displays a black double forward slash (`//`).](.hdv62-50-11164-1000-005-en/d64d85fd42e710bd5356e2bbe114524f57d483283129e9bf34c19f8cd642ebb2.jpg)

![The image displays a square icon with rounded corners. It has a light blue background and features a centered, darker blue downward-pointing arrow (chevron). There is no text present.](.hdv62-50-11164-1000-005-en/8acda3d105adcc996d365ffd88cbe1a69d1abb1189d4af58a68c4fb30c8d6d66.jpg)

Print

By clicking "I accept the terms of the License Agreement"and proceeding to use the product,IinicatethatIavereaduderstoodandagreed tothetermsof theEnd-User License Agreement.

![The image displays a square checkbox with a thin, dark border. Inside the box, centered on a white background, is a bold green checkmark.](.hdv62-50-11164-1000-005-en/5899b7b2607a95cd6818808f62693febc81d39b10d7582f251e7e6660ac83c6a.jpg)

IacceptthetermsoftheLicense Agreement

&lt;Back

Install &gt;

Cancel

# 4. Click next until driver installation is complete

![PCIe-HDV62 - InstallShield Wizard\nWelcome to the InstallShield Wizard for PCIe-HDV62\nThe InstallShield(R) Wizard will install PCIe-HDV62 on your computer. To continue, click Next.\nWARNING: This program is protected by copyright law and international treaties.](.hdv62-50-11164-1000-005-en/41a79b934287b1bc88026f2bc7b69da8c66c75afb4a21b6e30cfdd62d18d303f.jpg)

![PCIe-HDV62 - InstallShield Wizard\nDestination Folder\nClick Next to install to this folder, or click Change to install to a different folder.\nInstall PCIe-HDV62 to:\nC:\Program Files\ADLINK\HDV62\\nChange...\nInstallShield\n( Back	Next )	Cancel](.hdv62-50-11164-1000-005-en/572af9fef2fe93e57dbe65b7dd7e5eca7956dec3afe6471b00a0ff303c826175.jpg)

![PCIe-HDV62 - InstallShield Wizard\nReady to Install the Program\nThe wizard is ready to begin installation.\nClick Install to begin the installation.\nIf you want to review or change any of your installation settings, click Back. Click Cancel to exit the wizard.\nInstallShield\n( Back	Install	Cancel](.hdv62-50-11164-1000-005-en/92f20fa9f11fefd546fe02ef14bac68c5c91a83858e1941e454d346401360536.jpg)

5. When the following window is displayed, please press “Install this driver anyway” to install the device drivers.

Note: If a “Found New Hardware Wizard” window appears, simply ignore it. After the installation completes, the “Found New Hardware Wizard” window will automatically close.

![Windows Security\nWindows can't verify the publisher of this driver software\nDon't install this driver software\nYou should check your manufacturer's website for updated driver software\nfor your device.\nInstall this driver software anyway\nOnly install driver software obtained from your manufacturer's website or\ndisc. Unsigned software from other sources may harm your computer or steal\ninformation.\nSee details](.hdv62-50-11164-1000-005-en/5a9505279d4fe53dc17e08f3a102c93e218e4fe586aed28cb82150c1033990a2.jpg)

# 6. Finally the installation completes. Click Finish.

![PCIe-HDV62 - InstallShield Wizard\nInstallShield Wizard Completed\nThe InstallShield Wizard has successfully installed PCIe-HDV62.\nClick Finish to exit the wizard.](.hdv62-50-11164-1000-005-en/acbf8da06b89d982e39d347777cc8cc2fe2f4069619685217b4ac10338b09330.jpg)

# If an error iccurred, the installation will be rolled back.

![PCIe-HDV62 - InstallShield Wizard\nInstallShield Wizard Completed\nThe wizard was interrupted before PCIe-HDV62 could be completely installed.\nYour system has not been modified. To complete installation at another time, please run setup again.\nClick Finish to exit the wizard.\n( Back	Finish	Cancel](.hdv62-50-11164-1000-005-en/c7e61005ce55e18b39c90f1213f66e39fc7ca188e43ebfff085c8ad5d5ff8b6e.jpg)

If you see this dialog, please email the file setupapi.log in the Windows folder to ADLINK’s technical support.

Note: The log files on Vista system are moved to %windir%\inf and renamed to setupapi.app.log and setupapi.dev.log, where windir is Windows folder.

7. Click Yes and restart system.

![PCIe-HDV62 Installer Information\nYou must restart your system for the configuration\nchanges made to PCIe-HDV62 to take effect. Click Yes\nto restart now or No if you plan to restart later.\nYes	No](.hdv62-50-11164-1000-005-en/792f7cba6c5b0ca614ed33352df9170fc78e30bc1dfacf6b97269e6725494156.jpg)

8. Open Device Manager from System of Control Panel.

![Device Manager\nFile Action View Help\nADLINKPC\nADLINK Vision\nADLINK HDV62 Video Capture\nComputer\nDisk drives\nDisplay adapters\nDVD/CD-ROM drives\nFloppy drive controllers\nIDE ATA/ATAPI controllers\nKeyboards\nMice and other pointing devices\nMonitors\nNetwork adapters\nPortable Devices\nPorts (COM & LPT)\nProcessors\nSound, video and game controllers\nStorage controllers\nSystem devices\nUniversal Serial Bus controllers](.hdv62-50-11164-1000-005-en/efbee262a3371c9cf6aa8db1dd28784433b9e49a181c1760f1b1d01191212c27.jpg)

Note: For Windows Vista users, there is a way to avoid security error while operating the ViewCreatorPro utility. Turn off the User Account Control (UAC) by opening [Start] -> [Settings] -> [Control Panel] -> [User Accounts] -> [Turn User Account Control on or off]. Uncheck the UAC as illustrated in the following picture and then restart the computer.

![Turn on User Account Control (UAC) to make your computer more secure\nUser Account Control (UAC) can help prevent unauthorized changes to your computer. We recommend that\nyou leave UAC turned on to help protect your computer.\nUse User Account Control (UAC) to help protect your computer\nOK	Cancel](.hdv62-50-11164-1000-005-en/f707ce79cda63639f103340742d1937b23557f9f841df98d87f2f1bdd3043600.jpg)

# 4 Function Library

This chapter describes the ADLINK HDV62 API for the HDV62 frame grabber. Users can use these functions to develop your application programs under Visual C++, C#, Visual Basic.Net, Delphi, and Borland C++ Builder.

The ADLINK HDV62 API is a kind of simple C like function. It is based on DirectShow technologies, but we eliminated the complexity of DirectShow programming and transformed it to simple API functions that users don’t need to familiar with DirectShow programming.

Besides the ADLINK API, users also have another choice that is using DirectShow technologies to program your application. DirectShow is a standard interface of audio/video streaming what is provided by Microsoft. It provides many powerful COM objects which are totally different than the ADLINK HDV62 API. Next chapter we will introduce the DirectShow programming guide.

Do not mix the ADLINK HDV62 API and DirectShow programming to access same HDV62 card at the same time. We can’t make sure that way can work correctly.

The particular functions associated with each function are presented in following table.

# 4.1 Function List

The table below lists all of ADLINK HDV62 API functions. For the detail, please reference to the following sections.

<table><tr><td>Category</td><td>Function Name</td><td>Section</td></tr><tr><td rowspan="11">Device Control</td><td>Hdv62_GetDeviceCount</td><td rowspan="11">4.3</td></tr><tr><td>Hdv62_DeviceOpen</td></tr><tr><td>Hdv62_DeviceClose</td></tr><tr><td>Hdv62_GetDeviceVendorName</td></tr><tr><td>Hdv62_GetDeviceModelName</td></tr><tr><td>Hdv62_GetDeviceVersion</td></tr><tr><td>Hdv62_GetDeviceFirmwareVersion</td></tr><tr><td>Hdv62_GetDriverVersion</td></tr><tr><td>Hdv62_GetLibraryVersion</td></tr><tr><td>Hdv62_GetDeviceID</td></tr><tr><td>Hdv62_DeviceReset</td></tr><tr><td rowspan="24">Image Format Control</td><td>Hdv62_SetChannel</td><td rowspan="24">4.4</td></tr><tr><td>Hdv62_GetChannel</td></tr><tr><td>Hdv62_SetSensorFormat</td></tr><tr><td>Hdv62_GetSensorFormat</td></tr><tr><td>Hdv62_GetSensorWidth</td></tr><tr><td>Hdv62_GetSensorHeight</td></tr><tr><td>Hdv62_SetWidth</td></tr><tr><td>Hdv62_GetWidth</td></tr><tr><td>Hdv62_SetHeight</td></tr><tr><td>Hdv62_GetHeight</td></tr><tr><td>Hdv62_SetXOffset</td></tr><tr><td>Hdv62_GetXOffset</td></tr><tr><td>Hdv62_SetYOffset</td></tr><tr><td>Hdv62_GetYOffset</td></tr><tr><td>Hdv62_SetOutputFormat</td></tr><tr><td>Hdv62_GetOutputFormat</td></tr><tr><td>Hdv62_SetHDelay</td></tr><tr><td>Hdv62_GetHDelay</td></tr><tr><td>Hdv62_SetContrast</td></tr><tr><td>Hdv62_GetContrast</td></tr><tr><td>Hdv62_SetHue</td></tr><tr><td>Hdv62_GetHue</td></tr><tr><td>Hdv62_SetSaturation</td></tr><tr><td>Hdv62_GetSaturation</td></tr><tr><td rowspan="7">Event &amp; Callback</td><td>Hdv62_SetEventSelector</td><td rowspan="7">4.5</td></tr><tr><td>Hdv62_GetEventSelector</td></tr><tr><td>Hdv62_SetEventHandle</td></tr><tr><td>Hdv62_GetEventHandle</td></tr><tr><td>Hdv62_SetCallbackSelector</td></tr><tr><td>Hdv62_GetCallbackSelector</td></tr><tr><td>Hdv62_SetCallback</td></tr><tr><td rowspan="10">Acquisition Control</td><td>Hdv62_SetAcquisitionFrameCount</td><td rowspan="10">4.6</td></tr><tr><td>Hdv62_GetAcquisitionFrameCount</td></tr><tr><td>Hdv62_AcquisitionStart</td></tr><tr><td>Hdv62_AcquisitionStop</td></tr><tr><td>Hdv62_OneShot</td></tr><tr><td>Hdv62_GetImageStream</td></tr><tr><td>Hdv62_GetAcquisitionStatus</td></tr><tr><td>Hdv62_GetAcquisitionStatistics</td></tr><tr><td>Hdv62_GetSensorStatus</td></tr><tr><td>Hdv62_Savelmage</td></tr><tr><td rowspan="10">Trigger Control</td><td>Hdv62_SetTriggerInSource</td><td rowspan="10">4.7</td></tr><tr><td>Hdv62_GetTriggerInSource</td></tr><tr><td>Hdv62_SetTriggerInPolarity</td></tr><tr><td>Hdv62_GetTriggerInPolarity</td></tr><tr><td>Hdv62_SoftwareTrigger</td></tr><tr><td>Hdv62_SendOnePulseOut</td></tr><tr><td>Hdv62_SetTriggerOutPolarity</td></tr><tr><td>Hdv62_GetTriggerOutPolarity</td></tr><tr><td>Hdv62_SetTriggerOutPulseWidth</td></tr><tr><td>Hdv62_GetTriggerOutPulseWidth</td></tr><tr><td rowspan="7">Digital I/O</td><td>Hdv62_SetDigitalIOSelector</td><td rowspan="7">4.8</td></tr><tr><td>Hdv62_GetDigitalIOSelector</td></tr><tr><td>Hdv62_SetDI</td></tr><tr><td>Hdv62_SetDIEvent</td></tr><tr><td>Hdv62_GetDIEvent</td></tr><tr><td>Hdv62_SetDO</td></tr><tr><td>Hdv62_GetDO</td></tr><tr><td>Others</td><td>Hdv62_GetErrorText</td><td>4.9</td></tr></table>

<table><tr><td>Category</td><td>Function Name</td><td>Section</td></tr><tr><td rowspan="10">EDID</td><td>Hdv62_SetEdidReadyStatus</td><td rowspan="10">4.10</td></tr><tr><td>Hdv62_GetEdidReadyStatus</td></tr><tr><td>Hdv62_SetEdidAccessPermission</td></tr><tr><td>Hdv62_GetEdidAccessPermission</td></tr><tr><td>Hdv62_SetEdidWriteProtection</td></tr><tr><td>Hdv62_GetEdidWriteProtection</td></tr><tr><td>Hdv62_SetEdidRomSelector</td></tr><tr><td>Hdv62_GetEdidRomSelector</td></tr><tr><td>Hdv62_SetEdidRom</td></tr><tr><td>Hdv62_GetEdidRom</td></tr></table>

Table 4-1: ADLINK HDV62 API Function List

# 4.2 Setting up the Build Environment

# Include Files

All applications using the API need include the file shown in the following table.

<table><tr><td>Include File</td><td>Description</td></tr><tr><td>Hdv62.h</td><td>The header file required for all C/C++ applications.</td></tr><tr><td>Hdv62.vb</td><td>The function definitions required for all VB.Net applications.</td></tr><tr><td>Hdv62.cs</td><td>The function definitions required for all C# applications.</td></tr></table>

# Library File

All C/C++ applications using the API need the library file shown in the following table.

<table><tr><td>Library File</td><td>Description</td></tr><tr><td>Hdv62.lib</td><td>Exports API function definitions. Required for all Visual C/C++ applications.</td></tr><tr><td>Hdv62_bcb.lib</td><td>Exports API function definitions. Required for all Borland C++ Builder applications.</td></tr></table>

# DLL Files

All applications using the APIs need the DLL file shown in the following table.

<table><tr><td>Library File</td><td>Description</td></tr><tr><td>Hdv62.dll</td><td>Dynamic link library. Required for all applications.</td></tr></table>

All files are located on the directory [Installed directory]\ADLINK\hdv62\Include. ‘Installed directory’ is the destination directory where you specified in setup program.

# 4.3 Device Control Functions

# 4.3.1 Device Count

# Purpose

This function returns the total number of HDV62 devices in your system. The library can only detect maximum 16 devices.

# Prototype

 C/C++ int Hdv62\_GetDeviceCount(UINT &Count)
 C# int GetDeviceCount(out uint Count)
 VB.Net GetDeviceCount (ByRef Count as UInteger) As Integer

# Parameters

 Count the total number of devices installed on computer.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.3.2 Device Open

# Purpose

This function initializes the device referred to by number. You should call this function before you call other functions except some functions which have no Number parameter.

# Prototype

 C/C++ int Hdv62\_DeviceOpen (UINT Number)
 C# int DeviceOpen (uint Number)
 VB.Net DeviceOpen (ByVal Number As UInteger) As Integer

# Parameters

 Number The number of which device you want to open. The allowed value is from 0 to 15.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.3.3 Device Close

# Purpose

This function closes the device and release all allocated resources. Application should call this function before you terminate your application.

# Prototype

 C/C++ int Hdv62\_DeviceClose (UINT Number)
 C# int DeviceClose (uint Number)
 VB.Net DeviceClose (ByVal Number As UInteger) As Integer

# Parameters

 Number The number of which device you want to close. The allowed value is from 0 to 15.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.3.4 Device Vendor Name

# Purpose

This function gets or returns the vendor name.

# Prototype

 C/C++ int Hdv62\_GetDeviceVendorName (char \*Name)
 C# string GetDeviceVendorName ()
 VB.Net GetDeviceVendorName () As String

# Parameters

 Name

Pointer to a user-allocated buffer into which the function copies the vendor name string, for example, “ADLINK”. The name is NULL-terminated.

# Return Value

 C/C++
No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.
 C#
Return vendor name.
 VB.Net
Return vendor name.

# 4.3.5 Device Model Name

# Purpose

This function gets or returns the model name.

# Prototype

 C/C++ int Hdv62\_GetDeviceModelName (UINT Number, char \*Name)
 C# string GetDeviceModelName (uint Number)
 VB.Net GetDeviceModelName (ByVal Number as UInteger) As String

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Name Pointer to a user-allocated buffer into which the function copies the model name string, for example, “HDV62”. The name is NULL-terminated.

# Return Value

 C/C++ No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.
 C# Return model name.
 VB.Net Return model name.

# 4.3.6 Device Version

# Purpose

This function gets or returns the version of hardware device.

# Prototype

 C/C++ int Hdv62\_GetDeviceVersion (UINT Number, char \*Version)
 C# string GetDeviceVersion (uint Number)
 VB.Net GetDeviceVersion (ByVal Number as UInteger) As String

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Version Pointer to a user-allocated buffer into which the function copies the version string. The version is NULL-terminated.

There will be two types:

One is “A2/A1” for carrier board plus daughter board type. The former is carrier board version; the later is daughter board version.

Another one is “A2” for single board type.

# Return Value

 C/C++
No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.
 C#
Return version string.
 VB.Net
Return version string.

# 4.3.7 Device Firmware Version

# Purpose

This function gets or returns the version of firmware.

# Prototype

 C/C++ int Hdv62\_GetDeviceFirmwareVersion (UINT Number, char \*Version)
 C# string GetDeviceFirmwareVersion (uint Number)
 VB.Net GetDeviceFirmwareVersion (ByVal Number as UInteger) As String

# Parameters

 Number The number of device. The allowed value is from 0 to 15.

 Version Pointer to a user-allocated buffer into which the function copies the version string. Its format is “Year/Month/Day Hour:Minute”, for example, “2009/11/19 14:22”. The version is NULL-terminated.

# Return Value

 C/C++ No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

 C# Return version string.

 VB.Net Return version string.

# 4.3.8 Driver Version

# Purpose

This function gets or returns the version of driver.

# Prototype

 C/C++ int Hdv62\_GetDriverVersion (UINT Number, char \*Version)
 C# string GetDriverVersion (uint Number)
 VB.Net GetDriverVersion (ByVal Number as UInteger) As String

# Parameters

 Number The number of device. The allowed value is from 0 to 15.

 Version Pointer to a user-allocated buffer into which the function copies the version string, for example, “1.0.0.0”. The version is NULL-terminated.

# Return Value

 C/C++ No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.
 C# Return version string.
 VB.Net Return version string.

# 4.3.9 Library Version

# Purpose

This function gets or returns the version of library.

# Prototype

 C/C++ int Hdv62\_GetLibraryVersion (UINT Number, char \*Version)
 C# string GetLibraryVersion (uint Number)
 VB.Net GetLibraryVersion (ByVal Number as UInteger) As String

# Parameters

 Number The number of device. The allowed value is from 0 to 15.

 Version Pointer to a user-allocated buffer into which the function copies the version string, for example, “1.0.0.0”. The version is NULL-terminated.

# Return Value

 C/C++ No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.
 C# Return version string.
 VB.Net Return version string.

# 4.3.10 Device ID

# Purpose

This function gets card ID of device.

# Prototype

 C/C++ int Hdv62\_GetDeviceID (UINT Number, UINT& ID)
 C# int GetDeviceID (uint Number, out uint ID)
 VB.Net GetDeviceID (ByVal Number as UInteger, ByRef ID as UInteger) As Integer

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.

 ID Card ID can be set by DIP Switch on card. Its possible value is from 0 to 15. Card ID can distinguish cards when multicards were installed on one system. Set them to different number according to chapter 2 Hardware Reference. Leave card ID as default, all are same is no problem, if you don’t care about it.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.3.11 Device Reset

# Purpose

This function restores HDV62 device to initial state of booting up. After resetting, you need to reconfigure all settings and then the device can work correctly. Call this function only when the device behaves abnormal and can’t restore it to proper state. The effect of this function is same as rebooting computer, but save lot of time of rebooting.

# Prototype

 C/C++ int Hdv62\_DeviceReset (UINT Number)
 C# int DeviceReset (uint Number)
 VB.Net DeviceReset (ByVal Number as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4 Image Format Functions

# 4.4.1 Channel

# Purpose

These functions set or get channel of device. HDV62 supports multi-source inputs that only one of them is available at same time. Select the channel you prefer. Refer to the Hardware Reference chapter to know the connections of source input.

# Prototype

 C/C++ int Hdv62\_SetChannel (UINT Number, UINT Channel) int Hdv62\_GetChannel (UINT Number, UINT &Channel)
 C# int SetChannel (uint Number, uint Channel) int GetChannel (uint Number, out uint Channel)
 VB.Net SetChannel (ByVal Number as UInteger, ByVal Channel as UInteger) As Integer GetChannel (ByVal Number as UInteger, ByRef Channel as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.

 Channel The source of input. The allowed value is from 0 to 5, defined as follows:

 0: Analog RGB signal coming from DVI-I connector
 1: YPbPr signal coming from D-sub connector
 2: HDMI signal coming from DVI-I connector

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.2 Sensor Format

# Purpose

These functions set or get image format of source input. The format is different according to the channel of input.

# Prototype

 C/C++ int Hdv62\_SetSensorFormat (UINT Number, UINT Format) int Hdv62\_GetSensorFormat (UINT Number, UINT &Format)
 C# int SetSensorFormat (uint Number, uint Format) int GetSensorFormat (uint Number, out uint Format)
 VB.Net SetSensorFormat (ByVal Number as UInteger, ByVal Format as UInteger) As Integer GetSensorFormat (ByVal Number as UInteger, ByRef Format as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Format The format of source input. Following are possible values fort different channel:

 Channel 0 Analog RGB signal from DVI-I connector

 0: VGA 60 fps (640 x 480),
 1: SVGA 60 fps (800 x 600),
 2: XVGA 60 fps (1024 x 768),
 3: SXVGA 60 fps (1280 x 1024),

#  Channel 1

YPbPr signal from D-SUB connector

 0: 525i 30 fps (720 x 480 interlace, in frames per second),
 1: 625i 25 fps (720 x 576 interlace, in frames per second),
 2: 525p 60 fps (720 x 480 progressive),
 3: 625p 50 fps (720 x 576 progressive),
 4: 720p 30 fps (1280 x 720 progressive),
 5: 720p 50 fps (1280 x 720 progressive),
 6: 720p 60 fps (1280 x 720 progressive),
 7: 1080i 25 fps (1920 x 1080 interlace, in frames per second),
 8: 1080i 30 fps (1920 x 1080 interlace, in frames per second),
 9: 1080p 50 fps (1920 x 1080 progressive)
 10: 1080p 60 fps (1920 x 1080 progressive)

#  Channel 2

HDMI signal from DVI-I connector

 0: 720p 50 fps YCrCb In (1280 x 720 progressive),
 1: 720p 60 fps YCrCb In (1280 x 720 progressive),
 2: 1080i 25 fps YCrCb In (1920 x 1080 interlace, in frames per second),
 3: 1080i 30 fps YCrCb In (1920 x 1080 interlace, in frames per second),
 4: 1080p 25 fps YCrCb In (1920 x 1080 progressive)
 5: 1080p 30 fps YCrCb In (1920 x 1080 progressive)
 6: 1080p 50 fps YCrCb In (1920 x 1080 progressive)
 7: 1080p 60 fps YCrCb In (1920 x 1080 progressive)
 8: VGA 60 fps (640 x 480),
 9: SVGA 60 fps (800 x 600),
 10: XGA 60 fps (1024 x 768),
 11: SXGA 60 fps (1280 x 1024),
 12: UXGA 60 fps (1600 x 1200)
 13: 720p 50 fps RGB In (1280 x 720 progressive),
 14: 720p 60 fps RGB In (1280 x 720 progressive),
 15: 1080i 25 fps RGB In (1920 x 1080 interlace, in frames per second),
 16: 1080i 30 fps RGB In (1920 x 1080 interlace, in frames per second),
 17: 1080p 25 fps RGB In (1920 x 1080 progressive)
 18: 1080p 30 fps RGB In (1920 x 1080 progressive)
 19: 1080p 50 fps RGB In (1920 x 1080 progressive)
 20: 1080p 60 fps RGB In (1920 x 1080 progressive)

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.3 Sensor Width

# Purpose

This function gets image width of source input. The width is same as the one of settings of SensorFormat.

# Prototype

 C/C++ int Hdv62\_GetSensorWidth (UINT Number, UINT &Width)
 C# int GetSensorWidth (uint Number, out uint Width)
 VB.Net GetSensorWidth (ByVal Number as UInteger, ByRef Width as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Width The image width of source input as illustrated in Figure 4-1.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

![Beginning of new frame\nSensor Image\nY Offset\nSensor Height\nHeight\nX Offset\nWidth\nSensor Width\nBeginning of new line](.hdv62-50-11164-1000-005-en/c9bb2470fc8c899b4deb5840c8ba2c88c54fbead39d18eb0229a1229e6c48a69.jpg)

Figure 4-1: Signals of Frame Image

# 4.4.4 Sensor Height

# Purpose

This function gets image height of source input. The height is same as the one of settings of SensorFormat.

# Prototype

 C/C++ int Hdv62\_GetSensorHeight (UINT Number, UINT & Height)
 C# int GetSensorHeight (uint Number, out uint Height)
 VB.Net GetSensorHeight (ByVal Number as UInteger, ByRef Height as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Height The image height of source input as illustrated in Figure 4-1.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.5 Width

# Purpose

These functions set or get active width of image. They are used to reduce horizontal pixels per line.

# Prototype

```csv
▶ C/C++
int Hdv62_SetWidth (UINT Number,UINT Width)
int Hdv62_GetWidth (UINT Number,UINT & Width)
```

```txt
▶ C#
int SetWidth (uint Number, uint Width)
int GetWidth (uint Number, out uint Width)
```

```txt
▶ VB.Net
SetWidth (ByVal Number as UInteger, ByVal Width as UInteger) As Integer
GetWidth (ByVal Number as UInteger, ByRef Width as UInteger) As Integer
```

# Parameters

```txt
▶ Number
The number of device. The allowed value is from 0 to 15.
```

```txt
▶ Width
The active width of image as illustrated in Figure 4-1. The width coupled with XOffset is the cropping parameters. The device crops sensor image if the width is less than Sensor-Width which is obtained from section 4.4.3. The following criteria must be met:
```

```txt
Width &lt;= SensorWidth
Width + XOffset &lt;= SensorWidth
Width needs to be multiple of 8 pixels.
```

# Return Value

No error occurs if return value &gt;= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.6 Height

# Purpose

These functions set or get active height of image. They can be used to reduce vertical scan lines.

# Prototype

```csv
▶ C/C++
int Hdv62_SetHeight (UINT Number,UINT Height)
int Hdv62_GetHeight (UINT Number,UINT& Height)
```

```txt
▶ C#
int SetHeight (uint Number, uint Height)
int GetHeight (uint Number, out uint Height)
```

```txt
▶ VB.Net
SetHeight (ByVal Number as UInteger, ByVal Height as UInteger) As Integer
GetHeight (ByVal Number as UInteger, ByRef Height as UInteger) As Integer
```

# Parameters

```txt
▶ Number
The number of device. The allowed value is from 0 to 15.
```

```txt
▶ Height
The active height of image as illustrated in Figure 4-1. The height coupled with YOffset is the cropping parameters. The device crops sensor image if the height is less than Sensor-Height which is obtained from section 4.4.4. The following criteria must be met:
```

```txt
▷ Height &lt;= SensorHeight
▷ Height + YOffset &lt;= SensorHeight
▷ Height is an even number.
▷ YOffset is an even number if sensor source is interlaced.
```

# Return Value

No error occurs if return value &gt;= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.7 X Offset

# Purpose

These functions set or get start pixels of image cropping per line.

# Prototype

 C/C++
 C#
 VB.Net

```txt
int Hdv62_SetXOffset (UINT Number, UINT XOffset)
int Hdv62_GetXOffset (UINT Number, UINT & XOffset)
```

```ocaml
int SetXOffset (uint Number, uint XOffset)
int GetXOffset (uint Number, out uint XOffset)
```

```txt
SetXOffset (ByVal Number as UInteger, ByVal XOffset as UInteger) As Integer
GetXOffset (ByVal Number as UInteger, ByRef XOffset as UInteger) As Integer
```

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.

 XOffset

The start pixels of image cropping per line as illustrated in Figure 4-1. The XOffset coupled with Width is the cropping parameters. The device crops sensor image if the XOffset is larger than 0. Following criteria must be met:

 Width &lt;= SensorWidth
 Width + XOffset &lt;= SensorWidth
 Width needs to be multiple of 8 pixels.

# Return Value

No error occurs if return value &gt;= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.8 Y Offset

# Purpose

These functions set or get start lines of image cropping.

# Prototype

 C/C++ int Hdv62\_SetYOffset (UINT Number, UINT YOffset) int Hdv62\_GetYOffset (UINT Number, UINT & YOffset)
 C# int SetYOffset (uint Number, uint YOffset) int GetYOffset (uint Number, out uint YOffset)
 VB.Net SetYOffset (ByVal Number as UInteger, ByVal YOffset as UInteger) As Integer GetYOffset (ByVal Number as UInteger, ByRef YOffset as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 YOffset The start lines of image cropping as illustrated in Figure 4-1. The YOffset coupled with Height is the cropping parameters. The device crops sensor image if the YOffset is larger than 0. Following criteria must be met:

 Height &lt;= SensorHeight
 Height + YOffset &lt;= SensorHeight
 Height is an even number.
 YOffset is an even number if sensor source is interlaced.

# Return Value

No error occurs if return value &gt;= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.9 Output Format

# Purpose

These functions set or get output format of pixel.

# Prototype

 C/C++
int Hdv62\_SetOutputFormat (UINT Number, UINT Format) int Hdv62\_GetOutputFormat (UINT Number, UINT & Format)
 C#
int SetOutputFormat (uint Number, uint Format) int GetOutputFormat (uint Number, out uint Format)
 VB.Net
SetOutputFormat (ByVal Number as UInteger, ByVal Format as UInteger) As Integer GetOutputFormat (ByVal Number as UInteger, ByRef Format as UInteger) As Integer

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.
 Format
The output format of pixel. Could be one of the following values:

0: 24bit RGB (RGB24) – 8bit R + 8bit G + 8bit B

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>B1</td><td>R0</td><td>G0</td><td>B0</td></tr><tr><td>dw1</td><td>G2</td><td>B2</td><td>R1</td><td>G1</td></tr><tr><td>dw2</td><td>R3</td><td>G3</td><td>B3</td><td>R2</td></tr></table>

1: 30bit RGB – 10bit R + 10bit G + 10bit B

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>xx+B[9:4]</td><td>B[3:0]+G[9:6]</td><td>G[5:0]+R[9:8]</td><td>R[7:0]</td></tr></table>

‘x’ means ‘don’t care bit’.

2: 32bit RGB (RGB32) – 8bit R + 8bit G + 8bit B + 8bit Alpha

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Alpha</td><td>R</td><td>G</td><td>B</td></tr></table>

3: 8bit gray scale (Y8) – 8bit Y

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Y3</td><td>Y2</td><td>Y1</td><td>Y0</td></tr></table>

4: 24bit YCbCr 4:4:4 – 8bit Y + 8bit Cb + 8bit Cr

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Y1</td><td>Cr0</td><td>Cb0</td><td>Y0</td></tr><tr><td>dw1</td><td>Cb2</td><td>Y2</td><td>Cr1</td><td>Cb1</td></tr><tr><td>dw2</td><td>Cr3</td><td>Cb3</td><td>Y3</td><td>Cr2</td></tr></table>

5: 16bit YCbCr 4:2:2 (YUY2) – 8bit Y + 8bit Cb/Cr

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Cr</td><td>Y</td><td>Cb</td><td>Y</td></tr></table>

6: 20bit YCbCr 4:2:2 – 10bit Y + 10bit Cb/Cr

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Cr0[1:0]+Y1[9:4]</td><td>Y1[3:0]+Cb0[9:6]</td><td>Cb0[5:0]+Y0[9:8]</td><td>Y0[7:0]</td></tr><tr><td>dw1</td><td>xxxx+Cb2[9:6]</td><td>Cb2[5:0]+Y2[9:8]</td><td>Y2[7:0]</td><td>Cr0[9:2]</td></tr><tr><td>dw2</td><td>Cb4[1:0]+Y4[9:4]</td><td>Y4[3:0]+Cr2[9:6]</td><td>Cr2[5:0]+Y3[9:8]</td><td>Y3[7:0]</td></tr><tr><td>dw3</td><td>xxxx+Cr4[9:6]</td><td>Cr4[5:0]+Y5[9:8]</td><td>Y5[7:0]</td><td>Cb4[9:2]</td></tr></table>

‘x’ means ‘don’t care bit’.

Note: 1. Actual width of image setting in WriteCropping routine needs to be multiple of 8 and actual height needs to be an even number.
2. Total bytes of one scan line need to be aligned to multiple of 16. If the requirement is not met, HDV62 appends dummy bytes to the end of each line. For example, if 20bit YCbCr 4:2:2 is selected and
width = 800 pixels, each line = 2144 bytes (11 dummy bytes appended);
width = 640 pixles, each line = 1712 bytes (5 dummy bytes appended);
width = 720 pixles, each line = 1920 bytes (0 dummy bytes appended).
The formula is: total bytes of each line = ((width \* 16 / 6) + 15) & \~15 with all integer calculation.

3. The formula of YCbCr to RGB is as following:

$$
R = Y + 1. 3 7 1 (C r - 1 2 8)
$$

$$
G = Y - 0. 6 9 8 (C r - 1 2 8) - 0. 3 3 6 (C b - 1 2 8)
$$

$$
B = Y + 1. 7 3 2 (C b - 1 2 8)
$$

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.10 HDelay

# Purpose

These functions set or get the horizontal delay of frame images. Horizontal delay is like an X offset. It can move images left or right to remove a black vertical line.

# Prototype

 C/C++ int Hdv62\_SetHDelay (UINT Number, int Delay) int Hdv62\_GetHDelay (UINT Number, int & Delay)
 C# int SetHDelay (uint Number, int Delay) int GetHDelay (uint Number, out int Delay)
 VB.Net SetHDelay (ByVal Number as UInteger, ByVal Delay as Integer) As Integer GetHDelay (ByVal Number as UInteger, ByRef Delay as Integer) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Delay The horizontal delay of frame images. The allowed value is from -3 to 3. Each resolution has its default value that users call this routine after channel and sensor format have been set.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section4.9 for error information about return codes.

# 4.4.11 Contrast

# Purpose

These functions set or get the contrast of frame images from the YPbPr input.

# Prototype

 C/C++ int Hdv62\_SetContrast (UINT Number, int Value) int Hdv62\_GetContrast (UINT Number, int & Value)
 C# int SetContrast (uint Number, int Value) int GetContrast (uint Number, out int Value)
 VB.Net SetContrast (ByVal Number as UInteger, ByVal Value as Integer) As Integer GetContrast (ByVal Number as UInteger, ByRef Value as Integer) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Value The contrast of frame images. The allowed value is from 0 to 255 and default value is 128.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.12 Hue

# Purpose

These functions set or get the hue of frame images from the YPbPr input.

# Prototype

 C/C++i nt Hdv62\_SetHue (UINT Number, int Value) int Hdv62\_GetHue (UINT Number, int & Value)
 C# int SetHue (uint Number, int Value) int GetHue (uint Number, out int Value)
 VB.Net SetHue (ByVal Number as UInteger, ByVal Value as Integer) As Integer GetHue (ByVal Number as UInteger, ByRef Value as Integer) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Value The hue of frame images. The allowed value is from -128 to 127 and default value is 0.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.4.13 Saturation

# Purpose

These functions set or get the saturation of frame images from the YPbPr input.

# Prototype

 C/C++ int Hdv62\_SetSaturation (UINT Number, int Value) int Hdv62\_GetSaturation (UINT Number, int & Value)
 C# int SetSaturation (uint Number, int Value) int GetSaturation (uint Number, out int Value)
 VB.Net SetSaturation (ByVal Number as UInteger, ByVal Value as Integer) As Integer GetSaturation (ByVal Number as UInteger, ByRef Value as Integer) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Value The saturation of frame images. The allowed value is from 0 to 255 and default value is 128.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.5 Event and Callback Functions

# 4.5.1 Event Selector

# Purpose

These functions set or get the type of event.

# Prototype

 C/C++ int Hdv62\_SetEventSelector (UINT Number, UINT Mode) int Hdv62\_GetEventSelector (UINT Number, UINT & Mode)
 C# int SetEventSelector (uint Number, uint Mode) int GetEventSelector (uint Number, out uint Mode)
 VB.Net SetEventSelector (ByVal Number as UInteger, ByVal Mode as UInteger) As Integer GetEventSelector (ByVal Number as UInteger, ByRef Mode as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.

Mode The type of event. HDV62 has 2 kind of event; one is frame event and another is DI event. The frame event is the library issue an event when a frame is ready. The DI event is the library issue an event when the state of any DI has changed. Mode could be one of the following values:

0: Frame event

1: DI event

Use the SetEventHandle routinue to set an event handle.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.5.2 Event Handle

# Purpose

These functions set or get event handle. Event and callback are the methods to know when to get frame or to check DI’s state. Usually applications use only one of them, but both of them were set is allowed.

# Prototype

 C/C++
 C#

```txt
int Hdv62_SetEventHandle (UINT Number, HANDLE Handle)
int Hdv62_GetEventSelector (UINT Number, HANDLE &Handle)
```

```txt
int SetEventHandle (uint Number, IntPtr Handle)
int SetEventHandle (uint Number, SafeWaitHandle
    Handle)
int GetEventHandle (uint Number, out IntPtr Handle)
int GetEventHandle (uint Number, out SafeWaitHandle
    Handle)
```

 VB.Net

```txt
SetEventHandle (ByVal Number as UInteger, ByVal Handle as IntPtr) As Integer
SetEventHandle (ByVal Number as UInteger, ByVal Handle As SafeWaitHandle) As Integer
GetEventHandle (ByVal Number as UInteger, ByRef Handle as IntPtr) As Integer
GetEventHandle (ByVal Number as UInteger, ByRef Handle As SafeWaitHandle) As Integer
```

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.

 Handle

The handle of event which is created by your application. After user’s application waits for an event, users can call GetImageStream routine to get pointer of frame buffer or call GetDI routine to get the state of DI.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.5.3 CallbackSelector

# Purpose

These functions set or get the type of callback function.

# Prototype

 C/C++
 C#
 VB.Net

```txt
int Hdv62_SetCallbackSelector (UINT Number, UINT Mode)
int Hdv62_GetCallbackSelector (UINT Number, UINT Mode)
```

```txt
int SetCallbackSelector (uint Number, uint Mode)
int GetCallbackSelector (uint Number, out uint Mode)
```

```txt
SetCallbackSelector (ByVal Number as UInteger, ByVal Mode as UInteger) As Integer
GetCallbackSelector (ByVal Number as UInteger, ByRef Mode as UInteger) As Integer
```

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.

 Mode

The type of callback. HDV62 has 2 kind of callback; one is frame callback and another is DI callback. The frame callback is the library calls the callback routine when a frame is ready. The DI event is the library calls the callback routine when the state of any DI has changed. Mode could be one of the following values:

0: Frame callback

1: DI callback

Use SetCallback routinue to set a callback function.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.5.4 Callback

# Purpose

These functions set or get event handle. Event and callback are the methods to know when to get frame or to check DI’s state. Usually applications use only one of them, but both of them were set is allowed.

# Prototype

 C/C++
 C#
 VB.Net

```txt
int Hdv62_SetCallback (UINT Number, HDV62CALLBACK Fun)
int Hdv62_GetCallback (UINT Number, HDV62CALLBACK Fun)
```

```txt
int SetCallback (uint Number, HDV62CALLBACK Fun)
int GetCallback (uint Number, out HDV62CALLBACK Fun)
```

```txt
SetCallback (ByVal Number as UInteger, ByVal Fun as HDV62CALLBACK) As Integer
GetCallback (ByVal Number as UInteger, ByRef Fun as HDV62CALLBACK) As Integer
```

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.

 Fun

The pointer of callback routine. Users need to declare a callback function and set it as the parameter. The prototype of Fun please refer to the include files. In the callback function, users can call GetImageStream routine to get pointer of frame buffer or call GetDI routine to get the state of DI.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.6 Acquisition Control Functions

# 4.6.1 Acquisition Frame Count

# Purpose

These functions set or get the count of frames you want to capture at once. Call AcquisitionStart to start capturing, check the acquisition state by calling GetAcquisitionStatus routine, and call AcquisitionStop to stop capturing.

# Prototype

 C/C++
 C#
 VB.Net

```txt
int Hdv62_SetAcquisitionFrameCount (UINT Number,UINT Count)
int Hdv62_GetAcquisitionFrameCount (UINT Number,UINT & Count)
```

```txt
int SetAcquisitionFrameCount (uint Number, uint Count)
int GetAcquisitionFrameCount (uint Number, out uint Count)
```

```txt
SetAcquisitionFrameCount (ByVal Number as UInteger, ByVal Count as UInteger) As Integer
GetAcquisitionFrameCount (ByVal Number as UInteger, ByRef Count as UInteger) As Integer
```

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.
 Count
The frame count desired to capture. Could be the following value:

0: Capture until AcquisitionStop is called.

> 0: Acquire the amount of Count of frames. When the Count is reached, the acquisition status will be changed to 0 (stopped). Users must call AcquisitionStop to stop the acquisition.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.6.2 Acquisition Start

# Purpose

This function starts to capture frames.

# Prototype

 C/C++ int Hdv62\_AcquisitionStart (UINT Number)
 C# int AcquisitionStart (uint Number)
 VB.Net AcquisitionStart (ByVal Number as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.6.3 Acquisition Stop

# Purpose

This function stops capturing frames.

# Prototype

 C/C++ int Hdv62\_AcquisitionStop (UINT Number)
 C# int AcquisitionStop (uint Number)
 VB.Net AcquisitionStop (ByVal Number as UInteger) As Integer

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.6.4 One Shot

# Purpose

This function gets one frame image within a specific time. One-Shot is an independent function which can not be used with AcquisitionStart, Callback, and Event. When this function finished without error, call GetImageStream to get the pointer of frame image.

# Prototype

 C/C++ int Hdv62\_OneShot (UINT Number, UINT Timeout)
 C# int OneShot (uint Number, uint Timeout)
 VB.Net OneShot (ByVal Number as UInteger, ByVal Timeout as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Timeout The maximum waiting time of getting a frame in milliseconds.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.6.5 Image Stream

# Purpose

This function gets the pointer of image buffer. Usually this function is called in callback routine, after waiting frame event, or after call OneShot routine.

# Prototype

 C/C++ int Hdv62\_GetImageStream (UINT Number, void \*\*Buffer)
 C# int GetImageStream (uint Number, out IntPtr Buffer)
 VB.Net GetImageStream (ByVal Number as UInteger, ByRef Buffer as IntPtr) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.

 Buffer The pointer of image buffer.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.6.6 Acquisition Status

# Purpose

This function gets the status of acquisition.

# Prototype

 C/C++ int Hdv62\_GetAcquisitionStatus (UINT Number, UINT &Status)
 C# int GetAcquisitionStatus (uint Number, out uint Status)
 VB.Net GetAcquisitionStatus (ByVal Number as UInteger, ByRef Status as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Status The status of acquisition. Could be one of the following values:
0: Stopped
1: Running

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.6.7 Acquisition Statistics

# Purpose

This function gets the amount of captured frames since Acquisition Start.

# Prototype

 C/C++ int Hdv62\_GetAcquisitionStatistics (UINT Number, UINT &Count)
 C# int GetAcquisitionStatistics (uint Number, out uint Count)
 VB.Net GetAcquisitionStatistics (ByVal Number as UInteger, ByRef Count as UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.

 Count The amount of captured frames.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.6.8 Sensor Status

# Purpose

This function obtains the status of whether the device is connecting a proper sensor or not.

# Prototype

 C/C++
int Hdv62\_GetSensorStatus (UINT Number, UINT& Locked)
 C#
int GetSensorStatus (uint Number, out uint Locked)
 VB.Net
GetSensorStatus (ByVal Number as UInteger, ByRef Locked as UInterger) As Integer

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.
 Locked

Whether the input signal is locked. It can be used as whether a proper sensor is connected. It can be the following values:

0: No proper signal is detected

1: A proper signal is detected

For Analog RGB and YPbPr inputs, Locked = 1 is only if the sensor format is the one you select. For HDMI the input, Locked = 1 if the sensor is a valid HDMI source.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 to get error information about return codes.

# 4.6.9 Save Image

# Purpose

This function saves last image buffer as an image file or raw data file depending on the extension of file name.

# Prototype

 C/C++ int Hdv62\_SaveImage (UINT Number, LPTSTR FileNamet)
 C# int SaveImage (uint Number, string FileNamet)
 VB.Net SaveImage (ByVal Number as UInteger, ByVal FileNamet as String) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 FileName The name of image file. The library supports following type of images:
BMP: if FileName is \*.bmp
JPEG: if FileNAME is \*.jpg or \*.jpeg
JIFF: if FileName is \*.tif
PNG: if FileName is \*.png
Raw data: other file type

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.7 Trigger Control Functions

# 4.7.1 Trigger In Source

# Purpose

These functions set which trigger source you are using.

# Prototype

```txt
- C/C++
    int Hdv62_SetTriggerInSource (UINT Number,UINT Source)
    Int Hdv62_GetTriggerInSource (UINT Number,UINT& Source)

- C#
    int SetTriggerInSource (uint Number, uint Source)
    int GetTriggerInSource (uint Number, out uint Source)

- VB.Net
    SetTriggerInSource (ByVal Number As UInteger, ByVal Source As UInteger) As Integer
    GetTriggerInSource (ByVal Number As UInteger, ByRef Source As UInteger) As Integer
```

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Source The trigger source. There are two types you can choose:

0: Free run – the source input is CCD camera

1: External trigger or software trigger – holds frame acquisition until trigger input is active or SoftwareTrigger is called.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.7.2 Trigger In Polarity

# Purpose

These functions set or get trigger polarity of trigger input.

# Prototype

```python
- C/C++
    int Hdv62_SetTriggerInPolarity (UINT Number,UINT Polarity)
    Int Hdv62_GetTriggerInPolarity (UINT Number,UINT& Polarity)

- C#
    int SetTriggerInPolarity (uint Number, uint Polarity)
    int GetSensorWidth (uint Number, out uint Polarity)

- VB.Net
    SetTriggerInPolarity (ByVal Number As UInteger, ByVal Polarity As UInteger) As Integer
    GetTriggerInPolarity (ByVal Number As UInteger, ByRef Polarity As UInteger) As Integer
```

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.
 Polarity
The trigger polarity of trigger input. Could be one of the following values:
0: rising edge
1: falling edge

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.7.3 Software Trigger

# Purpose

This function issues a capturing trigger if the source parameter of GetTriggerInsource is 1.

# Prototype

 C/C++ int Hdv62\_SoftwareTrigger (UINT Number)
 C# int SoftwareTrigger (uint Number)
 VB.Net SoftwareTrigger (ByVal Number As UInteger) As Integer

# Parameters

 Number

The number of device. The allowed value is from 0 to 15.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.7.4 One Pulse Out

# Purpose

This function sends one pulse out from the trigger out pin.

# Prototype

 C/C++ int Hdv62\_SendOnePulseOut
 C# int SendOnePulseOut (uint Number)
 VB.Net SendOnePulseOut (ByVal Number As UInteger) As Integer

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.7.5 Trigger Out Polarity

# Purpose

These functions set or get active polarity of trigger output.

# Prototype

```python
- C/C++
    int Hdv62_SetTriggerOutPolarity (UINT Number,UINT Polarity)
    Int Hdv62_GetTriggerOutPolarity (UINT Number,UINT& Polarity)

- C#
    int SetTriggerOutPolarity (uint Number, uint Polarity)
    int GetTriggerOutPolarity (uint Number, out uint Polarity)

- VB.Net
    SetTriggerOutPolarity (ByVal Number As UInteger, ByVal Polarity As UInteger) As Integer
    GetTriggerOutPolarity (ByVal Number As UInteger, ByRef Polarity As UInteger) As Integer
```

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Polarity The active polarity of trigger output. Could be one of following values:
0: normal low, active high
1: normal high, active low

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.7.6 Trigger Out Pulse Width

# Purpose

These functions set or get pulse width of trigger output.

# Prototype

 C/C++
 C#
 VB.Net

```csv
int Hdv62_SetTriggerOutPulseWidth (UINT Number,UINT Width)
Int Hdv62_GetTriggerOutPulseWidth (UINT Number,UINT&Width)
```

```txt
int SetTriggerOutPulseWidth (uint Number, uint Width)
int GetTriggerOutPulseWidth (uint Number, out uint Width)
```

```txt
SetTriggerOutPulseWidth (ByVal Number As UInteger, ByVal Width As UInteger) As Integer
GetTriggerOutPulseWidth (ByVal Number As UInteger, ByRef Width As UInteger) As Integer
```

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.
 Width
The pulse width of trigger output, in us.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.8 Digital I/O Functions

# 4.8.1 4.8.1 Digital IO Selector

# Purpose

These functions set or get which channel of DI and DO you are setting when call GetDI, SetDO, and GetDO routines.

# Prototype

 C/C++
 C#
 VB.Net

```txt
int Hdv62_SetDigitalIOSelector (UINT Number, UINT Channel)
Int Hdv62_GetDigitalIOSelector (UINT Number, UINT&Channel)
```

```txt
int SetDigitalIOSector (uint Number, uint Channel)
int GetDigitalIOSector (uint Number, out uint Channel)
```

```txt
SetDigitalIOSector (ByVal Number As UInteger, ByVal Channel As UInteger) As Integer
GetDigitalIOSector (ByVal Number As UInteger, ByRef Channel As UInteger) As Integer
```

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.

 Channel

The channel of DI and DO. Allowed channel is from 0 to 3.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.8.2 DI

# Purpose

This function gets state of DI channel.

# Prototype

 C/C++ int Hdv62\_GetDI (UINT Number, UINT& Value)
 C# int GetDI (uint Number, out uint Value)
 VB.Net GetDI (ByVal Number As UInteger, ByRef Value As UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Value The state of DI channel. Could be one of the following values:
0: Low

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.8.3 DI Event

# Purpose

These functions enable or disable DI event. If enable, the library issues an event when change of state (COS) of any DI channel. Users can call SetEvent or SetCallback routines to wait for this event.

# Prototype

 C/C++ int Hdv62\_SetDIEvent (UINT Number, UINT Enable) int Hdv62\_GetDIEvent (UINT Number, UINT& Enable)
 C# int SetDIEvent (uint Number, uint Enable) int GetDIEvent (uint Number, out uint Enable)
 VB.Net SetDIEvent (ByVal Number As UInteger, ByVal Enable As UInteger) As Integer GetDIEvent (ByVal Number As UInteger, ByRef Enable As UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Enable Whether enable DI event or not. Could be one of the following values:

0: disable

1: enable

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.8.4 DO

# Purpose

These functions set or get state of DO channel.

# Prototype

 C/C++
int Hdv62\_SetDO (UINT Number, UINT Value)
int Hdv62\_GetDO (UINT Number, UINT& Value)
 C#
int SetDO (uint Number, uint Value)
int GetDO (uint Number, out uint Value)
 VB.Net
SetDO (ByVal Number As UInteger, ByVal Value As UInteger) As Integer
GetDO (ByVal Number As UInteger, ByRef Value As UInteger) As Integer

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.
 Value
The state of DO channel. Could be one of the following values:

0: Low

1: High

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 for error information about return codes.

# 4.9 Other Functions

# 4.9.1 Error Text

# Purpose

This function gets error text string.

# Prototype

 C/C++ int Hdv62\_GetErrorText (int code, char \*Text)
 C# string GetErrorText (int code)
 VB.Net GetErrorText (ByVal code As Integer) As String

# Parameters

 Code The error code returned by other functions.

 Text A string of error text. Users need to allocate a buffer, maximum 160 bytes, to contain this text.

# Return Value

 C/C++ Always return 0.
 C# Return the error text.
 VB.Net Return the error text.

# 4.10 EDID Functions

# 4.10.1 Ready Status

# Purpose

These functions set or get the ready status of the EDID ROM.

# Prototype

```txt
▶ C/C++
int Hdv62_SetEdidReadyStatus (UINT Number, UINT Status)
int Hdv62_GetEdidReadyStatus (UINT Number, UINT&Status)
```

```txt
▶ C#
int SetEdidReadyStatus (uint Number, uint Status)
int GetEdidReadyStatus (uint Number, out uint Status)
```

```txt
▶ VB.Net
SetEdidReadyStatus (ByVal Number As UInteger, ByVal Status As UInteger) As Integer
GetEdidReadyStatus (ByVal Number As UInteger, ByRef Status As UInteger) As Integer
```

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Status Indicates whether or not the EDID ROM is ready. This value can be read by external device through DVI-I connector. Some external devices can auto-adjusting their resolution by reading this EDID ROM. Users can configure the content of the EDID ROM and set it as ready state. Could be one of the following values:

0: EDID ROM is not ready

1: EDID ROM is ready

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 to get error information about return codes.

![Based on the provided block diagram, here is the description:\n\n**Blocks and Labels:**\n*   **HDV62:** A label at the top indicating the central system or enclosure.\n*   **Application:** A block on the left.\n*   **Ready:** A block inside the HDV62 enclosure, top right.\n*   **External Device:** A block on the right.\n*   **EDID ROM:** A block inside the HDV62 enclosure, bottom.\n*   **Access Permission:** A label for a switch on the lower connection line.\n*   **Write Protection:** A label for a switch on a vertical branch.\n\n**Connections:**\n*   **Application to External Device (Upper Path):** A line connects the 'Application' block to the 'External Device' block, passing through the 'Ready' block.\n*   **Application to External Device (Lower Path):** A second line connects 'Application' to 'External Device', passing through a switch labeled 'Access Permission'.\n*   **EDID ROM Connection:** A vertical branch extends downward from the line after the 'Access Permission' switch. This branch contains a switch labeled 'Write Protection'. This switch connects via a double-headed arrow to the 'EDID ROM' block.](.hdv62-50-11164-1000-005-en/bcbc37eddcee69e38ec4b56ae685848e9d396177ec339aa5352a9927b051c102.jpg)

Figure 4-2: EDID ROM Architecture

# 4.10.2 Access Permission

# Purpose

These functions set or get whether or not applications can access the EDID ROM.

# Prototype

```txt
- C/C++
    int Hdv62_SetEdidAccessPermission (UINT Number,UINT Status)
    int Hdv62_GetEdidAccessPermission (UINT Number,UINT& Status)

- C#
    int SetEdidAccessPermission (uint Number, uintStatus)
    int GetEdidAccessPermission (uint Number, out uintStatus)

- VB.Net
    SetEdidAccessPermission (ByVal Number As UInteger,ByVal Status As UInteger) As Integer
    GetEdidAccessPermission (ByVal Number As UInteger,ByRef Status As UInteger) As Integer
```

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Status Indicates whether or not the EDID ROM can be accessed. The EDID ROM can be accessed by either application or external device at the same time. So if you want to open EDID, you need to open access permission, configure EDID ROM, close access permission, and then plug external device into DVI-I connector. Please see figure 4-2 for EDID hardware architecture. Could be one of the following values:

0: EDID ROM is not accessible

1: EDID ROM is accessible

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 to get error information about return codes.

# 4.10.3 Write Protection

# Purpose

These functions set or get whether or not the EDID ROM is writable.

# Prototype

```python
- C/C++
    int Hdv62_SetEdidWriteProtection (UINT Number,UINT Status)
    int Hdv62_GetEdidWriteProtection (UINT Number,UINT& Status)

- C#
    int SetEdidWriteProtection (uint Number, uint Status)
    int GetEdidWriteProtection (uint Number, out uint Status)

- VB.Net
    SetEdidWriteProtection (ByVal Number As UInteger, ByVal Status As UInteger) As Integer
    GetEdidWriteProtection (ByVal Number As UInteger, ByRef Status As UInteger) As Integer
```

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Status Indicates whether or not the EDID ROM is writable. Users need to break write protection before write EDID ROM and set it to protect the content of the EDID ROM. Please see figure 4-2 for EDID hardware architecture. Could be one of the following values:

0: EDID ROM can be read/write

1: EDID ROM is read only

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 to get error information about return codes.

# 4.10.4 Rom Selector

# Purpose

These functions set or get the offset of the EDID ROM which is currently accessed.

# Prototype

 C/C++ int Hdv62\_SetEdidRomSelector (UINT Number, UINT Offset) int Hdv62\_GetEdidRomSelector (UINT Number, UINT& Offset)
 C# int SetEdidRomSelector (uint Number, uint Offset) int GetEdidRomSelector (uint Number, out uint Offset)
 VB.Net SetEdidRomSelector (ByVal Number As UInteger, ByVal Offset As UInteger) As Integer GetEdidRomSelector (ByVal Number As UInteger, ByRef Offset As UInteger) As Integer

# Parameters

 Number The number of device. The allowed value is from 0 to 15.
 Offset Indicates the offset of the EDID ROM. Allowed value is between 0 and 255.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 to get error information about return codes.

# 4.10.5 Rom Read/Write

# Purpose

These functions set or get the value of the EDID ROM.

# Prototype

 C/C++
 C#
 VB.Net

```txt
int Hdv62_SetEdidRom (UINT Number, UINT Value)
int Hdv62_GetEdi Rom (UINT Number, UINT& Value)
```

```txt
int SetEdidRom (uint Number, uint Value)
int GetEdidRom (uint Number, out uint Value)
```

```txt
SetEdidRom (ByVal Number As UInteger, ByVal Value As UInteger) As Integer
GetEdidRom (ByVal Number As UInteger, ByRef Value As UInteger) As Integer
```

# Parameters

 Number
The number of device. The allowed value is from 0 to 15.

 Value

Indicates the value of the EDID ROM. Allowed value is between 0 and 255.

# Return Value

No error occurs if return value >= 0; if negative value, please refer to Section 4.9 to get error information about return codes.

# 5 Programming Guide

# 5.1 Introduction

Complete documentation on DirectShow application programming can be found at http://msdn.microsoft.com/en-us/library/ dd390351(VS.85).aspx. If a DirectX SDK is installed, this documentation is also available from DirectX SDK Help. The last version of DirectShow SDK was moved to Windows SDK.

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. Each filter performs a single operation and pass data from its output pin to the input pin of the next filter in the graph.

To build a capture graph using a program, the first thing is to obtain the interface pointer of the capture filter. The ADLINK HDV62 Video Capture filter and the ADLINK HDV62 Crossbar filter can be obtained through system device enumerator. After holding an interface pointer to the capture filter object, use method IGraphBuilder::AddSourceFilter to add the source filter object to the filter graph. Use IFilterGraph::AddFilter to add other downstream filters to the filter graph. After filters are added, call IFilter-Graph::ConnectDirect or IGraphBuilder::Connect methods to connect output pins from upstream filters to the input pins of the downstream filters. Call IAMCrossbar::Route to switch source channel. Calling methods IMediaControl::Run, IMediaControl::Pause or IMediaControl::Stop will change filter state to running, paused or stopped.

The filters that are needed for capturing video streams are listed in next section, with detailed information for each filter and its pins. Example filter graphs for capturing video streams are also illustrated in this chapter and gives examples of two ways of controlling device driver.

# 5.2 Descriptions of Filters

This section lists filters needed to build a filter graph for capturing video stream.

# 5.2.1 Source Filter

# ADLINK HDV62 Video Capture

ADLINK HDV62 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.

<table><tr><td>Filter Name</td><td>ADLINK HDV62 Video Capture</td></tr><tr><td>Filter CLSID</td><td>Not applicable.</td></tr><tr><td>Filter Category Name</td><td>WDM Streaming Capture Devices</td></tr><tr><td>Filter Category</td><td>AM_KSCATEGORY_CAPTURE</td></tr><tr><td>Capture Pin Supported Media Types</td><td>MEDIATYPE_Video Subtypes: MEDIASUBTYPE_RGB24 MEDIASUBTYPE_BGR30 MEDIASUBTYPE_RGB32 MEDIASUBTYPE_RGB8 MEDIASUBTYPE_YUV8 MEDIASUBTYPE_YUV2 MEDIASUBTYPE_YU10</td></tr><tr><td>Exported Interfaces</td><td>IAMAnalogVideoDecoder IAMDroppedFrames IAMStreamConfig IAMVideoProcAmp Advance IVideoFormat ICardInfo</td></tr><tr><td>Merit</td><td>MERIT_DO_NOT_USE</td></tr></table>

In the above, MEDIASUBTYPE\_RGB8, MEDIASUBTYPE\_BGR30, MEDIASUBTYPE\_YUV8, and MEDIASUBTYPE\_YU10, please refer to section 5.3.3. For IAdvance, IVideoFormat, and ICardInfo, please refer to section 5.4.

# ADLINK HDV62 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 card.

<table><tr><td>Filter Name</td><td>ADLINK HDV62 Crossbar</td></tr><tr><td>Filter Category Name</td><td>WDM_Streaming Crossbar Devices</td></tr><tr><td>Exported Interfaces</td><td>IAMCrossbar</td></tr><tr><td>Input Pins</td><td>Pin Names:Video RGB InVideo YRYBY InVideo SerialDigital In</td></tr><tr><td>Output Pin</td><td>Pin Name:Video Decoder Out</td></tr></table>

In the above,

 0. Video RGB In is an analog RGB signal coming from DVI-I connector.
 1. Video YRYBY In is an YPbPr signal coming from D-SUB connector.
 2. Video SerialDigital In is a HDMI signal coming from DVI-I connector.

You can call IAMCrossbar::Route routine to switch the input channel.

# 5.2.2 Example Graphs

The Microsoft DirectX SDK provides a very useful debugging utility called GraphEdit, which can be used to simulate graph building. From the Graph menu of the GraphEdit application, click Insert Filters… and choose the desired filters. Filters are organized by categories. Click Insert Filter button to add the filters to a graph. Then connect two filters’ pins by dragging mouse from one filter’s output pin to another filter’s input pin. An arrow will be drawn if these two pins agree on the connection.

![Which filters do you want to insert?\nDevice Control Filters\nDirectShow Filters\nDMO Audio Capture Effects\nDMO Audio Effects\nDMO Video Effects\nExternal Renderers\nMidi Renderers\nMulti-Instance Capable VBI Codes\nVideo Capture Sources\nADLINK HDV62 Video Capture\nVideo Compressors\nWDM Stream Decompression Devices\nWDM Streaming Capture Devices\nWDM Streaming Communication Transforms\nWDM Streaming Crossbar Devices\nADLINK HDV62 Crossbar\nWDM Streaming Data Transforms\nWDM Streaming Encoder Devices\nWDM Streaming Interface Transforms\nWDM Streaming Mixer Devices\nInsert Filter\nCancel\nFavorite Filter?\nFilter\nMoniker:\nLegend\nDirectX Media Object (DMO)\nUses Kemel Streaming (KSProxy)\nUses Compression Manager (ACM/ICM)\nPlug and Play (PNP) device filter\nDefault filter color](.hdv62-50-11164-1000-005-en/3bfd382c96252dc5bd17e36b89ded8cd0e23b132957d68acfa98b3324b4b67a1.jpg)

After inserting ADLINK HDV62 Video Capture filter and ADLINK HDV62 Crossbar filter, right click on the rectangle and click Filter Properties…. The filter properties dialogue will appear. Use the property pages to set video settings before connecting video pins to other filters. The property pages are shown below:

# ADLINK HDV62 Video Capture filter:

Video Format:

![ADLINK HDV62 Video Capture Properties\nVideo Format | Video Proc Amp | Video Decoder |\nSystem Analog RGB , XGA 60fps (1024 x 768)\nSensor Format XGA 60fps (1024 x 768)\nVGA 60fps (640 x 480)\nSVGA 60fps (800 x 600)\nXGA 60fps (1024 x 768)\nSXGA 60fps (1280 x 1024)\nOK Cancel Apply Help](.hdv62-50-11164-1000-005-en/8d11df1d628f1ad479dc29b3a8e4aeba940ecbce3a38a80d18be78e3b047eb60.jpg)

In the above picture, System is current settings. Content of Sensor Format is changed with different crossbar input. Supported sensor format please refer to section 5.4.1.1

# Video Proc Amp:

![ADLINK HDV62 Video Capture Properties\nVideo Format | Video Proc Amp | Video Decoder |\nBrightness\nContrast\nHue\nSaturation\nSharpness\nGamma\nWhite Balance\nBacklight Comp\nGain\nColorEnable PowerLine Frequency\n(Anti Flicker)\nDefault\nAuto\nOK Cancel Apply Help](.hdv62-50-11164-1000-005-en/7b04eedfd3ad636cabdb88e96150329e833fd18d0d5dc84b127efbf973f515cb.jpg)

# Video Decoder:

![ADLINK HDV62 Video Capture Properties\nVideo Format | Video Proc Amp (Video Decoder)\n:Video Standard None\nSignal Detected: 1\nLines detected: 768\n□ YCR Input\n□ Output Enable\nOK Cancel Apply Help](.hdv62-50-11164-1000-005-en/172dbf5e3a9469d009cf8ff4eb4ca8bcbe10484f3354d9cd78ad429ae5766ee7.jpg)

In the above graphic, Signal Detected represents whether the input source is valid, and Lines detected represents the valid lines of the input source.

Capture Pin Properties:
![Capture Properties\nStream Format\nVideo Format\nVideo Standard: None\nFrame Rate: 60.000\nFlip Horizontal: Snap Shot\nColor Space / Compression:\nRGB 24\nOutput Size:\n640 x 480\nCompression\nI Frame Interval:\nP Frame Interval:\nQuality:\nOK Cancel Apply Help](.hdv62-50-11164-1000-005-en/3a9419709349634eb9a77d64d01c2ce83c7c6cfa5156b1e76f391f9b58a86e35.jpg)

In the above, Color Space/Compression is BGRA means BGR30. Supported Color Space please refers to section 5.3.3.

# ADLINK HDV62 Crossbar filter:

![ADLINK HDV62 Crossbar Properties\nCrossbar\nInput\n0: Video RGB In\nCurrent Input:\n2: Video RGB In\nRelated Pin:\n0: Video RGB In\nLink Related Streams\nOutput\n0: Video Decoder Out\nRelated Pin:\n0: Video Decoder Out\nOK    Cancel    Apply    Help](.hdv62-50-11164-1000-005-en/687bbc843bcc81020337ed702962621023f0abfeeda3d65ea68c49b2b313a370.jpg)

Select input before the Capture pin of ADLINK HDV62 Video Capture filter is connected.

# Example Graph

1. Open GraphEdit.exe.
2. Click ‘Insert a filter into the graph’ on the toolbar and insert ‘ADLINK HDV62 Video Capture’, ‘ADLINK HDV62 Crossbar’, and ‘Video Renderer’ filters where ‘ADLINK HDV62 Video Capture’ is in ‘Video Capture Sources’ group, ‘ADLINK HDV62 Crossbar’ in ‘WDM Streaming Crossbar Devices’ group, and ‘Video Renderer’ in ‘DirectShow Filters’ group.
3. Right click on ‘ADLINK HDV62 Crossbar’ filter and select ‘Filter Properties…’. In ‘ADLINK Crossbar Properties’ dialog, select the Input channel. Click ‘OK’ to close it.
4. Right click on ‘ADLINK HDV62 Video Capture’ filter and select ‘Filter Properties…’. In ‘ADLINK HDV62 Video Capture Properties’ dialog, select the Sensor Format. Click ‘OK’ to close it.
5. Right click on Capture pin of ‘ADLINK HDV62 Video Capture’ filter and select ‘Pin Properties…’. In ‘Capture Properties’ dialog, select the Color Space/Compression. Click ‘OK’ to close it.
6. Drag cursor from ‘Video Decoder Out’ pin to ‘Analog Video In’ pin and from ‘Capture’ pin to ‘Input’ pin as illustrated in the following graphic.
7. Click ‘Play the graph’ on the toolbar to start a preview.

![The image displays a flowchart with three rectangular blocks connected sequentially from left to right.\n\n**Labeled Blocks:**\n\n1.  **Left Block (Light Blue):**\n    *   '0: Video RGB In'\n    *   '1: Video YRYBYI In'\n    *   '2: Video SerialDigital In'\n    *   '0: Video Decoder Out'\n    *   'ADLINK HDV62 Crossbar'\n\n2.  **Middle Block (Orange):**\n    *   'Analog Video In'\n    *   'ADLINK HDV62 Video Capture'\n    *   'Capture'\n\n3.  **Right Block (Light Purple):**\n    *   'Input'\n    *   'Video Renderer'\n\n**Connections:**\n\n*   An arrow connects the right side of the **Left Block** to the left side of the **Middle Block**.\n*   An arrow connects the right side of the **Middle Block** to the left side of the **Right Block**.](.hdv62-50-11164-1000-005-en/108ae308f71c77728556608e38a0841976577f596dea41d4fae7699258e61016.jpg)

Note: If you choice VMR to substitute for default Video Renderer, the preview video will be a vertical mirror video. Please insert a Color Space Converter filter before it to correct this symptom.

# 5.3 Controlling Driver

The ADLINK HDV62 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 property pages and using the COM interfaces.

# 5.3.1 Use Property Pages

There are two embedded property pages in the driver. To show these property pages, use Windows API:

# OleCreatePropertyFrame.

Documentation about Displaying a Filter’s Property Page can be found on Microsoft MSDN homepage.

Below is the example code for adding property pages:

```c
// pFilter points to an ADLINK HDV62 Video Capture filter
// or an ADLINK HDV62 Crossbar 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
    0, // x (Reserved)
    0, // y (Reserved)
    FilterInfo.achName,// Caption for the dialog box
    1, // Number of filters
```

```javascript
(IUnknown **)&m_pFilter,// Pointer to the filter
caGUID.cElems,// Number of property pages
caGUID.pElems,// Pointer to property page CLSIDs
0, // Locale identifier
0, // Reserved
NULL // Reserved
);
CoTaskMemFree(caGUID.pElems);
```

# 5.3.2 Use COM interfaces

Use the methods of IAMVideoProcAmp interface of standard DirectShow Interface to get or set the qualities of an incoming video signal, such as contrast, saturation… etc. Other interfaces please refer to DirectX SDK help and next section.

```cpp
// pFilter points to an ADLINK HDV62 Video Capture filter

IAMVideoProcAmp *pAmp;
HRESULT hr;
long contrast, flags;
hr = pFilter->QueryInterface(IID_IAMVideoProcAmp, (void **)&pAmp);
if (SUCCEDED(hr))
{
    pAmp->Get(VideoProcAmp_Contrast, &contrast, &flags);

    pAmp->Release();
}
```

# ADLINK HDV62 Crossbar

The ADLINK HDV62 Crossbar filter implements an IAMCrossbar interface. It routes signals from an analog or digital source to a video capture filter.

```txt
// pFilter points to an ADLINK HDV62 Crossbar filter

IAMCrossbar *pXbar;
HRESULT hr;
hr = pFilter->QueryInterface(IID_IAMCrossbar, (void **)&pXbar);
if (SUCCEEDED(hr))
{
    // Route from input 1 to output 0
    pXbar->Route(0, 1);
    pXBar->Release();
}
```

# 5.3.3 Color Space

The ADLINK HDV62 Video Capture supports 7 kind of following color spaces:

MEDIASUBTYPE\_RGB24 – 8bit R + 8bit G + 8bit B

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>B1</td><td>R0</td><td>G0</td><td>B0</td></tr><tr><td>dw1</td><td>G2</td><td>B2</td><td>R1</td><td>G1</td></tr><tr><td>dw2</td><td>R3</td><td>G3</td><td>B3</td><td>R2</td></tr></table>

MEDIASUBTYPE\_BGR30 – 10bit R + 10bit G + 10bit B

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>xx+B[9:4]</td><td>B[3:0]+G[9:6]</td><td>G[5:0]+R[9:8]</td><td>R[7:0]</td></tr></table>

‘x’ means ‘don’t care bit’.

Its compression (FOURCC code) is ‘BGRA’ and GUID is 41524742-0000-0010-8000-00AA00389B71.

MEDIASUBTYPE\_RGB32 – 8bit R + 8bit G + 8bit B + 8bit Alpha

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Alpha</td><td>R</td><td>G</td><td>B</td></tr></table>

MEDIASUBTYPE\_RGB8 – 8bit Y (Gray scale)

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Y3</td><td>Y2</td><td>Y1</td><td>Y0</td></tr></table>

MEDIASUBTYPE\_YUV8 – 8bit Y + 8bit Cb + 8bit Cr – YCbCr 4:4:4

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Y1</td><td>Cr0</td><td>Cb0</td><td>Y0</td></tr><tr><td>dw1</td><td>Cb2</td><td>Y2</td><td>Cr1</td><td>Cb1</td></tr><tr><td>dw2</td><td>Cr3</td><td>Cb3</td><td>Y3</td><td>Cr2</td></tr></table>

Its compression (FOURCC code) is ‘YUV8’ and GUID is 38565559-0000-0010-8000-00AA00389B71.

MEDIASUBTYPE\_YUY2 – 8bit Y + 8bit Cb/Cr – YCbCr 4:2:2

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Cr</td><td>Y</td><td>Cb</td><td>Y</td></tr></table>

MEDIASUBTYPE\_YU10 – 10bit Y + 10bit Cb/Cr – 20bit YCbCr 4:2:2

<table><tr><td rowspan="2">DWORD</td><td colspan="4">Pixel Data [31:0]</td></tr><tr><td>[31:24]</td><td>[23:16]</td><td>[15:8]</td><td>[7:0]</td></tr><tr><td>dw0</td><td>Cr0[1:0]+Y1[9:4]</td><td>Y1[3:0]+Cb0[9:6]</td><td>Cb0[5:0]+Y0[9:8]</td><td>Y0[7:0]</td></tr><tr><td>dw1</td><td>xxxx+Cb2[9:6]</td><td>Cb2[5:0]+Y2[9:8]</td><td>Y2[7:0]</td><td>Cr0[9:2]</td></tr><tr><td>dw2</td><td>Cb4[1:0]+Y4[9:4]</td><td>Y4[3:0]+Cr2[9:6]</td><td>Cr2[5:0]+Y3[9:8]</td><td>Y3[7:0]</td></tr><tr><td>dw3</td><td>xxxx+Cr4[9:6]</td><td>Cr4[5:0]+Y5[9:8]</td><td>Y5[7:0]</td><td>Cb4[9:2]</td></tr></table>

‘ x’ means ‘don’t care bit’.

Its compression (FOURCC code) is ‘YU10’ and GUID is 30315559-0000-0010-8000-00AA00389B71.

Notes for the MEDIASUBTYPE\_YU10 format:

Total bytes of one scan line need to be aligned to multiple of 16. If the requirement is not met, HDV62 appends dummy bytes to the end of each line. For example,

if width = 800 pixels, each line = 2144 bytes (11 dummy bytes appended);

if width = 640 pixles, each line = 1712 bytes (5 dummy bytes appended);

if width = 720 pixles, each line = 1920 bytes (0 dummy bytes appended).

The formula is: total bytes of each line = ((width \* 16 / 6) + 15) & \~15 with all integer calculation.

The formula to convert YCbCr to RGB is as following:

$$
R = Y + 1. 3 7 1 (C r - 1 2 8)
$$

$$
G = Y - 0. 6 9 8 (C r - 1 2 8) - 0. 3 3 6 (C b - 1 2 8)
$$

$$
\mathrm{B} = \mathrm{Y} + 1. 7 3 2 (\mathrm{Cb} - 1 2 8)
$$

# 5.4 Proprietary Interfaces

The proprietary interfaces are dedicated to ADLINK HDV62 Video Capture filter that they are not the standard interfaces of Direct-Show. They are kind of COM interfaces and can be got from ADLINK HDV62 Video Capture filter by call IBaseFilter::Query-Interface routine.

# 5.4.1 IVideoFormat

IVideoFormat provides methods to select sensor format, select output format, horizontal delay, and set video cropping.

# 5.4.1.1 Sensor Format

# Purpose

These functions read or write source format of CCD sensor including video standard, resolution, and frame rate.

# Prototype

 C/C++
HRESULT WriteSensorFormat (UINT Format)
HRESULT ReadSensorFormat (UINT \*Format)
 C#
int WriteSensorFormat (uint Format)
int ReadSensorFormat (out uint Format)
 VB.Net
WriteSensorFormat (ByVal Format As UInteger) As Integer
ReadSensorFormat (ByRef Format As UInteger) As Integer

# Parameters

 Format

The format of source sensor. Following are possible values fort different crossbar input:

# Channel 0: Analog RGB from DVI-I connector

 0: VGA 60 fps (640 x 480),
 1: SVGA 60 fps (800 x 600),
 2: XGA 60 fps (1024 x 768),
 3: SXGA 60 fps (1280 x 1024),

# Channel 1: YPbPr from D-SUB connector

 0: 525i 30 fps (720 x 480 interlace, in frame per second),
 1: 625i 25 fps (720 x 576 interlace, in frame per second),
 2: 525p 60 fps (720 x 480 progressive),
 3: 625p 50 fps (720 x 576 progressive),
 4: 720p 30 fps (1280 x 720 progressive),
 5: 720p 50 fps (1280 x 720 progressive),
 6: 720p 60 fps (1280 x 720 progressive),
 7: 1080i 25 fps (1920 x 1080 interlace, in frame per second),
 8: 1080i 30 fps (1920 x 1080 interlace, in frame per second),
 9: 1080p 50 fps (1920 x 1080 progressive)
 10: 1080p 60 fps (1920 x 1080 progressive)

# Channel 2: HDMI from DVI-I connector

 0: 720p 50 fps YCrCb In (1280 x 720 progressive),
 1: 720p 60 fps YCrCb In (1280 x 720 progressive),
 2: 1080i 25 fps YCrCb In (1920 x 1080 interlace, in frame per second),
 3: 1080i 30 fps YCrCb In (1920 x 1080 interlace, in frame per second),
 4: 1080p 25 fps YCrCb In (1920 x 1080 progressive)
 5: 1080p 30 fps YCrCb In (1920 x 1080 progressive)
 6: 1080p 50 fps YCrCb In (1920 x 1080 progressive)
 7: 1080p 60 fps YCrCb In (1920 x 1080 progressive)
 8: VGA 60 fps (640 x 480),
 9: SVGA 60 fps (800 x 600),
 10: XGA 60 fps (1024 x 768),
 11: SXGA 60 fps (1280 x 1024),
 12: UXGA 60 fps (1600 x 1200)
 13: 720p 50 fps RGB In (1280 x 720 progressive),
 14: 720p 60 fps RGB In (1280 x 720 progressive),
 15: 1080i 25 fps RGB In (1920 x 1080 interlace, in frame per second),
 16: 1080i 30 fps RGB In (1920 x 1080 interlace, in frame per second),
 17: 1080p 25 fps RGB In (1920 x 1080 progressive)
 18: 1080p 30 fps RGB In (1920 x 1080 progressive)
 19: 1080p 50 fps RGB In (1920 x 1080 progressive)
 20: 1080p 60 fps RGB In (1920 x 1080 progressive)

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.1.2 Cropping

# Purpose

These functions read or write actual output resolution.

# Prototype

 C/C++ HRESULT WriteCropping (RECT Rt) HRESULT ReadCropping (RECT \* Rt)
 C# int WriteCropping (Rectangle RECT Rt) int ReadCropping (out Rectangle RECT Rt)
 VB.Net WriteCropping (ByVar Rt as RECT) As Integer ReadCropping (ByRef Rt as RECT) As Integer

# Parameters

? Rt A rectangle setting to crop the sensor image as illustrated in Figure 4-1. The rectangle must be located inside the sensor image. Actual image starts from (Rt.left, Rt.top) and its width is Rt.right – Rt.left and height is Rt.bottom – Rt.top. Actual image width needs to be multiple of 16 pixels and actual height is even. If the sensor source is interlace, the top value in Rt need to be even

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.1.3 Horizontal Delay

# Purpose

These functions read or write the horizontal delay of frame images. Horizontal delay is like X offset. It can move images left or right to remove black vertical line.

# Prototype

 C/C++ HRESULT WriteHDelay (INT Delay) HRESULT ReadHDelay (INT \* Delay)
 C# int WriteHDelay (int Delay) int ReadHDelay (out int Delay)
 VB.Net WriteHDelay (ByVal Delay As Integer) As Integer ReadHDelay (ByRef Delay As Integer) As Integer

# Parameters

 Delay The horizontal delay of frame images. The allowed value is from -3 to 3. Each resolution has its default value that users call this routine after channel and sensor format have been set.

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2 IAdvance

IAdvace provides methods to access peripheral IOs including DIs, DOs, Trigger In, and Trigger Out.

# 5.4.2.1 DIO

# Purpose

These functions read and write the state of digital inputs and digital outputs. HDV62 has 4 DI pins and 4 DO pins.

# Prototype

```txt
▶ C/C++
HRESULT DIO_ReadPins (UINT StartPin,UINT StopPin,
    UINT *Values)
HRESULT DIO_WritePins (UINT StartPin,UINT StopPin,
    UINT Values)
HRESULT DIO_ReadDOs (UINT StartPin,UINT StopPin,
    UINT *Values)
```

```txt
▶ C#
int DIO_ReadPins (uint StartPin, uint StopPin, out uint Values)
int DIO_WritePins (uint StartPin, uint StopPin, uint Values)
int DIO_ReadDOs (uint StartPin, uint StopPin, out uint Values)
```

```txt
VB.Net
DIO_ReadPins (ByVal StartPin As UInteger, ByVal StopPin As UInteger, ByRef Values As UInteger) As Integer
DIO_WritePins (ByVal StartPin As UInteger, ByVal StopPin As UInteger, ByVal Values As UInteger) As Integer
DIO_ReadPins (ByVal StartPin As UInteger, ByVal StopPin As UInteger, ByRef Values As UInteger) As Integer
```

# Parameters

 StartPin
The beginning DIO pin you want to read from or write to. The StartPin is less than 4.
 StopPin
The end DIO pin you want to read from or write to. The StopPin is larger than or equal to StartPin and less than 4.
 Values

The states of DIO you read from or write to.

If StartPin = StopPin, Values is the state of single pin. Values = 0 means low level and Values = 1 means high level.

If StartPin &lt; StopPin, Values is the states of multi-pins. Each respective bit of Values is the states of each pin counting from StartPin. For example, StartPin = 0, StopPin = 3, and Values = 12 = 2b1010, that is Pin0 = low level, Pin1 = high level, Pin2 = low level, and Pin3 = high level.

# Return Value

No error occurs if return value &gt;= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.2 Interrupt

# Purpose

These functions enable or disable interrupt of DIs. The HDV62 will issue a hardware interrupt when change of state (COS) of any DI. Please refer to INotify section in this chapter to know how to capture the interrupt signal.

# Prototype

 C/C++ HRESULT DIO\_EnableInterrupt ( ) HRESULT DIO\_DisableInterrupt ( )
 C# int DIO\_EnableInterrupt ( ) int DIO\_DisableInterrupt ( )
 VB.Net DIO\_EnableInterrupt ( ) As Integer DIO\_DisableInterrupt ( ) As Integer

# Parameters

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.3 Trigger Input Mode

# Purpose

These functions read or write the mode of external trigger signal. Trigger Input is an external pin which can accept external signal. This signal can control when to capture a frame.

# Prototype

 C/C++ HRESULT TriggerIn\_WriteMode (UINT Value) HRESULT TriggerIn\_ReadMode (UINT \*Value)
 C# int TriggerIn\_WriteMode (uint Value) int TriggerIn\_ReadMode (out uint Value)
 VB.Net TriggerIn\_WriteMode (ByVal Value As UInteger) As Integer TriggerIn\_ReadMode (ByRef Value As UInteger) As Integer

# Parameters

 Value Enable or disable trigger input. Could be one of the following values:
0: Free run – the source input is according to CCD camera
1: External trigger or software trigger – holds frame acquisition until trigger input is active or SoftwareTrigger is called.

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.4 Trigger Input Polarity

# Purpose

These functions read or write the polarity of external trigger signal. HDV62 captures a frame when Trigger Input is enabled and the state of polarity is reached.

# Prototype

 C/C++ HRESULT TriggerIn\_WritePolarity (UINT Value) HRESULT TriggerIn\_ReadPolarity (UINT \*Value)
 C# int TriggerIn\_WritePolarity (uint Value) int TriggerIn\_ReadPolarity (out uint Value)
 VB.Net TriggerIn\_WritePolarity (ByVal Value As UInteger) As Integer TriggerIn\_ReadPolarity (ByRef Value As UInteger) As Integer

# Parameters

 Value The polarity of trigger input. Could be one of the following values:
0: rising edge
1: falling edge

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.5 Software Trigger

# Purpose

This function controls when to get a frame when Trigger Input is enabled.

# Prototype

 C/C++ HRESULT TriggerIn\_SoftwareTrigger ( )
 C# int TriggerIn\_SoftwareTrigger ( )
 VB.Net TriggerIn\_SoftwareTrigger ( ) As Integer Parameters

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.6 One Pulse Out

# Purpose

These functions read or write the mode of trigger output. Trigger Output is an external pin which can output continuous pulse signal.

# Prototype

 C/C++ HRESULT TriggerOut\_OnePulseOut ()
 C# int TriggerOut\_OnePulseOut ()
 VB.Net TriggerOut\_OnePulseOut () As Integer

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.7 Trigger Output Polarity

# Purpose

These functions read or write the polarity of trigger output.

# Prototype

 C/C++
HRESULT TriggerOut\_WritePolarity (UINT Value)
HRESULT TriggerOut\_ReadPolarity (UINT \*Value)
 C#
int TriggerOut\_WritePolarity (uint Value)
int TriggerOut\_ReadPolarity (out uint Value)
 VB.Net
TriggerOut\_WritePolarity (ByVal Value As UInteger) As Integer
TriggerOut\_ReadPolarity (ByRef Value As UInteger) As Integer

# Parameters

 Value

The active polarity of trigger output. Could be one of the following values:

0: normal low, active high

1: normal high, active low

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.8 Trigger Output Pulse Width

# Purpose

These functions read or write the pulse width of trigger output.

# Prototype

 C/C++ HRESULT TriggerIn\_WritePulseWidth (UINT Value) HRESULT TriggerIn\_ReadPulseWidth (UINT \*Value)
 C# int TriggerIn\_WritePulseWidth (uint Value) int TriggerIn\_ReadPulseWidth (out uint Value)
 VB.Net TriggerIn\_WritePulseWidth (ByVal Value As UInteger) As Integer TriggerIn\_ReadPulseWidth (ByRef Value As UInteger) As Integer

# Parameters

 Value The pulse width of trigger output, in us.

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.9 EDID ROM Ready Status

# Purpose

These functions read or write the ready status of the EDID ROM.

# Prototype

 C/C++
HRESULT EDID\_WriteReadyStatus (UINT Value)
HRESULT EDID\_ReadReadyStatus (UINT \*Value)
 C#
int EDID\_WriteReadyStatus (uint Value)
int EDID\_ReadReadyStatus (out uint Value)
 VB.Net
EDID\_WriteReadyStatus (ByVal Value As UInteger) As Integer
EDID\_ReadReadyStatus (ByRef Value As UInteger) As Integer

# Parameters

 Value

Indicates whether or not the EDID ROM is ready. This value can be read by external device through DVI-I connector.

Some external devices can auto-adjusting their resolution by reading this EDID ROM. Users can configure the content of the EDID ROM and set it as ready state. Please see figure 4-2 for EDID hardware architecture. Could be one of the following values:

0: EDID ROM is not ready

1: EDID ROM is ready

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.10EDID ROM Access Permission

# Purpose

These functions read or write whether or not applications can access the EDID ROM.

# Prototype

 C/C++ HRESULT EDID\_WriteAccessPermission (UINT Value) HRESULT EDID\_ReadAccessPermission (UINT \*Value)
 C# int EDID\_WriteAccessPermission (uint Value) int EDID\_ReadAccessPermission (out uint Value)
 VB.Net EDID\_WriteAccessPermission (ByVal Value As UInteger) As Integer EDID\_ReadAccessPermission (ByRef Value As UInteger) As Integer

# Parameters

 Status Indicates whether or not the EDID ROM can be accessed. The EDID ROM can be accessed by either application or external device at the same time. So if you want to open EDID, you need to open access permission, configure EDID ROM, close access permission, and then plug external device into DVI-I connector. Please see figure 4-2 for EDID hardware architecture. Could be one of the following values: 0: EDID ROM is not accessible
1: EDID ROM is accessible

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.11EDID ROM Write Protection

# Purpose

These functions read or write whether or not the EDID ROM is writable.

# Prototype

 C/C++
HRESULT EDID\_WriteWriteProtection (UINT Value)
HRESULT EDID\_ReadWriteProtection (UINT \*Value)
 C#
int EDID\_WriteWriteProtection (uint Value)
int EDID\_ReadWriteProtection (out uint Value)
 VB.Net
EDID\_WriteWriteProtection (ByVal Value As UInteger) As Integer
EDID\_ReadWriteProtection (ByRef Value As UInteger)
As Integer

# Parameters

 Status

Indicates whether or not the EDID ROM is writable. Users need to break write protection before write EDID ROM and set it to protect the content of the EDID ROM. Please see figure 4-2 for EDID hardware architecture. Could be one of the following values:

0: EDID ROM can be read/write

1: EDID ROM is read only

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.2.12EDID ROM Read/Write

# Purpose

These functions read or write the value of EDID ROM.

# Prototype

 C/C++ HRESULT EDID\_WriteRom (UINT Offset, UINT Value) HRESULT EDID\_ReadRom (UINT Offset, UINT \*Value)
 C# int EDID\_WriteRom (uint Offset, uint Value) int EDID\_ReadRom (uint Offset, out uint Value)
 VB.Net EDID\_WriteRom (ByVal Offset As UInteger , ByVal Value As UInteger) As Integer EDID\_ReadRom (ByVal Offset As UInteger , ByRef Value As UInteger) As Integer

# Parameters

 Offset Indicates the offset of the EDID ROM. Allowed value is between 0 and 255.
 Value Indicates the value of the EDID ROM. Allowed value is between 0 and 255.

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.3 ICardInfo

# 5.4.3.1 Version

# Purpose

These functions get miscellaneous versions

# Prototype

 C/C++ HRESULT GetHardwareVersion (UINT \*Version) HRESULT GetFirmwareVersion (UINT \*Version) HRESULT GetDriverVersion (UINT \*Version)
 C# int GetHardwareVersion (out uint Version) int GetFirmwareVersion (out uint Version) int GetDriverVersion (out uint Version)
 VB.Net GetHardwareVersion (ByRef Version as UInteger) As Integer GetFirmwareVersion (ByRef Version as UInteger) As Integer GetDriverVersion (ByRef Version as UInteger) As Integer

# Parameters

 Version A hexadecimal number that each byte represents a version digital.

For driver version, Version = (Major &lt;&lt; 24 + Minor &lt;&lt; 16 + Revision &lt;&lt; 8 + Release).

For example, if Version = 0x1000001, it represents “1.0.0.1”.

For firmware version, Version = (Year-2000) &lt;&lt; 28 + Month &lt;&lt; 24 + (Day / 16) &lt;&lt; 20 + (Day % 16) &lt;&lt; 16 + (Hour / 16) &lt;&lt; 12 + (Hour % 16) &lt;&lt; 8 + (Minute /16) &lt;&lt; 4 + (Minute % 16).

To simplify, it can be expressed as the output of printf in C language as following:

```c
int Year = (Version &gt;> 28) + 2000;
int Month = (Version >> 24) & 0x0F;
int Day = (Version >> 16) & 0xFF;
int Hour = (Version >> 8) & 0xFF;
int Minute = Version & 0xFF;
printf("%d/%d/%x %x:%x", Year, Month, Day, Hour, Minute);
```

For example, if Version = 0x9b191407, it represents “2009/ 11/19 14:07”.

For hardware version, the least 16 bits are carrier board version and the most 16 bits are daughter board version. If most 16 bits are all zero, the hardware is a single board. Version of carrier board or daughter board = (Major &lt;&lt; 8 + Minor).

For example, if Version = 0xA1A2, it represents carrier board version is “A2” and daughter board version is “A1”.

# Return Value

No error occurs if return value &gt;= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.3.2 Card ID

# Purpose

This function gets card ID which is set by DIP switch on HDV62 card.

# Prototype

 C/C++ HRESULT GetCardID (UINT\* ID)
 C# int GetCardID (out uint ID)
 VB.Net GetCardID (ByRef ID As UInteger) As Integer

# Parameters

 ID Card ID can be set by DIP switch on card. Its possible value is from 0 to 15. Card ID can distinguish cards when multicards were installed on one system. Set them to different number according to chapter 2 Hardware Reference. Leave card ID as default, all are same is no problem, if you don’t care about it.

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.4.4 INotify

# 5.4.4.1 Enable and Disable Event

# Purpose

These functions enable or disable event of DI interrupt.

# Prototype

 C/C++ HRESULT EnableEvent (ULONG EventID, BYTE \*EventHandle, BYTE \*\*Cookie) HRESULT DisableEvent (ULONG EventID, BYTE \*Cookie)
 C# int EnableEvent (uint EventID, IntPtr EventHandle, out IntPtr Cookie) int DisableEvent (uint EventID, IntPtr Cookie)
 VB.Net EnableEvent (ByVal EventID As UInteger, ByVal EventHandle As IntPtr, ByRef Cookie As IntPtr) As Integer DisableEvent (ByVal EventID As UInteger, ByValCookie As IntPtr) As Integer

# Parameters

 EventID A user defined positive number
 EventHandle A handle created by user’s application
 Cookie A pointer to retain the address of object created by EnableEvent routine. This variable is used for releasing this created object.

# Return Value

No error occurs if return value >= 0; if negative value, call AMGet-ErrorText function to get error information about return codes.

# 5.5 Build Environment Settings

# Include Files

All applications need include the file shown in the following table.

<table><tr><td>Include File</td><td>Description</td></tr><tr><td>DShow.h</td><td>The header file is required for all C++ applications.</td></tr><tr><td>Hdv62Proxy.h</td><td>The header file is required for all C++ applications.</td></tr><tr><td>Hdv62Guids.h</td><td>The header file is required for all C++ applications</td></tr><tr><td>DirectShowLib</td><td>Imports this name space for all Microsoft .Net application.</td></tr><tr><td>Hdv62ProxyLib</td><td>Imports this name space for all Microsoft .Net application.</td></tr></table>

# Library File

All applications need the library file shown in the following table.

<table><tr><td>Library File</td><td>Description</td></tr><tr><td>Strmiids.lib</td><td>Exports class identifiers (CLSIDs) and interface identifiers (IIDs). All C++ applications require this library.</td></tr><tr><td>Quartz.lib</td><td>Exports the AMGetErrorText function for C++ applications. If you do not call this function, this library is not required.</td></tr><tr><td>DirectShowLib-2005.dll</td><td>The class library of DirectShow is required for all Microsoft .Net applications.</td></tr><tr><td>Hdv62ProxyLib.dll</td><td>The class library of the interfaces of HDV62 is required for all Microsoft .Net applications.</td></tr></table>

Note: In the above, the libraries for Microsoft .Net applications work and test on .Net Framwork 2.0. You should use Microsoft Visual Studio 2005 to build your .Net application.

# 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%\Samples\C++\DirectShow\BaseClasses and build it.

2. Add the paths to the include directory in the settings of your project: %DXSDK%\include %DXSDK%\Samples\C++\DirectShow\BaseClasses

3. Add the paths to the additional library directory in the settings of your project: %DXSDK%\Lib %DXSDK%\Samples\C++\DirectShow\Base-Classes\Release or, %DXSDK%\Samples\C++\DirectShow\Base-Classes\Debug

In the above, %DXSDK% is the installation path of DirectX SDK.

# .Net Programming Users

Microsoft DirectShow only provides C++ programming. As for .net users, they need convert DirectShow COM objects to .net classes. Fortunately, the work had been done as a sourceforge project. Download the source codes and samples from http://sourceforge.net/projects/directshownet/. It is a good start to program your DirectShow codes by .net languages. We also provided samples dedicated to HDV62 cards in the installation directory.

# 6 ViewCreatorPro Utility

ViewCreatorPro provides a simple but powerful way to setup, configure, test, and debug a vision system. This chapter outlines how to verify the vision system by ViewCreatorPro.

Note: ViewCreatorPro is only available for Windows /XP/Vista with a recommended screen resolution higher than 800x600.

# 6.1 Overview

ViewCreatorPro offers the following features:

 32-bit operations under Windows XP/Vista DirectShow driver
 Access and configuration of HDV62 cards
 Video picture adjustments (brightness, contrast, hue, saturation, video cropping)
 Open an image file (BMP or JPG)
 Save an image file (BMP)
 Direct access to general purpose I/O
 Trigger I/O
 EDID R/W

# 6.2 Component Description

Launch ViewCreatorPro and you can see the following view:

![ViewCreatorPro\nFile View Video Format Color Format Image Size Tool Help\nAdjustment\nContrast Hor Saturation H Delay\n128 0 128 -2\nDefault\nDevices\nLocal HDY62_Cool0(DirectFlow)\nPort0 p = (0,0) v = 0 rate = .00 fps total : 0 frames ratio = 1.00, 1.00](.hdv62-50-11164-1000-005-en/e4c1c21325b3c335ee9698c12d9986b93ab29cc500174f5a54c7fa25ed4f99cf.jpg)

# 6.2.1 Devices panel

![Devices\nLocal\nHDV62_Card0(DirectShow)\nPort0](.hdv62-50-11164-1000-005-en/f9a7b2e4578c1996351dea5170eb3ecd863b5e1e59b16da6944d63cd81162206.jpg)

![The image displays a low-resolution, pixelated icon of a computer monitor. Inside the screen, which has a light blue gradient background, the text 'eBay' is visible in a dark font. Below the monitor screen is a grey base resembling a keyboard with dark, indistinct keys.](.hdv62-50-11164-1000-005-en/4b97ff1b36984024ad0fa3bf39f212892c56439cdacacb4846011026c314dff2.jpg)

#

List all cards that ViewCreatorPro supports in the system.

![The image displays a low-resolution, pixelated graphic of a Minecraft Creeper. The character is primarily green with black square pixels arranged to form the eyes and a frowning mouth. A small, yellow section is visible at the very bottom. There is no text in the image.](.hdv62-50-11164-1000-005-en/b251b3ae8026716a79235df8a9c4b201bcdf7f99cc0526e105aa49a70d386108.jpg)

# Active Device

All operations will apply to this device.

![The image displays a low-resolution, pixelated icon of a computer mouse. The mouse body is light gray with black shapes representing buttons. A yellow cord extends from the bottom of the mouse. There is no text visible in the image.](.hdv62-50-11164-1000-005-en/595833860ee1b283c3e17de2d4498354af23f678fef6f8ae422a9b1b7da7ff53.jpg)

# Inactive Device

Click the device name after this icon can activate this device.

![The image displays a small, pixelated green sphere or circle centered on a white background. Inside the green orb is a darker green cross shape. To the left of the green object is a vertical strip of white space.](.hdv62-50-11164-1000-005-en/7f88f0f22cc3fa4da4c741bc4e2479695f6d4dcf0eae75202a42331d1b45390a.jpg)

# Active port

All operations will apply to this port.

![The image displays a low-resolution, pixelated graphic of a circular object centered on a white background. The object resembles a wheel or a gear, featuring a dark outer rim with a blocky, segmented pattern that mimics a tire tread. Inside the rim is a lighter, concentric area that suggests a hub or spokes. The entire image is monochromatic, composed of black, grey, and white pixels.](.hdv62-50-11164-1000-005-en/93f7d682d84007de5ca1ad000b7c5be2ce5f266e20615d620834d3dec86401bd.jpg)

# Inactive port

Click the port name after this icon can activate this port.

![The image displays a black, pixelated 'X' shape centered on a white background.](.hdv62-50-11164-1000-005-en/82db9fd176bb7514d036ea2defadfb128fae7e7553ae05446d73fc1673f0e799.jpg)

# Close this panel

# 6.2.2 Adjustment Panel

This panel is used to adjust the parameters of images, including contrast, hue, saturation, and horizontal delay. Users can drag and drop the slider, or directly input a value in the edit box, to change the value of each parameter. Note that contrast, hue, and saturation can be adjusted only when YPbPr is selected.

![Adjustment\nContrast\nHue\nSaturation\nH Delay\n128\n0\n128\n0\nDefault](.hdv62-50-11164-1000-005-en/bd0a4327b86392f677d7ba785352ce2ad936954a9e0b6d13f772219af7ad27ab.jpg)

# Default Button

Press the Default button to reset all the parameters on the adjustment panel to default values.

Close this panel Close the adjustment panel.

# 6.2.3 Tool panel

![The image displays a software icon set against a light blue square background. The central element is a white document page with a folded upper-right corner. Superimposed on the left edge of the document is a small, dark grey square containing a white arrow pointing to the right. Positioned on the lower right side of the document is a green triangle pointing to the right.](.hdv62-50-11164-1000-005-en/19fb30ebe0e052a35089dbacb94f3b5359bafc98dd00f2a49bac25ab22c3430f.jpg)

# Continue Grab

Click it to grab images continuously and click it again to stop grabbing. This is a toggle button.

![The image shows a white document icon. On the left side, there is a smaller rectangular graphic representing an image, which features a black-and-white checkerboard pattern on the left and a yellow triangle pointing to the right on the right side. A solid reddish-brown square is located in the bottom right corner of the document.](.hdv62-50-11164-1000-005-en/353d61d26500e27a07e86fc41e87689843b4e823698641f9df7d691a367e1fbc.jpg)

# Stop Grab

Stop grabbing.

![The image shows a digital camera icon with the text 'Canon' printed on the front.](.hdv62-50-11164-1000-005-en/6361f14e091c74ddc5b3fcf2d910589672eae5518e4ff35dc9b5aef5f904c4b3.jpg)

# Snap Shot

Capture an image.

![This image displays a cropped, cartoon-style illustration of a human eye against a light blue background. The eye features a thick black outline, a light blue iris, a black pupil, distinct upper eyelashes, and a simple black eyebrow arching above. The right side of the illustration is cut off by the edge of the frame.](.hdv62-50-11164-1000-005-en/466672ad833e9d953541f848967d7a38484421f68dc1ce6db3c643fada358362.jpg)

# Hide/Show Image

Hide or show images. This is a toggle button.

![The image displays a square icon, likely representing a 'maximize' or 'expand' button. It features a white center surrounded by a thin blue border. Inside, four blue arrows are positioned near the corners, pointing diagonally outward away from the center. The entire icon is set against a light blue background.](.hdv62-50-11164-1000-005-en/56e4d0750d4036d4480b26fbe2b9ef754a5a13dfb2226c64d5543057811f4118.jpg)

# Fit Size

Fit the images to the display region.

![The image displays the text '1:1' in a black, bold font. The background is white on the left side and light blue on the right side.](.hdv62-50-11164-1000-005-en/7413412759393248e211207da1655f06ad2101f7f7633d51b322c6ed781c6f51.jpg)

# Original Size

Restore the images to the original size.

![The image displays a magnifying glass icon set against a light blue background. It features a yellow handle pointing toward the bottom left and a circular lens with a red outline. Centered inside the white lens is a red plus sign (+).](.hdv62-50-11164-1000-005-en/922fd9c03aa1b322d49d2928e53ed4f8812a7945b40a286930579c5ed77aa0e1.jpg)

# Zoom In

Zoom in the images .

![The image displays a computer icon featuring a magnifying glass. The handle is yellow and angled toward the bottom left. Inside the white circular lens, there is a red horizontal line resembling a minus sign. The icon is set against a light blue gradient background.](.hdv62-50-11164-1000-005-en/92af5a1fce309b5ba6842d2430975c3b34b96022881914e860de771e98a51a5e.jpg)

# Zoom Out

Zoom out the images.

![The image displays a small, low-resolution icon featuring a line graph. It shows black horizontal and vertical axes with a red line that trends upward, exhibiting a small dip before rising sharply. Blue arrows are visible on the right side and bottom edges, resembling navigation or scroll controls. There is no text in the image.](.hdv62-50-11164-1000-005-en/5cc8e7c9ceda87cbfd8afcfad795cbe70f93146d4cc60496dd95eb336dd331c2.jpg)

# Focus Value

Open a window to show the focus value chart of the selected horizontal line in an image. The selected horizontal line is marked in red, and users can change this line by clicking anywhere on the image. The background color of the window is gray and the focus value chart updates immediately while grabbing.

![The image displays a software application window titled 'FocusValueAll'.\n\nThe top toolbar contains icons on the left and three colored buttons labeled 'R' (red), 'G' (green), and 'B' (blue).\n\nBelow the toolbar is a graph titled 'Focus Value'.\n- The vertical axis is labeled 'Value' and has tick marks ranging from 0 to 256 in increments of 32 (0, 32, 64, 96, 128, 160, 192, 224, 256).\n- The horizontal axis is labeled 'Pixel' and ranges from 0 to 639.\n- The graph plots a step-function line chart with red, green, and blue lines showing varying signal levels across the pixel range.](.hdv62-50-11164-1000-005-en/00c015de1f5ec83a0000cdb15e00f909f5e0642386db72afe5eba44c5be330b5.jpg)

When the capturing is stopped, the background color of the window turns into black.

![| Pixel | Red Value | Blue Value | Green Value | Blue Value |\n|-------|-----------|------------|-------------|------------|\n| 0     | 128       | 128        | 128         | 128        |\n| 639   | 224       | 128        | 128         | 128        |](.hdv62-50-11164-1000-005-en/4823a36fb456fc1cd5ba700880aa913fe043a13c9bb990c5166d8fe68bbf1a5c.jpg)

If the color format of captured images is RGB, there are three curves individually represented red, green, and blue in the chart.

![| Pixel | Blue Line | Green Line | Red Line |\n|-------|-----------|------------|----------|\n| 0     | 192       | 64         | 32       |\n| 319   | 256       | 160        | 32       |](.hdv62-50-11164-1000-005-en/eabb89a83d09fbdd372ffc2203098db2fa6ddd42a64ba50d6dafc4fa93bc9ce1.jpg)

If the color format of captured images is YUV, there are three curves individually represented y, u, and v in the chart.

![| Pixel | Value |\n|-------|-------|\n| 0     | 192   |\n| 319   | 192   |](.hdv62-50-11164-1000-005-en/dafae61ce6af04061849c8cf3f1a33745a4b0345d68e6a03d7b948a7bd9a7e2f.jpg)

![An icon displaying a magnifying glass with a red circle and white plus sign inside, superimposed over a blue L-shaped line with arrows at its ends, set against a white background.](.hdv62-50-11164-1000-005-en/1a7f34bf02ba65cdafa3842828d9df114ddc2fc8f4d246c1c9083795c880f0ea.jpg)

# Zoom In

Open a new window to zoom in the green rectangle region appeared in the focus value window. Users can resize the green rectangle by dragging the vertical green line on the right side or on the left side.

# Differential

![The image displays a graph icon with blue axes pointing up and right. A red line graph follows a stair-step pattern moving upwards and to the right, set against a light blue background.](.hdv62-50-11164-1000-005-en/ad5ffd0c54841d4ab7d3d00e0b2ca2334d0c5da3d941af75e66d5e8eb1190d41.jpg)

Open a new window to show the slope chart in the green rectangle region appeared in the focus value window. Users can resize the green rectangle by dragging the vertical green line on the right side or on the left side.

![The image features a large red capital letter 'R' in the upper left corner. To the right, a red USB flash drive with a metallic connector tip is angled diagonally against a light blue gradient background.](.hdv62-50-11164-1000-005-en/9b8511ef1d581dc9e02617250096b048151f564bdb1956a7d9d3bbcf90d4a5c2.jpg)

# Show/Hide Red Values

Show or hide the red value of pixels.

![The image displays two light green rectangular cards or tiles arranged vertically. Each card features a dark green, abstract shape in the center that resembles a pair of sunglasses or a stylized face. The top card has a capital letter 'G' in the upper left corner, while the bottom card has a small dark dot in the lower right corner.](.hdv62-50-11164-1000-005-en/87bdd6d7bf673ad78de48a1f2edc1d6042419b636529d6f379bdb2dbc3544b53.jpg)

# Show/Hide Green Values

Show or hide the green value of pixels.

![A blue USB flash drive is angled diagonally across a light background. A large white capital letter 'B' is visible in the upper left corner.](.hdv62-50-11164-1000-005-en/1b4f92a20c6e31b40c0ee5cef63a91a1c00425591a3e124fbdf1907e3cf8b54a.jpg)

# Show/Hide Blue Values

Show or hide the blue value of pixels.

![The image is a low-resolution screenshot showing a close-up of a computer monitor displaying 3D modeling software. Three vertical panels are visible. The leftmost panel is dark and indistinct. The center panel features a grey, metallic 3D model of a mechanical part, appearing as a cylinder with an attached bracket or flange, set against a light blue background with faint grey lines. The right panel displays another grey 3D model, resembling a long cylindrical rod or shaft with a flanged end. No legible text is visible in the image.](.hdv62-50-11164-1000-005-en/1f5f4e1be467931cd21946438cddfa5c0aae52ae171daec19edfa2110e3a2d8b.jpg)

# Show/Hide Y Values

Show or hide the y value of pixels.

![The image displays two depictions of a USB flash drive against a light blue and white gradient background. On the left, there is a blue square icon with the letters 'USB' in white. On the right, a 3D rendering of a green USB flash drive is shown angled diagonally. It features a blue connector plug and a grey cap, with the letters 'USB' printed in blue on its green casing.](.hdv62-50-11164-1000-005-en/77793e1f8ebeeb2baa2babd7dd69e6926e8e1b1a3200210a2f8fbb636669e9b3.jpg)

# Show/Hide U Values

Show or hide the u value of pixels.

![The image displays a low-resolution graphic on a light blue background. It features a yellow torpedo or submarine angled diagonally upwards to the right, with a dark grey nose cone. To the left of this object is a large, yellow letter 'V'. Behind the yellow object is a smaller, light blue fish-like shape.](.hdv62-50-11164-1000-005-en/f0346b4cf3f6818c99d11dad4123505f1c956602509c2c47ad664c62509b9391.jpg)

# Show/Hide V Values

Show or hide the v value of pixels.

![The image displays a square icon with a white background. Inside, there is a light blue crosshair symbol intersecting a small circle at the center. Overlaid on the left and bottom borders is a purple arrow; the vertical segment features an arrowhead pointing upward at the top-left corner, and the horizontal segment features an arrowhead pointing to the right at the bottom-right corner.](.hdv62-50-11164-1000-005-en/6f878b2ac13a48a60a2e8a5c5535fb2770b3e65ed264c1df332c16b94a2181a5.jpg)

# Focus Cross

Display a blue cross on the image, and the pixel value of the cross point will be updated on the Status Panel. Users can move the position of the cross point by clicking anywhere of the image.

# 6.2.4 Status Panel

<table><tr><td>Port0</td><td>p = (0,0)</td><td>v = 0</td><td>rate = .00 fps</td><td>total : 0 frames</td><td>ratio = 1.00, 1.00</td></tr></table>

Items from left to right are selected port and channel, cursor position, pixel value, frame rate, total captured frames, and magnification (horizontal ratio, vertical ratio).

# 6.2.5 Display panel

Captured images will be displayed on this panel as below.

![UESA640X480-60\n1.57 2.09 3.14 4.19 6.29](.hdv62-50-11164-1000-005-en/64b64108324ea57fed68539db66837ae3a1d653fd68de37c5481464f5ffb598e.jpg)

Click the left mouse button and then drag the cursor on the image. A green rectangle appears and this region will be magnified to the same size as the display region. If you want to drag the green rectangle in the same proposition of width and height, keep pressing the “Shift” key before dragging.

![Abstract graphic with a green rectangle and arrow pointing to a black rectangle on a gradient background (no text or symbols)](.hdv62-50-11164-1000-005-en/d4bd1bb0acb826b2a1b42384c3971bc32992053419293fa6a41223b7b5d13718.jpg)

Click the right mouse button on the image, and the cursor will become a move2D icon. When the size of the image is larger than that of the display panel, users can drag the image when this icon appears.

![Abstract graphic with a green rectangle and arrow pointing to a black rectangle on a gradient background (no text or symbols)](.hdv62-50-11164-1000-005-en/afedb2fb99283156f2debdf3db7071c9c309384a45c099f15ca52171a1cff2c5.jpg)

# 6.2.6 Main Menu

# File menu

# Open Image

Open an image file and display it on Display panel.

# Save Image

Save current displaying image to a bitmap file.

# Exit

Exit ViewCreatorPro.

# View menu

# Device

Hide or unhide Devices panel.

# Adjustment

Hide or unhide Adjustment panel.

# Video Format menu

Change the video format here according to the video source. HDV62 support three kinds of video source: RGB (DVI-I), YPbPr (DSUB), and HDMI (DVI-I).

# RGB (DVI-I)

# VGA 60 fps (640 x 480)

Set the video format of captured images to VGA 60 fps (640 x 480).

# SVGA 60 fps (800 x 600)

Set the video format of captured images to SVGA 60 fps (800 x 600).

# XGA 60 fps (1024 x 768)

Set the video format of captured images to XGA 60 fps (1024 x 768).

# SXGA 60 fps (1280 x 1024)

Set the video format of captured images to SXGA 60 fps (1280 x 1024).

# YPbPr (DSUB)

# 720p 25 fps (1280 x 720 progressive)

Set the video format of captured images to 720p 25 fps (1280 x 720 progressive).

# 720p 30 fps (1280 x 720 progressive)

Set the video format of captured images to 720p 30 fps (1280 x 720 progressive).

# 720p 50 fps (1280 x 720 progressive)

Set the video format of captured images to 720p 50 fps (1280 x 720 progressive).

# 720p 60 fps (1280 x 720 progressive)

Set the video format of captured images to 720p 60 fps (1280 x 720 progressive).

# 1080i 25 fps (1920 x 1080 interlace)

Set the video format of captured images to 1080i 25 fps (1920 x 1080 interlace).

# 1080i 30 fps (1920 x 1080 interlace)

Set the video format of captured images to 1080i 30 fps (1920 x 1080 interlace).

# 1080p 25 fps (1920 x 1080 progressive)

Set the video format of captured images to 1080p 25 fps (1920 x 1080 progressive).

# 1080p 30 fps (1920 x 1080 progressive)

Set the video format of captured images to 1080p 30 fps (1920 x 1080 progressive).

# 1080p 50 fps (1920 x 1080 progressive)

Set the video format of captured images to 1080p 50 fps (1920 x 1080 progressive).

# 1080p 60 fps (1920 x 1080 progressive)

Set the video format of captured images to 1080p 60 fps (1920 x 1080 progressive).

# HDMI (DVI-I)

# 720p 50 fps (1280 x 720 progressive) YCRCB IN

Set the video format of captured images to 720p 50 fps (1280 x 720 progressive).

# 720p 60 fps (1280 x 720 progressive) YCRCB IN

Set the video format of captured images to 720p 60 fps (1280 x 720 progressive).

# 1080i 25 fps (1920 x 1080 interlace) YCRCB IN

Set the video format of captured images to 1080i 25 fps (1920 x 1080 interlace).

# 1080i 30 fps (1920 x 1080 interlace) YCRCB IN

Set the video format of captured images to 1080i 30 fps (1920 x 1080 interlace).

# 1080p 25 fps (1920 x 1080 progressive) YCRCB IN

Set the video format of captured images to 1080p 25 fps (1920 x 1080 progressive).

# 1080p 30 fps (1920 x 1080 progressive) YCRCB IN

Set the video format of captured images to 1080p 30 fps (1920 x 1080 progressive).

# 1080p 50 fps (1920 x 1080 progressive) YCRCB IN

Set the video format of captured images to 1080p 50 fps (1920 x 1080 progressive).

# 1080p 60 fps (1920 x 1080 progressive) YCRCB IN

Set the video format of captured images to 1080p 60 fps (1920 x 1080 progressive).

# VGA 60 fps (640 x 480)

Set the video format of captured images to VGA 60 fps (640 x 480).

# SVGA 60 fps (800 x 600)

Set the video format of captured images to SVGA 60 fps (800 x 600).

# XGA 60 fps (1024 x 768)

Set the video format of captured images to XGA 60 fps (1024 x 768).

# SXGA 60 fps (1280 x 1024)

Set the video format of captured images to SXGA 60 fps (1280 x 1024).

# UXGA 60 fps (1600 x 1200)

Set the video format of captured images to UXGA 60 fps (1600 x 1200).

# 720p 50 fps (1280 x 720 progressive) RGB IN

Set the video format of captured images to 720p 50 fps (1280 x 720 progressive).

# 720p 60 fps (1280 x 720 progressive) RGB IN

Set the video format of captured images to 720p 60 fps (1280 x 720 progressive).

# 1080i 25 fps (1920 x 1080 interlace) RGB IN

Set the video format of captured images to 1080i 25 fps (1920 x 1080 interlace).

# 1080i 30 fps (1920 x 1080 interlace) RGB IN

Set the video format of captured images to 1080i 30 fps (1920 x 1080 interlace).

# 1080p 25 fps (1920 x 1080 progressive) RGB IN

Set the video format of captured images to 1080p 25 fps (1920 x 1080 progressive).

# 1080p 30 fps (1920 x 1080 progressive) RGB IN

Set the video format of captured images to 1080p 30 fps (1920 x 1080 progressive).

# 1080p 50 fps (1920 x 1080 progressive) RGB IN

Set the video format of captured images to 1080p 50 fps (1920 x 1080 progressive).

# 1080p 60 fps (1920 x 1080 progressive) RGB IN

Set the video format of captured images to 1080p 60 fps (1920 x 1080 progressive).

# Color Format menu

#

Set the color format of captured images to gray.

# RGB32

Set the color format of captured images to RGB32.

# RGB24

Set the color format of captured images to RGB24.

# BGR30

Set the color format of captured images to BGR30.

# YUY2

Set the color format of captured images to YUY2.

# YUV8

Set the color format of captured images to YUV8.

# YU10

Set the color format of captured images to YU10.

# Image Size menu

# Cropping

Before using cropping, a correct card index must be selected first. Sensor Width and Sensor Height are the width and height of an original image, and these two values vary with your selected video format automatically. Before cropping an image, four parameters: X, Y, Width, Height must be properly set. X and Y represent the coordinates of the start position (upper left corner)?Width and Height stand for the width and height after cropping. Click the OK button to apply change, and then click the Continue Grab icon on the Tool panel to get cropped images.

![Cropping\nCard Index: TreeNode: HDV62_Card0(DirectShow)\nSensor Width: 340\nNote:\n0 (= X ( Sensor Width\nSensor Height: 480\n0 (= Y ( Sensor Height\n0 ( Width (= Sensor Width\nX: 0\n0 ( Height (= Sensor Height\nX + Width (= Sensor Width\nY: 0\nY + Height ( Sensor Height\nWidth: 640\nWidth = 16x\nHeight = 2x\nY = 2x, if interlace CCD\nHeight: 480\nOK](.hdv62-50-11164-1000-005-en/2ed854cc0c82babc36e6fc1a01d14dfe72a873e300f866ef1c420725b4c89f92.jpg)

# Tool menu

# DIO

Before using digital I/O, a correct card index must be selected first. There are four rectangles and four circles respectively representing four channels DO and four channels DI. Click on the rectangle to output a digital signal, and the signal level can be identified by the rectangle color (Lime green: High, Green: Low). The status of DI can be read from the circle color in a similar way as DO (Red: High, White: Low). Besides, if the interrupt is enabled, the interrupt count will be increased while the change of state (COS) of DI occurs.

![DIO\nCard Index: TreeNode: HDV62_Card0(DirectShow)\nDOs\nChannel 0 1 2 3\nDI s\nState\nChannel 0 1 2 3\nInterrupt\nEnable Count: 10](.hdv62-50-11164-1000-005-en/ba3d54856851e576850568ea2643ac96b824ad1410f724da9fe451dbefb04979.jpg)

# Trigger I/O

Before using trigger I/O, a correct card index must be selected first. When External Trigger is checked, users can set the trigger input polarity, and then click the Software Trigger button to generate a trigger pulse, or just wait for an external trigger input. Besides trigger input, HDV62 can generate an output trigger by clicking the One Pulse Out button. Users can also set the polarity and pulse width for the output trigger.

![Trigger I/O\nCard Index: TreeNode: HDV62_Card0(DirectShow)\nTrigger Input\nExternal Trigger\nPolarity: Rising Edge Falling Edge\nSoftware Trigger\nTrigger Output\nPulse width: 1000 Set\nPolarity: Rising Edge Falling Edge\nOne Pulse Out](.hdv62-50-11164-1000-005-en/e734e14325e01a56cbc380c93b7bd33aff8540bb1ad30f6f0e2536fc7ef8e836.jpg)

# EDID

Before using EDID, a correct card index must be selected first. Enter the offset and value, and then click the Write or Read button to write to or read from EDID ROM. Valid offset and input value range from 0 to 255, and the values in EDID ROM will not be erased when the system is powered off.

![EDID\nCard Index: TreeNode: HDV62_Card0(DirectShow)\nROM Ready\nOffset(Dec) Value(Dec)\n0-255 0-255\n0 0 Write\n0 Read](.hdv62-50-11164-1000-005-en/fa8365d762b42504f4835835e8b655d94b2053ba2df5c1c4888bb2a55bd9e6e9.jpg)

# Help menu

# About ViewCreatorPro

List the version of ViewCreatorPro.

![About ViewCreatorPro\nViewCreatorPro 1.0.0.0\nCopyright (C) 2009\nOK](.hdv62-50-11164-1000-005-en/b0427289e01d91c2059e9a3d792131305d6de7b6529e26a659fef3309a6f16dc.jpg)

# About Device

List the card id, hardware version, firmware version, and driver version of the HDV62.

![About Device\nCard ID : 15\nHardware Version : A2/A1\nFirmware Version : 2010/1/05 16:44\nDriver Version : 1.0.0.0](.hdv62-50-11164-1000-005-en/be58da4b21c1dec0de716426d59b4a5e05d7a558511555fbffad067719560171.jpg)
[🔗 Link to the original document](.hdv62-50-11164-1000-005-en/hdv62-50-11164-1000-005-en.pdf)
