Unibrain API-810 Manual de usuario

Busca en linea o descarga Manual de usuario para Cables Firewire Unibrain API-810. Fire-i X™ SDK documentation Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 97
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente

Indice de contenidos

Pagina 1 - Fire-i X™ SDK

1 Unibrain Fire-i X™ SDK documentation Programmer’s Manual

Pagina 2 - Table of Contents

10 End If The above code fragment will iterate through the connected cameras, and stop at the first camera that is made by Unibrain. With the additi

Pagina 3

11 If the user didn’t select a camera, the SelectCamera call will return False, in which case we exit the application. The FireiGUID object is const

Pagina 4 - Introduction

12 The available choice will of course vary depending on which camera this is called upon; only supported formats will be presented. Also, the above

Pagina 5 - Technical Details

13 Me.Caption = Camera.FriendlyName Me.Icon = Camera.Icon This will change the form caption to look like: By default, the Fire-iX SDK will

Pagina 6 - Helpers

14 Dim FeaturesEnum As EnumFireiXFeatures Set FeaturesEnum = Camera.GetFeaturesEnumerator(True, fgAll) Do While FeaturesEnum.Next(Feature) If Feature

Pagina 7

15 Firstly, we enlarge our form, to make way for the new controls: Then, we add the two controls. It is also a good idea to change their correspondi

Pagina 8

16 Do While FeaturesEnum.Next(Feature) = True FeaturesList.AddItem Feature.Name Loop Set FeaturesEnum = Nothing Set Feature = Nothing This takes car

Pagina 9

17 Now we can safely override the FrameReceived event: Private Sub Camera_FrameReceived(ByVal Frame As FireiXLibCtl.IFireiXFrame) End Sub As shown a

Pagina 10

18 NOTE: The aliasing of the drawn lines and text is due to the enlargement of the picture in order for it to fit in our selected preview control. Th

Pagina 11

19 h = StreamFormat.UserDefined.MaxHeight StreamFormat.UserDefined.SetROI 0, 0, w, h Camera.StreamFormat = StreamFormat Set StreamFormat = Nothing I

Pagina 12

2 Table of ContentsTABLE OF CONTENTS ... 2 INTRODUCTION ...

Pagina 13 - "Shutter")

20 Reference In the following reference of all interfaces implemented, “Long” is defined as a 32-bit signed integer value, and “Integer” is defined a

Pagina 14

21 Visual Basic 6.0 syntax FireiXPreviewCtrl1.AttachCamera Camera C++ syntax HRESULT hr = pIPreviewCtrl1->AttachCamera(pICamera); LeftClick event

Pagina 15

22 FireiGUID The FireiGUID object is a helper object, making the camera GUID easier to manipulate, store and retrieve. It can be constructed directly

Pagina 16

23 Comments The FromString method can be used to initialize a FireiGUID object with an 8-byte GUID represented as a string, with each byte being repr

Pagina 17

24 FireiXManager The FireiXManager object is the starting point for the selection and construction of cameras. It itself can be constructed either di

Pagina 18

25 The dialog presented looks similar to: The method returns True if a selection was made by the user and False if “Cancel” was pressed (no selectio

Pagina 19

26 Comments This method constructs a FireiXCamera object and returns it, given an Index number. This number must be less than GetNumOfConnectedCamera

Pagina 20 - Reference

27 It is also mated to the SelectCamera method, as the FireiGUID returned by that method can be passed directly in GetCameraFromGUID to create the se

Pagina 21 - RightClick event

28 FireiXRegister The FireiXRegister object is a helper object designed to make reading and writing values contained in a 4-byte register easy. It ca

Pagina 22 - FireiGUID

29 the field. So for instance, the examples below, which define a field of length of 3 bits can store a value from 0 to 7. If a value of 8 or greater

Pagina 23

3 HasManual property ... 61 MinValue property ... 61 MaxValue proper

Pagina 24 - FireiXManager

30 FireiXTrigger The FireiXTrigger object encapsulates all the Trigger functionality that the camera may support. An instance cannot be constructed d

Pagina 25 - GetCameraFromIndex method

31 C++ syntax VARIANT_BOOL bOn; HRESULT hr = pITrigger->get_Enabled(&bOn); //get hr = pITrigger ->put_Enabled(bOn); //set Polarit

Pagina 26 - GetCameraFromGUID method

32 Value property Prototype Boolean Value Comments This is a read only property that reflects the Trigger_Value field of the camera trigger control r

Pagina 27 - UseDirectShow method

33 IsSupported property Prototype Boolean IsSupported Comments This is a read only property that reflects the Presence_Inq field of the camera trigge

Pagina 28 - FireiXRegister

34 HasOnOff property Prototype Boolean HasOnOff Comments This is a read only property that reflects the On/Off_Inq field of the camera trigger inquir

Pagina 29 - SwapEndian method

35 Parameter property Prototype Integer Parameter Comments This property reads/sets the Parameter field of the camera trigger control register (bits

Pagina 30 - FireiXTrigger

36 Supported = Trigger.IsModeSupported(tmMode_0) C++ syntax VARIANT_BOOL bSupported; HRESULT hr = pITrigger->get_IsModeSupported(tmMode_0, &bS

Pagina 31 - Source property

37 FireiXStreamFormat The FireiXStreamFormat object encapsulates the video format settings relevant a given camera. A FireiXStreamFormat object insta

Pagina 32 - Mode property

38 pfYUV_422, pfYUV_444, pfRGB_24, pfY_MONO_16, pfRGB_48, pfS_Y_MONO_16, pfS_RGB_48, pfRAW_8, pfRAW_16 Visual Basic 6.0 syntax Dim PixelFormat As Fir

Pagina 33 - CanRead property

39 Resolution = StreamFormat.Resolution C++ syntax FireiXResolution Resolution; HRESULT hr = pIStreamFormat->get_Resolution(&Resolution); IsUs

Pagina 34 - CanReadRaw property

4 Introduction The Fire-iX SDK is the latest addition to ubCore™ and the Unibrain APIs. It provides an entirely new and comprehensive way to interact

Pagina 35 - IsModeSupported method

40 Comments This is a read only property that returns a textual representation of the FireiXStreamFormat. The text contains the pixel format and the

Pagina 36 - Save method

41 Comments This is a read only property that returns the associated FireiXFixedStreamFormat object with this FireiXStreamFormat. It is only valid if

Pagina 37 - FireiXStreamFormat

42 rmAuto, rmNone, rmRGGB, rmGRBG, rmGBRG, rmBGGR Visual Basic 6.0 syntax Dim RawMode As FireiXRawMode RawMode = StreamFormat.RawModeOverride

Pagina 38 - Resolution property

43 Save method Prototype Save() Comments This method sets this FireiXStreamFormat to the camera, including any selected attributes, whether Fixed or

Pagina 39 - Description property

44 FireiXFixedStreamFormat The FireiXFixedStreamFormat object is derived from FireiXStreamFormat. It carries any additional functionality that pertai

Pagina 40 - Fixed property

45 Comments This is a read/write property that can be used to retrieve or set the frame rate of the FireiXFixedStreamFormat. It is represented by an

Pagina 41 - RawModeOverride property

46 Comments This is a read only property that returns the resolution height of the streaming format. This will be constant between successive reads,

Pagina 42 - Height property

47 Description property Prototype String Description Comments This is a read only property that returns a textual representation of the FireiXFixedSt

Pagina 43

48 Save method Prototype Save() Comments This method sets this FireiXFixedStreamFormat to the camera, including the selected frame rate. If for some

Pagina 44 - FireiXFixedStreamFormat

49 FireiXUserDefinedStreamFormat The FireiXUserDefinedStreamFormat object is derived from FireiXStreamFormat. It carries any additional functionality

Pagina 45

5 Technical Details Architecture The following illustration shows how the various Unibrain APIs interact with each other, and how they are abstracted

Pagina 46 - PacketsPerFrame property

50 Comments This is a read only property that can be used to read the currently set top coordinate of the Region of Interest set in the FireiXUserDef

Pagina 47 - IsFrameRateSupported method

51 Height property Prototype Integer Height Comments This is a read only property that can be used to read the currently set height of the Region of

Pagina 48

52 HRESULT hr = pIUserDefined->get_MaxHeight(&shMaxHeight); HorizontalPositionUnit property Prototype Integer HorizontalPositionUnit Comments

Pagina 49 - Top property

53 C++ syntax SHORT shWUnit; HRESULT hr = pIUserDefined->get_WidthUnit(&shWUnit); HeightUnit property Prototype Integer HeightUnit Comments Th

Pagina 50 - Bottom property

54 PacketSizeUnit = UserDefined.PacketSizeUnit C++ syntax LONG lPacketSizeUnit; HRESULT hr = pIUserDefined->get_PacketSizeUnit(&lPacketSizeUni

Pagina 51 - MaxHeight property

55 C++ syntax BSTR Description; HRESULT hr = pIUserDefined->get_Description(&Description); SetROI method Prototype Boolean SetROI( IN Integer

Pagina 52 - WidthUnit property

56 This is useful in those cases where the camera reported acceptable values are not 100% correct. For instance, even though theoretically a camera s

Pagina 53 - PacketSizeUnit property

57 EnumFireiXStreamFormats The EnumFireiXStreamFormats enumerator can be used to iterate between a set of FireiXStreamFormat objects. It cannot be co

Pagina 54

58 FireiXFeature The FireiXFeature object encapsulates all functionality related to a camera feature. It contains all the information available throu

Pagina 55 - IsValid method

59 If this property is False, no other property or method of FireiXFeature should be called, otherwise an error would occur. Visual Basic 6.0 syntax

Pagina 56

6 Installation No specific installation of Fire-iX SDK is necessary. It is included with both ubCore Setup and Firei MS Stack Setup. The FireiX.dll m

Pagina 57 - EnumFireiXStreamFormats

60 CanRead property Prototype Boolean CanRead Comments This is a read-only property that will return whether this FireiXFeature supports reading its

Pagina 58 - FireiXFeature

61 Visual Basic 6.0 syntax Dim HasAuto As Boolean HasAuto = Feature.HasAuto C++ syntax VARIANT_BOOL bHasAuto; HRESULT hr = pIFeature->get_HasAuto(

Pagina 59 - HasOnePush property

62 Comments This is a read-only property that will return the maximum value that can be set to this FireiXFeature, through the Value property. Visual

Pagina 60 - HasAuto property

63 C++ syntax VARIANT_BOOL bEnabled; HRESULT hr = pIFeature->get_Enabled(&bEnabled); //get hr = pIFeature->put_Enabled(VARIANT_TRUE);

Pagina 61 - MaxValue property

64 HasSoftAbsolute property Prototype Boolean HasSoftAbsolute Comments This is a read-only property that will return whether this FireiXFeature suppo

Pagina 62 - Enabled property

65 Comments This is a read/write property that will retrieve or set the value of the feature through a textual representation of it. The string will

Pagina 63 - AutoMode property

66 MaxValueString = Feature.MaxValueString C++ syntax BSTR MaxValueString; HRESULT hr = pIFeature->get_MaxValueString(&MaxValueString); Unit p

Pagina 64 - ValueString property

67 Visual Basic 6.0 syntax Dim Value As Single Value = Feature.AbsoluteValue 'get Feature.Value = Feature.AboluteValue 'set C+

Pagina 65 - MaxValueString property

68 Reload method Prototype Reload() Comments This method can be used to read the current value and absolute value (if applicable, along with the mini

Pagina 66 - AbsoluteValue property

69 EnumFireiXFeatures The EnumFireiXFeatures enumerator can be used to iterate between a set of FireiXFeature objects. It cannot be constructed direc

Pagina 67 - MaxAbsoluteValue property

7 Usage Scenario I – Simple video viewer Let’s start Visual Basic 6.0. Create a new empty project, of the “Standard EXE” variety: This should produc

Pagina 68 - OnePush method

70 FireiXFrame The FireiXFrame object contains a single camera frame, allowing the programmer to read and write the image data pixel by pixel. It als

Pagina 69 - EnumFireiXFeatures

71 GetRGB method Prototype GetRGB( IN Integer X, IN Integer Y, OUT Byte Red, OUT Byte Green, OUT Byte Blue ) Comments This method returns the color v

Pagina 70 - FireiXFrame

72 SaveToFile method Prototype Long SaveToFile(IN String Filename) Comments This method will save the contents of the FireiXFrame to disk, as a regul

Pagina 71 - SetRGB method

73 Negative method Prototype Negative() Comments This method will invert the color information of the frame. The result will be similar to a photogra

Pagina 72 - FlipVertically method

74 Visual Basic 6.0 syntax Frame.DrawLine 0, 0, 50, 50, 0 C++ syntax HRESULT hr = pIFrame->DrawLine(0, 0, 50, 50, 0); DrawString method Prototype

Pagina 73 - DrawLine method

75 The coordinates defined by the 4 parameters given must reside in the frame boundaries, otherwise an error will occur. Visual Basic 6.0 syntax Fram

Pagina 74 - DrawRectangle method

76 The coordinates given as the 2 parameters must reside in the frame boundaries, otherwise an error will occur. Visual Basic 6.0 syntax Frame.DrawSt

Pagina 75 - DrawStringRGB method

77 FireiXCamera The FireiXCamera object encapsulates all functionality pertaining to the camera itself; therefore it could be considered to be the “c

Pagina 76 - DrawRectangleRGB method

78 Model property Prototype String Model Comments This is a read-only property that can be used to retrieve the model name of the camera, as a string

Pagina 77 - FireiXCamera

79 HRESULT hr = pICamera->get_FriendlyName(&FriendlyName); StreamFormat property Prototype FireiXStreamFormat StreamFormat Comments This is a

Pagina 78 - Serial property

8 This will bring up the components selection dialog of VB. In the “Controls” tab, select the “FireiX 1.0 Type Library” and click on OK: This will ad

Pagina 79 - AutoExposure property

80 Comments This is a read-only property that can be used to retrieve directly the FireiXFeature object for the AutoExposure feature of the camera. V

Pagina 80 - Iris property

81 Comments This is a read-only property that can be used to retrieve directly the FireiXFeature object for the Iris feature of the camera. Visual Ba

Pagina 81 - Hue property

82 Comments This is a read-only property that can be used to retrieve directly the FireiXFeature object for the Hue feature of the camera. Visual Bas

Pagina 82 - Zoom property

83 Comments This is a read-only property that can be used to retrieve directly the FireiXFeature object for the Zoom feature of the camera. Visual Ba

Pagina 83 - Gamma property

84 Comments This is a read-only property that can be used to retrieve directly the FireiXFeature object for the Gamma feature of the camera. Visual B

Pagina 84 - RawConversion property

85 The three implemented algorithms are ordered “Best Performance → Best Quality”. rcBilinearInterpolation is the default setting. Please note that

Pagina 85 - CommandRegister property

86 Comments This is a read/write property that can be used to retrieve or set any command register of the camera, given its offset as a parameter. As

Pagina 86 - NumOfMemoryPresets property

87 Comments This is a read-only property that can be used to retrieve the number of available memory presets of the camera. If this number is 0, the

Pagina 87 - SelectStreamFormat method

88 If on the other hand the DirectShow API is currently running, the dialog will look similar to: Upon the return of the method, the streaming format

Pagina 88 - AttachPreviewCtrl method

89 Visual Basic 6.0 syntax Camera.AttachPreviewCtrl FireiXPreviewCtrl1 C++ syntax HRESULT hr = pICamera->AttachPreviewCtrl(pIFireiXPreviewCtrl); R

Pagina 89 - Stop method

9 VB automatically sets the name of the object to be “FireiXPreviewCtrl1”, which for our purpose will do nicely. Now it’s time to edit the form code.

Pagina 90 - DisplayProperties method

90 IsRunning method Prototype Boolean IsRunning() Comments This method will return whether the camera is currently running. Please note that IsRunnin

Pagina 91 - IsFeatureSupported method

91 Comments This method when called will bring up a “Display Properties” dialog for the camera. This dialog can then be used to set the various featu

Pagina 92 - GetFeaturesEnumerator method

92 Visual Basic 6.0 syntax Dim Supported As Boolean Supported = Camera.IsFeatureSupported("Shutter") C++ syntax VARIANT_BOOL bSupported; HR

Pagina 93 - SaveToMemory method

93 GetCurrentResolution method Prototype GetCurrentResolution(OUT Integer Width, OUT Integer Height) Comments This method will return (by reference)

Pagina 94 - SaveToXML method

94 Comments This method will save all current features to a memory preset channel on the camera. Since channel 0 is reserved for the camera default v

Pagina 95 - RetrieveStreamFormat method

95 Visual Basic 6.0 syntax Camera.SaveToXML "c:\settings.xml" C++ syntax HRESULT hr = pICamera->SaveToXML(_T("c:\settings.xml"

Pagina 96 - DeviceRemoved event

96 RetrieveStreamFormatFromIdentifier method Prototype FireiXStreamFormat RetrieveStreamFormatFromIdentifier( IN Long Identifier ) Comments This me

Pagina 97

97 Comments This event is only ever fired once during the lifecycle of the FireiXCamera object, if the camera is physically removed from the system.

Comentarios a estos manuales

Sin comentarios