National Instruments NI-IMAQ User Manual

Other manuals for NI-IMAQ: User Manual
Manual is about: Image Acquisition Software

Summary of NI-IMAQ

  • Page 1

    Imaq ™ ni-imaq ™ for ieee-1394 cameras user manual image acquisition software ni-imaq for ieee-1394 cameras user manual march 2001 edition part number 370362a-01.

  • Page 2

    Worldwide technical support and product information ni.Com national instruments corporate headquarters 11500 north mopac expressway austin, texas 78759-3504 usa tel: 512 794 0100 worldwide offices australia 03 9879 5166, austria 0662 45 79 90 0, belgium 02 757 00 20, brazil 011 284 5011, canada (cal...

  • Page 3: Important Information

    Important information warranty the media on which you receive national instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. Nati...

  • Page 4: Conventions

    Conventions the following conventions are used in this manual: » the » symbol leads you through nested menu items and dialog box options to a final action. The sequence file»page setup»options directs you to pull down the file menu, select the page setup item, and select options from the last dialog...

  • Page 5: Contents

    © national instruments corporation v ni-imaq for ieee-1394 cameras user manual contents chapter 1 introduction to ni-imaq for ieee-1394 cameras about the ni-imaq software .......................................................................................1-1 application development environments ....

  • Page 6

    Contents ni-imaq for ieee-1394 cameras user manual vi ni.Com introductory programming examples ........................................................................... 3-5 high-level snap functions ............................................................................ 3-5 high-level grab fu...

  • Page 7: Ieee-1394 Cameras

    © national instruments corporation 1-1 ni-imaq for ieee-1394 cameras user manual 1 introduction to ni-imaq for ieee-1394 cameras this chapter describes the ni-imaq for ieee-1394 software and lists the application development environments compatible with ni-imaq, describes the fundamentals of creatin...

  • Page 8

    Chapter 1 introduction to ni-imaq for ieee-1394 cameras ni-imaq for ieee-1394 cameras user manual 1-2 ni.Com application development environments this release of ni-imaq for 1394 supports the following application development environments (ades) for windows 2000 and windows me/98: • labview version ...

  • Page 9: Ni-Imaq For 1394

    Chapter 1 introduction to ni-imaq for ieee-1394 cameras © national instruments corporation 1-3 ni-imaq for ieee-1394 cameras user manual fundamentals of building applications with ni-imaq for 1394 architecture a block diagram of the ni-imaq for 1394 architecture shown in figure 1-1 illustrates the l...

  • Page 10

    Chapter 1 introduction to ni-imaq for ieee-1394 cameras ni-imaq for ieee-1394 cameras user manual 1-4 ni.Com the ni-imaq libraries the ni-imaq for 1394 for windows 2000/me/98 function libraries are dynamic link libraries (dlls), which means that ni-imaq for 1394 routines are not linked into the exec...

  • Page 11

    Chapter 1 introduction to ni-imaq for ieee-1394 cameras © national instruments corporation 1-5 ni-imaq for ieee-1394 cameras user manual • when compiling, indicate where the compiler can find the ni-imaq header files and shared libraries. You can find most of the files you need for development under...

  • Page 12: Software Overview

    © national instruments corporation 2-1 ni-imaq for ieee-1394 cameras user manual 2 software overview this chapter describes the classes of ni-imaq for 1394 functions and briefly describes each function. Introduction ni-imaq functions are grouped according to the following classes: • generic function...

  • Page 13: High-Level Functions

    Chapter 2 software overview ni-imaq for ieee-1394 cameras user manual 2-2 ni.Com high-level functions use high-level functions to quickly and easily capture images. If you need more advanced functionality, you can mix high-level functions with low-level functions. Snap functions snap functions captu...

  • Page 14: Low-Level Functions

    Chapter 2 software overview © national instruments corporation 2-3 ni-imaq for ieee-1394 cameras user manual sequence functions sequence functions start and stop a continuous acquisition of multiple frames. Imaq1394setupsequenceimage configures and starts a session for acquiring a full sequence into...

  • Page 15

    Chapter 2 software overview ni-imaq for ieee-1394 cameras user manual 2-4 ni.Com imaq1394stopacquisition stops an asynchronous acquisition or synchronous continuous acquisition immediately. Imaq1394getbuffer copies a frame buffer to a user-specified buffer. Imaq1394getimage copies a session’s image ...

  • Page 16

    Chapter 2 software overview © national instruments corporation 2-5 ni-imaq for ieee-1394 cameras user manual utility functions use utility functions to display an image in a window, save an image to a file, or to get detailed error information. Imaq1394plot plots a buffer to a window given a handle ...

  • Page 17: Programming With

    © national instruments corporation 3-1 ni-imaq for ieee-1394 cameras user manual 3 programming with ni-imaq for 1394 this chapter contains an overview of the ni-imaq for 1394 library, a description of the programming flow of ni-imaq for 1394, and programming examples. Flowcharts are included for the...

  • Page 18

    Chapter 3 programming with ni-imaq for 1394 ni-imaq for ieee-1394 cameras user manual 3-2 ni.Com low-level functions the low-level function set supports all types of acquisition. You can use low-level functions to start a synchronous or asynchronous acquisition. Establishing interface connections to...

  • Page 19: Camera Attributes

    Chapter 3 programming with ni-imaq for 1394 © national instruments corporation 3-3 ni-imaq for ieee-1394 cameras user manual before you can acquire image data successfully, you must open a camera with the imaq1394cameraopen function. Imaq1394cameraopen requires a camera name and returns a handle to ...

  • Page 20: Scalable Image Size

    Chapter 3 programming with ni-imaq for 1394 ni-imaq for ieee-1394 cameras user manual 3-4 ni.Com scalable image size ieee-1394 digital cameras support a predefined set of image sizes which you can select through the format and mode attributes in max. See your camera documentation for a list of suppo...

  • Page 21

    Chapter 3 programming with ni-imaq for 1394 © national instruments corporation 3-5 ni-imaq for ieee-1394 cameras user manual introductory programming examples this section introduces some examples for performing the different types of image acquisition. Note the error codes returned by ni-imaq are n...

  • Page 22

    Chapter 3 programming with ni-imaq for 1394 ni-imaq for ieee-1394 cameras user manual 3-6 ni.Com when you invoke a snap, it initializes the imaq 1394 device and acquires the next incoming video frame to a buffer. Use a snap for low-speed or single-capture applications where ease of programming is es...

  • Page 23

    Chapter 3 programming with ni-imaq for 1394 © national instruments corporation 3-7 ni-imaq for ieee-1394 cameras user manual calling imaq1394setupgrab initializes a session for a grab acquisition. After imaq1394setupgrab , each successive grab copies the last acquired buffer into a user buffer where...

  • Page 24

    Chapter 3 programming with ni-imaq for 1394 ni-imaq for ieee-1394 cameras user manual 3-8 ni.Com high-level sequence functions sequence functions include imaq1394setupsequence . A sequence initiates a variable-length and variable-delay transfer to multiple buffers. You can configure the delay betwee...

  • Page 25

    Chapter 3 programming with ni-imaq for 1394 © national instruments corporation 3-9 ni-imaq for ieee-1394 cameras user manual advanced programming examples use low-level functions or combine high-and low-level functions for more advanced programming techniques, including snap, grab, and sequence. Per...

  • Page 26

    Chapter 3 programming with ni-imaq for 1394 ni-imaq for ieee-1394 cameras user manual 3-10 ni.Com performing an asynchronous snap using low-level functions the low-level snap1394 async example demonstrates how to perform an asynchronous acquisition using low-level calls. The example sets up a single...

  • Page 27: Programming With

    © national instruments corporation 4-1 ni-imaq for ieee-1394 cameras user manual 4 programming with ni-imaq for 1394 vis this chapter describes how to use the ni-imaq 1394 vis in labview. Introduction the ni-imaq for ieee-1394 cameras vi library, a series of virtual instruments (vis) for using labvi...

  • Page 28

    Chapter 4 programming with ni-imaq for 1394 vis ni-imaq for ieee-1394 cameras user manual 4-2 ni.Com location of ni-imaq for 1394 examples the ni-imaq vi for ieee-1394 cameras examples illustrate some common applications. You can find these examples in the labview\examples\imaq directory for labview...

  • Page 29

    Chapter 4 programming with ni-imaq for 1394 vis © national instruments corporation 4-3 ni-imaq for ieee-1394 cameras user manual the most commonly used vis are on the imaq for ieee-1394 palette. You can find vis for basic acquisition and changing attributes. The motion and vision»imaq for ieee-1394»...

  • Page 30: Buffer Management

    Chapter 4 programming with ni-imaq for 1394 vis ni-imaq for ieee-1394 cameras user manual 4-4 ni.Com buffer management imaq create and imaq dispose manage image buffers in labview. Imaq create , shown in figure 4-2, allocates an image buffer. Image name is a label for the buffer created. Each buffer...

  • Page 31

    Chapter 4 programming with ni-imaq for 1394 vis © national instruments corporation 4-5 ni-imaq for ieee-1394 cameras user manual ni-imaq for 1394 acquisition types three ni-imaq image acquisition types are available in labview—snap, grab, and sequence. The following sections describe each acquisitio...

  • Page 32

    Chapter 4 programming with ni-imaq for 1394 vis ni-imaq for ieee-1394 cameras user manual 4-6 ni.Com figure 4-5 shows a simplified block diagram for using imaq1394 grab setup and imaq1394 grab acquire . Figure 4-5. Acquiring images using grab sequence a sequence initiates a variable-length and varia...

  • Page 33: Acquisition Vis

    Chapter 4 programming with ni-imaq for 1394 vis © national instruments corporation 4-7 ni-imaq for ieee-1394 cameras user manual figure 4-6 shows a simplified block diagram for using imaq1394 sequence . Place imaq create inside a for loop to create an array of images for the images in input to imaq1...

  • Page 34: Triggering

    Chapter 4 programming with ni-imaq for 1394 vis ni-imaq for ieee-1394 cameras user manual 4-8 ni.Com 4. Call imaq1394 get image . 5. After an acquisition, release the resources associated with the acquisition using imaq1394 close . Imaq1394 close also stops the acquisition if one is in progress. If ...

  • Page 35

    Chapter 4 programming with ni-imaq for 1394 vis © national instruments corporation 4-9 ni-imaq for ieee-1394 cameras user manual an image acquired using imaq1394 snap . You can display images in the same way using any acquisition type. For more information on the display capabilities of imaq vision,...

  • Page 36

    Chapter 4 programming with ni-imaq for 1394 vis ni-imaq for ieee-1394 cameras user manual 4-10 ni.Com your intensity graph now should appear similar to the image shown in figure 4-9. For more information on the intensity graph, consult your labview documentation figure 4-9. Intensity graph for image...

  • Page 37: Camera Attributes

    Chapter 4 programming with ni-imaq for 1394 vis © national instruments corporation 4-11 ni-imaq for ieee-1394 cameras user manual . Figure 4-11. Using a picture control to display an rgb image camera attributes camera attributes allow you to control camera-specific features such as brightness and sh...

  • Page 38: Error Handling

    Chapter 4 programming with ni-imaq for 1394 vis ni-imaq for ieee-1394 cameras user manual 4-12 ni.Com error handling every ni-imaq for 1394 vi contains an error in input cluster and an error out output cluster, as shown in figure 4-12. The clusters contain a boolean value that indicates whether an e...

  • Page 39: Error Code Format

    Chapter 4 programming with ni-imaq for 1394 vis © national instruments corporation 4-13 ni-imaq for ieee-1394 cameras user manual error code format error format for all ni-imaq for 1394 vis is the same, as follows: error in (no error) is a cluster that describes the error status before this vi execu...

  • Page 40

    Chapter 4 programming with ni-imaq for 1394 vis ni-imaq for ieee-1394 cameras user manual 4-14 ni.Com code is the number identifying an error or warning. If status is true, code is a non-zero error code. If status is false, code can be zero or a warning code. Use the error handler vis to look up the...

  • Page 41: Web Support

    © national instruments corporation a-1 ni-imaq for ieee-1394 cameras user manual a technical support resources web support national instruments web support is your first stop for help in solving installation, configuration, and application problems and questions. Online problem-solving and diagnosti...

  • Page 42: Worldwide Support

    Appendix a technical support resources ni-imaq for ieee-1394 cameras user manual a-2 ni.Com worldwide support national instruments has offices located around the world to help address your support needs. You can access our branch office web sites from the worldwide offices section of ni.Com . Branch...

  • Page 43: Glossary

    © national instruments corporation g-1 ni-imaq for ieee-1394 cameras user manual glossary a acquisition window the image size specific to a video standard or camera resolution. Active pixel region the region of pixels actively being stored. Defined by a pixel start [relative to the horizontal synchr...

  • Page 44

    Glossary ni-imaq for ieee-1394 cameras user manual g-2 ni.Com chrominance see chroma . Compiler a software utility that converts a source program in a high-level programming language, such as basic, c, or pascal, into an object or compiled program in machine language. Compiled programs run 10 to 1,0...

  • Page 45

    Glossary © national instruments corporation g-3 ni-imaq for ieee-1394 cameras user manual driver software that controls a specific hardware device, such as an imaq or daq device. E external trigger a voltage pulse from an external source that triggers an event such as a/d conversion. F field for an ...

  • Page 46

    Glossary ni-imaq for ieee-1394 cameras user manual g-4 ni.Com i i/o input/output. The transfer of data to/from a computer system involving communications channels, operator interface devices, and/or data acquisition and control interfaces. Ieee institute of electrical and electronics engineers. Inst...

  • Page 47

    Glossary © national instruments corporation g-5 ni-imaq for ieee-1394 cameras user manual luma the brightness information in the video picture. The luma signal amplitude varies in proportion to the brightness of the video signal and corresponds exactly to the monochrome picture. Luminance see luma ....

  • Page 48

    Glossary ni-imaq for ieee-1394 cameras user manual g-6 ni.Com o operating system base-level software that controls a computer, runs programs, interacts with users, and communicates with installed hardware or peripheral devices. P pci peripheral component interconnect. A high-performance expansion bu...

  • Page 49

    Glossary © national instruments corporation g-7 ni-imaq for ieee-1394 cameras user manual resolution (1) the number of rows and columns of pixels. An image composed of m rows and n columns has a resolution of . This image has n pixels along its horizontal axis and m pixels along its vertical axis. (...

  • Page 50

    Glossary ni-imaq for ieee-1394 cameras user manual g-8 ni.Com v v volts. Vi virtual instrument. (1) a combination of hardware and/or software elements, typically used with a pc, that has the functionality of a classic stand-alone instrument (2) a labview software module (vi), which consists of a fro...

  • Page 51: Index

    © national instruments corporation i-1 ni-imaq for ieee-1394 cameras user manual index a acquisition functions, 2-3 advanced programming examples, 3-9 to 3-10 asynchronous grab using low-level functions, 3-10 asynchronous snap using low-level functions, 3-10 grab using low-level functions, 3-9 seque...

  • Page 52

    Index ni-imaq for ieee-1394 cameras user manual i-2 ni.Com l low-level functions acquisition functions, 2-3 attribute functions, 2-4 utility functions, 2-5 m miscellaneous functions, 2-3 n national instruments web support, b-1 ni developer zone, b-1 ni-imaq for 1394 acquisition types, 4-5 grab, 4-5 ...