Foresight Imaging

Imaging Development Environment for Applications (IDEA) is a comprehensive set of hardware independent function calls, ActiveX controls, and software tools for board configuration, video control, image capture, video streaming, memory management, and more. IDEA consists of a Software Development Kit (SDK), a Tools library, and example programs with source code. The IDEA SDK provides both C functions and ActiveX controls so that programmers have their choice of utilizing Microsoft Visual C/C++, Visual Basic, or other supported OCX languages.

IDEA is a hardware independent library providing systems developers and OEMs with the confidence of a single interface to all supported boards, currently the AccuStream product families. Users can write their applications once and support their products and applications using any of the AccuStream frame grabbers. As new hardware is added to these product families, users can support them by adding the appropriate board driver and using any new function calls for new or unique features of that hardware. With IDEA, there is no need to reprogram the developed application.

IDEA Software

Key Features

  • AccuStream product line support
  • Hardware independent
  • C functions
  • AcitveX controls
  • Auto-SYNC Tools library
  • Example programs with source code
  • Royalty-free run-times

Software Support

  • Visual C/C++
  • Visual Basic
  • Windows 7 & 10, 32 & 64 bit

The SDK includes a series of C functions for frame grabber control and management as well as ActiveX controls for frame grabber information, frame grabber access and control, and video display in a window. The Tools library is a series of function calls that allows programmers to incorporate Auto-SYNC (Foresight Imaging’s automatic video analysis and board configuration software) functionality into their application programs. Several example programs, with source code, are included for image capture and display, image saving, triggered capture, video streaming, and more.

Functions List

Board Information

nHP_GetBoardInfoRetrieves specified board information.

Image Data Access

ihHD_AllocateAllocates frame grabber memory space for a specified image format.
eHP_FBFastReadCopies a block of data from the IDEA frame grabber memory into fpwBuf.
eHP_FBFastWriteCopies a block of data from *fpwBuf into the AccuStream Plus frame grabber memory.
eHP_FBHistoAccumulates histogram data from pixel values in frame grabber memory.

Image Handle

eHD_ABOCancelCancels a previously submitted asynchronous operation.
eHD_ABOGetStatusRetrieves the status of a previously submitted asynchronous operation.
eHD_ABOReleaseAllows queued operations that are on hold to be executed.
eHD_ABOWaitWaits for the asynchronous operation to complete.
eHD_CommandExecutes the specified command as set up in the specified image handle.
bHD_CommandDoneReturns status of Command Done.
eHD_DeallocateMakes a previously allocated image buffer in the frame grabber memory available.
eHD_DeallocateAllInvalidates all image handles assigned to the specified board.
eHD_FBFastReadPixelTransfers any rectangular section of a captured image from the image buffer in frame grabber memory to the application buffer fpwBuf.
eHD_FBHistoPixelAccumulates pixel code histogram data from any rectangular section of a captured image from the image buffer in frame grabber memory to the application buffer fpwBuf.
eHD_RSET_GetGets the RSET currently in use by an image handle.
eHD_RSET_SetConfigures an image handle for use with an Foresight Imaging board.
eHD_SetChannelChanges the channel used with a specified image handle.

Millisecond Timer

fine_abswaitReturns at a specified date and time.
fine_addAdds two millisecond time values.
fine_ascii_localConverts absolute date/times or elapsed days/milliseconds to an ASCII string.
fine_deltaAdds the specified number of milliseconds to the time value.
fine_laterAdds the specified number of milliseconds to the current time and stores this value.
fine_nowStores the current date and time.
fine_subtractSubtracts the second argument from the value pointed to by the first argument.
fine_waitReturns after waiting the specified number of milliseconds.

Preparing Board Access

bhHP_ClaimSets up board at the specified slot number.
nHP_ClaimAllScans for up to 15 Foresight Imaging boards and claims all of them.
eHP_CloseProhibits IDEA access to the specified Open Data structure.
_HP_ErrorDeclares that Error wError has been encountered while processing the board handle.
eHP_OpenPrepares a board for use by associating it with an Open Data structure.
HP_UnClaimReleases possible claim on a board.

Register Functions

HPIoutWrites a 16-bit Word into one of the indirect board registers.
HPoutWrites a 16-bit Word into one of the direct board registers.
eHD_RSET_CheckChecks an RSET structure against mode-specific criteria.
eHP_RSET_FReadReads the contents of a file containing IDEA video settings data.
eHP_RSET_FWriteWrites the IDEA video settings data to an ASCII file.
eHP_RSET_SetConfigures an Foresight Imaging board.
wHPIinReads a 16-bit Word from the specified indirect register.
wHPinReads a 16-bit Word from the specified direct register.


eHD_ASInitiateAllocates the AS_RUNSTATE structure complex.
eHD_ASTerminateDe-allocates the entire AS_RUNSTATE, AS_CHANNEL, RSET complex and completes the Auto-SYNC “session”.
bHP_CSyncDetectReports status of Command Ready.
nHP_ReportProvides a list of AccuStream boards found at system start-up.
eHD_SyncSurveySurveys channels on the AccuStream board looking for composite sync, horizontal sync, vertical sync, and syncless video sources.
HD_VideoAlignGenerates a complete RSET structure and then performs the final adjustments for framing, pixel phase alignment, contrast and brightness.
HD_VideoMeasureMakes a preliminary contrast and brightness adjustment and the top, bottom, left and right sides of the image are located.

Video Control

eHP_CommandSets up specified command of specified board.
bHP_CommandDoneReturns status of Command Done.
eHP_CommandDoneWaits up to wTimeout_mS milliseconds for Command Done, then returns.
bHP_CommandReadyReturns status of Command Ready.
eHP_CommandReadyWaits up to wTimeout_mS milliseconds for Command Ready then returns.
eHD_LiveVideoStarts the Live Video operations.
eHD_NumberFieldsSets the current field number.
eHP_SetBlackLevelSets the Black Level.
eHP_SetChannelSets the current video signal channel.
eHP_SetGainSets the Gain Range.
eHD_SetSyncSourceSets the sync source.
eHD_TrackSyncPosts a request to the driver to load the RSET values for the channel to the board and begin tracking syncs.

ActiveX Controls

  1. ImaBoardInfo ControlThis is an overview control that provides the application with information about how many and what kinds of boards are present in the system.


    BoardCountDetermines the number of boards in the system
    BoardHandleReturns a board type based on the zero-based board index.
    BoardTypeReturns a board type based on the board index
  2. CImaFG Control
    This is the primary interface for accessing the board. Through this interface, an application is able to access the hardware to initialize the board, perform video-tuning operations and access the video data.


    BitsPerPixelShows the potential resolution of the frame grabber in bits per pixel.
    BoardHandleAllows displaying or editing of the board handle.
    BoardLocationDisplays the location of the board as determined by the device driver.
    BoardTypeShows the board type.
    BrightnessChanges or retrieves the brightness of the incoming image.
    ContrastChanges or retrieves the contrast of the incoming image.
    FireSnapEventInforms the control whether or not to fire an event when completing a snap operation.
    FrameGrabDelayControls the number of milliseconds that should be delayed when doing sequential grabs.
    HardwareProfileThe complete path to the Common Hardware Profiles (CHP) database.
    PixelTypeTells the control whether to perform single channel monochrome or multi-channel RGB snaps.
    SequenceCountTells the object how many frames to snap when performing a SnapSequence operation.
    SerialNumberShows the board serial number.
    SnapModeDetermines that type of the snap whether it’s the even field, odd field, or both.
    SyncChannelChanges the sync source.
    VideoChannelChanges the video input channel.
    XScaleFactorControls the scaling of the image as input from the frame grabber.
    YScaleFactorControls the scaling of the image as input from the frame grabber.


    CloseCloses access to the board.
    GetDeviceInfoReturns a structure indicating the number of boards in the system and information about each board.
    GetImageDataRetrieves the full image.
    GetImageDIBReturns the currently allocated image handle.
    GetImagePictureReturns a Picture Description suitable for placing in a Visual Basic Picture object.
    GetLineRetrieves a full scanline of the image.
    InitRGBAllows the user to programmatically initialize the parameters for an RGB grab.
    IsVideoDetectedReturns a Boolean based on whether or not video is detected on the currently specified video channel/sync channel combination.
    OpenOpens the board for access.
    SaveImageToFileSaves the current image to a file.
    SetDisplayWindowPasses the handle of a CImaDisplay to the frame grabber control to enable continuous and automatic update of the display.
    SnapCauses a single frame or field to be snapped into the frame grabber memory.
    SnapRGBPerforms three consecutive snaps on three separate channels and combines the image into an RGB bitmap.
    SnapSequenceSnaps a sequence of images and transfers to a system buffer.
    StreamCaptureStreams video into the buffer.
    TriggeredSnapThe hardware is put into a state waiting for a hardware trigger to initiate a capture.


    SnapImageThe control fires a SnapImage event on the completion of an image grab.
    ExternalTriggerThe control fires an ExternalTrigger event when the trigger is received.
    SequenceCompleteThe control fires a SequenceComplete event if the application requests the snap of a sequence of images.

    CImaDisplay Control

    This is the interface that an application uses to create a pseudo live video window. This interface controls passing data from the frame grabber into a DirectDraw overlay surface where it is displayed.


    BackColorDetermines the default background color of the display window when no image data is being displayed.
    BorderStyleSets the style of the border of the video window.
    ColorKeySets the value of the color key when the display mode is using a DirectDraw overlay surface.
    DisplayModeSet the display mode.
    ScaleImageDisplayDetermines if the video in the window is scaled to the size of the window or only displays the portion of the video that fits in the window.


    DisableDisables display.
    EnableEnables display.
    GetDCObtains a display context for mixing graphics with the image data.
    RegisterVideoWindowTakes a window handle for displaying pseudo live video.
    ReleaseDCReleases a display context.
    SetImageHandleTakes the image handle from the frame grabber object and uses it to retrieve the image for display.
    UnregisterVideoWindowReleases the overlay surface and disables tracking.