Unibrain API-810 Uživatelský manuál

Procházejte online nebo si stáhněte Uživatelský manuál pro Firewire kabely Unibrain API-810. Fire-i X™ SDK documentation Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 97
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků

Shrnutí obsahu

Strany 1 - Fire-i X™ SDK

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 6 - Helpers

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

Strany 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

Strany 8

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

Strany 9

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

Strany 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

Strany 11

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

Strany 12

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

Strany 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

Strany 14

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

Strany 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

Strany 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

Strany 17

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

Strany 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

Strany 19

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

Strany 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

Strany 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

Strany 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

Strany 23

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

Strany 24 - FireiXManager

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

Strany 25 - GetCameraFromIndex method

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

Strany 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

Strany 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

Strany 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

Strany 29 - SwapEndian method

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

Strany 30 - FireiXTrigger

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

Strany 31 - Source property

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

Strany 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

Strany 33 - CanRead property

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

Strany 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

Strany 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

Strany 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

Strany 37 - FireiXStreamFormat

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

Strany 38 - Resolution property

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

Strany 39 - Description property

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

Strany 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

Strany 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,

Strany 42 - Height property

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

Strany 43

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

Strany 44 - FireiXFixedStreamFormat

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

Strany 45

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

Strany 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

Strany 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

Strany 48

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

Strany 49 - Top property

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

Strany 50 - Bottom property

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

Strany 51 - MaxHeight property

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

Strany 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

Strany 53 - PacketSizeUnit property

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

Strany 54

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

Strany 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

Strany 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

Strany 57 - EnumFireiXStreamFormats

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

Strany 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(

Strany 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

Strany 60 - HasAuto property

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

Strany 61 - MaxValue property

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

Strany 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

Strany 63 - AutoMode property

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

Strany 64 - ValueString property

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

Strany 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

Strany 66 - AbsoluteValue property

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 77 - FireiXCamera

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 84 - RawConversion property

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

Strany 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

Strany 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

Strany 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

Strany 88 - AttachPreviewCtrl method

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

Strany 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.

Strany 90 - DisplayProperties method

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

Strany 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

Strany 92 - GetFeaturesEnumerator method

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

Strany 93 - SaveToMemory method

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

Strany 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

Strany 95 - RetrieveStreamFormat method

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

Strany 96 - DeviceRemoved event

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

Strany 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.

Komentáře k této Příručce

Žádné komentáře