Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

vs2010 working, ir and mjpeg settings added

  • Loading branch information...
commit 002ae3905f2b8437fd992f9ea277c5300b76c60d 1 parent e806214
@elliotwoods authored
Showing with 320 additions and 407 deletions.
  1. +0 −186 NPCameraSDKDotNet.vcproj
  2. +114 −25 NPCameraSDKDotNet.vcxproj
  3. +206 −196 Wrapper.cpp
View
186 NPCameraSDKDotNet.vcproj
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="NPCameraSDKDotNet"
- ProjectGUID="{D04530D4-58C9-476E-8249-30CCEB669D63}"
- RootNamespace="SimpleCameraTest"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="1"
- ManagedExtensions="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;CAMERALIBRARY_IMPORTS"
- MinimalRebuild="false"
- BasicRuntimeChecks="0"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="cameralibrary.lib ws2_32.lib setupapi.lib"
- LinkIncremental="2"
- AdditionalLibraryDirectories="..\..\lib"
- GenerateDebugInformation="true"
- AssemblyDebug="1"
- SubSystem="1"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="1"
- ManagedExtensions="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\cameracommon;..\..;..\..\..\common\inc;..\..\..\..\drivers\USBIO\V2.41\source\usbiolib;..\..\..\..\drivers\USBIO\V2.41\source\inc"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="true"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib glu32.lib glaux.lib ws2_32.lib setupapi.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="0"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath=".\Wrapper.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
View
139 NPCameraSDKDotNet.vcxproj
@@ -1,10 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Itanium">
+ <Configuration>Debug</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Itanium">
+ <Configuration>Release</Configuration>
+ <Platform>Itanium</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -16,72 +24,148 @@
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <CLRSupport>true</CLRSupport>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <CLRSupport>true</CLRSupport>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
- <PlatformToolset>v110</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
- <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir>$(Configuration)\</IntDir>
- <LinkIncremental>true</LinkIncremental>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
- <IntDir>$(Configuration)\</IntDir>
- <LinkIncremental>false</LinkIncremental>
- <TargetExt>.dll</TargetExt>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">$(SolutionDir)$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">$(SolutionDir)$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.dll</TargetExt>
</PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;CAMERALIBRARY_IMPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>cameralibrary.lib;ws2_32.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalLibraryDirectories>..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AssemblyDebug>true</AssemblyDebug>
+ <SubSystem>Console</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>C:\Program Files %28x86%29\OptiTrack\Camera SDK\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(NP_CAMERASDK)\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;CAMERALIBRARY_IMPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader />
+ <PrecompiledHeader>
+ </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>cameralibrary.lib;ws2_32.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>C:\Program Files %28x86%29\OptiTrack\Camera SDK\lib;..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories>$(NP_CAMERASDK)\lib;..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AssemblyDebug>true</AssemblyDebug>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention />
- <TargetMachine>MachineX86</TargetMachine>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\..\cameracommon;..\..;..\..\..\common\inc;..\..\..\..\drivers\USBIO\V2.41\source\usbiolib;..\..\..\..\drivers\USBIO\V2.41\source\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>opengl32.lib;glu32.lib;glaux.lib;ws2_32.lib;setupapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <AdditionalIncludeDirectories>C:\Program Files %28x86%29\OptiTrack\Camera SDK\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(NP_CAMERASDK)\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader />
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
@@ -92,14 +176,19 @@
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention />
- <TargetMachine>MachineX86</TargetMachine>
- <AdditionalLibraryDirectories>C:\Program Files %28x86%29\OptiTrack\Camera SDK\lib;..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <AdditionalLibraryDirectories>$(NP_CAMERASDK)\lib;..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Wrapper.cpp" />
</ItemGroup>
+ <ItemGroup>
+ <None Include="cameralibrary.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
View
402 Wrapper.cpp
@@ -13,30 +13,30 @@ using namespace System::Runtime::InteropServices;
namespace NPCameraSDKDotNet{
public enum class VideoMode
- {
- SegmentMode = 0,
- GrayscaleMode = 1,
- ObjectMode = 2,
- InterleavedGrayscaleMode = 3,
- PrecisionMode = 4,
- BitPackedPrecisionMode = 5,
- MJPEGMode = 6,
- VideoModeCount ,
- UnknownMode
- };
+ {
+ SegmentMode = 0,
+ GrayscaleMode = 1,
+ ObjectMode = 2,
+ InterleavedGrayscaleMode = 3,
+ PrecisionMode = 4,
+ BitPackedPrecisionMode = 5,
+ MJPEGMode = 6,
+ VideoModeCount ,
+ UnknownMode
+ };
public enum class StatusLEDs
- {
- GreenStatusLED = 0x20,
- RedStatusLED = 0x10,
- CaseStatusLED = 0x40,
- IlluminationLED = 0x80,
-
- LeftRedStatusLED = 16,
- LeftGreenStatusLED = 32,
- RightRedStatusLED = 1,
- RightGreenStatusLED = 2,
- };
+ {
+ GreenStatusLED = 0x20,
+ RedStatusLED = 0x10,
+ CaseStatusLED = 0x40,
+ IlluminationLED = 0x80,
+
+ LeftRedStatusLED = 16,
+ LeftGreenStatusLED = 32,
+ RightRedStatusLED = 1,
+ RightGreenStatusLED = 2,
+ };
public ref class MObject{
@@ -64,27 +64,23 @@ namespace NPCameraSDKDotNet{
float X(){return cobject->X();}
float Y(){return cobject->Y();}
- ////== Creation & processing functions ==--
- //
- //void Clear();
- //void AddSegment ( Segment* segment );
- //void AddSegmentList( cObject * objectSource );
+ ////== Creation & processing functions ==--
+ //
+ //void Clear();
+ //void AddSegment ( Segment* segment );
+ //void AddSegmentList( cObject * objectSource );
- //void PurgeReferences();
+ //void PurgeReferences();
- ////== Generate object information from attached segments ==--
- //void ProcessLineSegments ();
- //void ProcessWeightedLineSegments();
- //void ProcessSubPixelLineSegments();
- //void CalculateDimensions ();
+ ////== Generate object information from attached segments ==--
+ //void ProcessLineSegments ();
+ //void ProcessWeightedLineSegments();
+ //void ProcessSubPixelLineSegments();
+ //void CalculateDimensions ();
- //Segment * SegmentHead();
- //Segment * SegmentTail();
+ //Segment * SegmentHead();
+ //Segment * SegmentTail();
- MObject ^ Clone(){
- cObject * object = new cObject(*this->cobject);
- return gcnew MObject(object);
- }
protected:
private:
cObject * cobject;
@@ -102,8 +98,8 @@ namespace NPCameraSDKDotNet{
int ObjectCount(){return frame->ObjectCount();}
int FrameID(){return frame->FrameID();}
- //eVideoMode FrameType(); //== Frame Type =============================----
- //int MJPEGQuality(); //== For MJPEG Frames, MJPEG Quality (1-100) ----
+ //eVideoMode FrameType(); //== Frame Type =============================----
+ //int MJPEGQuality(); //== For MJPEG Frames, MJPEG Quality (1-100) ----
MObject ^ Object(int index){
cObject * obj = frame->Object(index);
@@ -113,8 +109,8 @@ namespace NPCameraSDKDotNet{
return gcnew MObject(obj);
}
}
- //ObjectLink * GetLink(int index);
- //Camera * GetCamera(); //== Reference to originating camera ========----
+ //ObjectLink * GetLink(int index);
+ //Camera * GetCamera(); //== Reference to originating camera ========----
bool IsInvalid(){return frame->IsInvalid();}
bool IsEmpty(){return frame->IsEmpty();}
@@ -127,27 +123,31 @@ namespace NPCameraSDKDotNet{
int RefCount(){return frame->RefCount();}
void AddRef(){frame->AddRef();}
- ////== Rasterization Functionality ==========--
+ ////== Rasterization Functionality ==========--
- //void Rasterize(unsigned int Width, unsigned int Height, unsigned int Span,
- // unsigned int BitsPerPixel, void *Buffer);
+ //void Rasterize(unsigned int Width, unsigned int Height, unsigned int Span,
+ // unsigned int BitsPerPixel, void *Buffer);
- //void Rasterize(Bitmap *BitmapRef);
+ //void Rasterize(Bitmap *BitmapRef);
- ////== Frame Decompression Functionality (Advanced Feature) ======---
+ ////== Frame Decompression Functionality (Advanced Feature) ======---
- //void PopulateFrom(CompressedFrame *Frame);
+ //void PopulateFrom(CompressedFrame *Frame);
- ////== Uncommonly Needed Methods =================================---
+ ////== Uncommonly Needed Methods =================================---
- //unsigned char* GetGrayscaleData();
- //int GetGrayscaleDataSize();
- void CopyGrayScaleDataTo(IntPtr buffer) {
+ //unsigned char* GetGrayscaleData();
+ //int GetGrayscaleDataSize();
+ void Rasterize(IntPtr buffer) {
const int width = frame->GetCamera()->Width();
const int height = frame->GetCamera()->Height();
frame->Rasterize(width, height, width, 8, buffer.ToPointer());
}
+ void GetGrayscaleData(IntPtr buffer) {
+ memcpy(buffer.ToPointer(), frame->GetGrayscaleData(), frame->GetGrayscaleDataSize());
+ }
+
protected:
private:
Frame * frame;
@@ -182,7 +182,7 @@ namespace NPCameraSDKDotNet{
this->FrameAvailableCallback();
}
- void FrameOverflow(){
+ void FrameOverflow(){
if (this->FrameOverflowCallback != 0)
this->FrameOverflowCallback();
}
@@ -199,106 +199,111 @@ namespace NPCameraSDKDotNet{
};
public ref class MCamera{
- //Camera();
- //~Camera();
+ //Camera();
+ //~Camera();
- //virtual void PacketTest(int PacketCount) {};
+ //virtual void PacketTest(int PacketCount) {};
- ////== Intended Public Command Interface ==============================================----
+ ////== Intended Public Command Interface ==============================================----
void SetGrayscaleDecimation(int Value){camera->SetGrayscaleDecimation(Value);}
- //void SetLateMJPEGDecompression(bool Enable);
- //bool LateMJPEGDecompression();
+ //void SetLateMJPEGDecompression(bool Enable);
+ //bool LateMJPEGDecompression();
- //int Serial();
- //int Model();
- //int Revision();
- //int HardwareInterface();
- //void ResetFrameCount();
+ //int Serial();
+ //int Model();
+ //int Revision();
+ //int HardwareInterface();
+ //void ResetFrameCount();
- //virtual bool CameraIDValid();
+ //virtual bool CameraIDValid();
- //virtual void SetIRFilter(bool Enabled); //== Enable/Disable IR Bandpass Filter ===----
- //virtual bool IRFilter();
- //virtual bool IsFilterSwitchAvailable() { return false; }
+ //virtual void SetIRFilter(bool Enabled); //== Enable/Disable IR Bandpass Filter ===----
+ //virtual bool IRFilter();
+ //virtual bool IsFilterSwitchAvailable() { return false; }
- //virtual void SetHighPowerMode(bool Enable) {};
- //virtual bool HighPowerMode() { return false; }
- //virtual bool IsHighPowerModeAvailable() { return false; }
- //virtual bool IsHighPowerModeSupported() { return false; }
- //int LowPowerSetting();
+ //virtual void SetHighPowerMode(bool Enable) {};
+ //virtual bool HighPowerMode() { return false; }
+ //virtual bool IsHighPowerModeAvailable() { return false; }
+ //virtual bool IsHighPowerModeSupported() { return false; }
+ //int LowPowerSetting();
- //void SetMJPEGQuality(int Value); //== Set MJPEG Quality Level (0-100) =====----
- //virtual int MJPEGQuality();
- //virtual bool IsMJPEGAvailable() { return false; }
+ //void SetMJPEGQuality(int Value); //== Set MJPEG Quality Level (0-100) =====----
+ //virtual int MJPEGQuality();
+ //virtual bool IsMJPEGAvailable() { return false; }
- //int SwitchState(); //== SmartNav4's switch state ============----
+ //int SwitchState(); //== SmartNav4's switch state ============----
- //HealthMonitor * Health(); //== Camera Health Information ===========----
+ //HealthMonitor * Health(); //== Camera Health Information ===========----
- //virtual void GetDistortionModel(Core::DistortionModel &Model) {}; //== Distortion Model -
+ //virtual void GetDistortionModel(Core::DistortionModel &Model) {}; //== Distortion Model -
- ////== Status LEDs ====================================================================----
- //
-
+ ////== Status LEDs ====================================================================----
+ //
+
- ////== Camera Physical Constants ======================================================----
+ ////== Camera Physical Constants ======================================================----
- //virtual double FocalLength() { return 0.0; }
+ //virtual double FocalLength() { return 0.0; }
- ////== Additional =====================================================================----
+ ////== Additional =====================================================================----
- //void SetTextOverlay (bool Enable);
- //void SetMarkerOverlay(bool Enable);
+ //void SetTextOverlay (bool Enable);
+ //void SetMarkerOverlay(bool Enable);
- //bool TextOverlay();
- //bool MarkerOverlay();
- //
- //void SetName(const char *Name);
+ //bool TextOverlay();
+ //bool MarkerOverlay();
+ //
+ //void SetName(const char *Name);
- //
- //InputManager::ConnectionTypes ConnectionType(); //== Returns type of input USB, etc. ---
+ //
+ //InputManager::ConnectionTypes ConnectionType(); //== Returns type of input USB, etc. ---
- ////== Less Commonly Used Public Methods ==============================================----
+ ////== Less Commonly Used Public Methods ==============================================----
- //virtual void AttachInput(cInputBase * Input); //== Manually attach a camera input =---
+ //virtual void AttachInput(cInputBase * Input); //== Manually attach a camera input =---
- //bool IsCommandQueueEmpty(); //== Know if camera is busy with ====---
- // //== communicating with the device ==---
+ //bool IsCommandQueueEmpty(); //== Know if camera is busy with ====---
+ // //== communicating with the device ==---
- //void ReleaseFrame(Frame* frame); //== Alternative release frame call =---
+ //void ReleaseFrame(Frame* frame); //== Alternative release frame call =---
- //const char* DevicePath(); //== Returns Device Path for USB ====---
+ //const char* DevicePath(); //== Returns Device Path for USB ====---
- //virtual void SendCommand(cCameraCommand * Command); //== Push a camera command =======---
- //void AttachModule (cCameraModule * Module); //== Attach additional functionality ---
- //void RemoveModule (cCameraModule * Module); //== Remove additional functionality ---
- //void AttachListener(cCameraListener * Listener); //== Attach for camera events =======---
- //void RemoveListener(cCameraListener * Listener); //== Remove camera listener =========---
- //void Shutdown(); //== Permanently shutdown camera ====---
+ //virtual void SendCommand(cCameraCommand * Command); //== Push a camera command =======---
+ //void AttachModule (cCameraModule * Module); //== Attach additional functionality ---
+ //void RemoveModule (cCameraModule * Module); //== Remove additional functionality ---
+ //void AttachListener(cCameraListener * Listener); //== Attach for camera events =======---
+ //void RemoveListener(cCameraListener * Listener); //== Remove camera listener =========---
+ //void Shutdown(); //== Permanently shutdown camera ====---
- //virtual bool IsHardwareKey () { return false; } //== For separation of cameras & keys --
- //virtual bool IsHub () { return false; } //== For separation of cameras & Hubs --
- //virtual bool IsUSB () { return true; } //== Camera helpers =================---
- //virtual bool IsEthernet() { return false; } //== Camera helpers =================---
- //virtual bool IsTBar () { return false; } //== Camera helpers =================---
+ //virtual bool IsHardwareKey () { return false; } //== For separation of cameras & keys --
+ //virtual bool IsHub () { return false; } //== For separation of cameras & Hubs --
+ //virtual bool IsUSB () { return true; } //== Camera helpers =================---
+ //virtual bool IsEthernet() { return false; } //== Camera helpers =================---
+ //virtual bool IsTBar () { return false; } //== Camera helpers =================---
public:
MCamera(Camera * camera){
this->camera = camera;
- this->cameraListener = new CameraListener();
+
+ ////
+ //setup callback listener
+/* this->cameraListener = new CameraListener();
this->camera->AttachListener(this->cameraListener);
TakesABangDelegate^ fp = gcnew TakesABangDelegate(this, & MCamera::NewFrame);
this->callbackHandle = GCHandle::Alloc(fp);
IntPtr ip = Marshal::GetFunctionPointerForDelegate(fp);
BANG_MESSAGE cb = static_cast<BANG_MESSAGE>(ip.ToPointer());
- this->cameraListener->SetFrameAvailableCallback(cb);
+ this->cameraListener->SetFrameAvailableCallback(cb); */
+ //
+ ////
}
~MCamera(){
@@ -333,20 +338,20 @@ namespace NPCameraSDKDotNet{
}
}
- //const char* Name(); //== Returns name of camera ===========----
- //
+ //const char* Name(); //== Returns name of camera ===========----
+ //
void SetLED(StatusLEDs LED, bool Enable){
eStatusLEDs leds = static_cast<eStatusLEDs>(LED);
camera->SetLED(leds, Enable);
}
- //void SetAllLED(eStatusLEDs LED); //== Turn Camera LEDs On/Off ========----
- //void SetStatusIntensity(int Intensity); //== All Status LED to (0-->255) ====----
+ //void SetAllLED(eStatusLEDs LED); //== Turn Camera LEDs On/Off ========----
+ //void SetStatusIntensity(int Intensity); //== All Status LED to (0-->255) ====----
void Start(){camera->Start();}
void Stop(bool TurnNumericOff){camera->Stop(TurnNumericOff);}
- //
+ //
bool IsValid(){return camera != 0;}
bool IsCameraRunning(){return camera->IsCameraRunning();}
@@ -359,11 +364,11 @@ namespace NPCameraSDKDotNet{
void SetShutterDelay(int Value){camera->SetShutterDelay(Value);}
void SetFrameRate(int Value){camera->SetFrameRate(Value);}
- //void SetFrameDecimation(int Value); //== Set Camera Frame Decimation ==----
+ //void SetFrameDecimation(int Value); //== Set Camera Frame Decimation ==----
int FrameRate(){return camera->FrameRate();}
- //int FrameDecimation(); //== Get Camera Frame Decimation ==----
- //int GrayscaleDecimation(); //== Get Camera Grayscale Decimation --
+ //int FrameDecimation(); //== Get Camera Frame Decimation ==----
+ //int GrayscaleDecimation(); //== Get Camera Grayscale Decimation --
int PrecisionCap(){return camera->PrecisionCap();}
int ShutterDelay(){return camera->ShutterDelay();}
@@ -383,7 +388,9 @@ namespace NPCameraSDKDotNet{
return mode;
}
-
+ void SetMJPEGQuality(int Value){camera->SetMJPEGQuality(Value);}
+ virtual int MJPEGQuality(){return camera->MJPEGQuality();}
+
float DataRate(){return camera->DataRate();}
float PacketSize(){return camera->PacketSize();}
@@ -396,31 +403,34 @@ namespace NPCameraSDKDotNet{
void SetAGC(bool Enable){camera->SetAGC(Enable);}
bool AGC(){return camera->AGC();}
- bool IsAGCAvailable() { return camera->IsAGCAvailable();}
+ bool IsAGCAvailable() { return camera->IsAGCAvailable();}
void SetAEC(bool Enable){camera->SetAEC(Enable);}
bool AEC(){return camera->AEC();}
- bool IsAECAvailable(){return camera->IsAECAvailable();}
+ bool IsAECAvailable(){return camera->IsAECAvailable();}
- int HardwareFrameRate() { return camera->HardwareFrameRate(); }
+ int HardwareFrameRate() { return camera->HardwareFrameRate(); }
bool IsInitilized (){return camera->IsInitilized();}
bool IsDisconnected(){return camera->IsDisconnected();}
- //eCameraState State ();
+ //eCameraState State ();
int UID(){return camera->UID();}
int Model(){return camera->Model();}
int Serial(){return camera->Serial();}
+ virtual void SetIRFilter(bool Enabled){camera->SetIRFilter(Enabled);}
+ virtual bool IRFilter(){return camera->IRFilter();}
+ virtual bool IsFilterSwitchAvailable(){ return camera->IsFilterSwitchAvailable();}
void SetEnableBlockingMask(bool Enabled){camera->SetEnableBlockingMask(Enabled);}
bool IsBlockingMaskEnabled(){return camera->IsBlockingMaskEnabled();}
void AddBlockingRectangle (int X1, int Y1, int X2, int Y2){camera->AddBlockingRectangle(X1,Y1,X2,Y2);}
- //void RemoveBlockingRectangle(int X1, int Y1, int X2, int Y2);
+ //void RemoveBlockingRectangle(int X1, int Y1, int X2, int Y2);
void SetBitMaskPixel(int X, int Y, bool Mask){camera->SetBitMaskPixel(X,Y,Mask);}
void ClearBlockingMask () {camera->ClearBlockingMask();}
- //void GetBlockingMask (unsigned char *Buffer, int BufferSize);
- //void SetBlockingMask (const unsigned char *Buffer, int BufferSize);
+ //void GetBlockingMask (unsigned char *Buffer, int BufferSize);
+ //void SetBlockingMask (const unsigned char *Buffer, int BufferSize);
void UpdateBlockingMask (){camera->UpdateBlockingMask();}
int BlockingMaskWidth (){return camera->BlockingMaskWidth();}
int BlockingMaskHeight (){return camera->BlockingMaskHeight();}
@@ -430,7 +440,7 @@ namespace NPCameraSDKDotNet{
int PhysicalPixelWidth(){return camera->PhysicalPixelWidth();}
int PhysicalPixelHeight(){return camera->PhysicalPixelHeight();}
double ImagerWidth(){ return camera->ImagerWidth(); }
- double ImagerHeight(){ return camera->ImagerHeight(); }
+ double ImagerHeight(){ return camera->ImagerHeight(); }
int Width(){return camera->Width();}
int Height(){return camera->Height();}
@@ -527,72 +537,72 @@ namespace NPCameraSDKDotNet{
};
public enum class CameraState
- {
- Uninitialized = 0,
- InitializingDevice,
- InitializingCamera,
- Initializing,
- Initialized,
- Disconnected,
- Shutdown
- };
-
- public enum class SyncMode
- {
- SyncModeDefault = 0,
- SyncModeCustom,
- SyncModeShutterGoggles
- };
-
- public enum class SyncType
- {
- SyncTypeOptiSync = 0,
- SyncTypeWiredSync
- };
-
- public enum class SyncCameraSync
- {
- SyncAutoUSBSync = 0,
- SyncForceUSBSync
- };
-
- public enum class SyncInputSource
- {
- SyncInputSourceWired = 0,
- SyncInputSourceInternal = 0,
- SyncInputSourceSMPTEInput,
- SyncInputSourceSyncExternal=2,
- SyncInputSourceSyncExternalEitherEdge=2,
- SyncInputSourceSyncExternalRisingEdge,
- SyncInputSourceSyncExternalFallingEdge,
- SyncInputSourceSyncExternalHighGated,
- SyncInputSourceSyncExternalLowGated,
- SyncInputSourceUSB
- };
-
- public enum class SyncOutputPhase
- {
- SyncOutputInPhase = 0,
- SyncOutputDelayedByGlobalOffset
- };
- public enum class SyncOutputPulseDuration
- {
- SyncOutputPulseDurationExposureTime = 0,
- SyncOutputPulseDurationPassThrough,
- SyncOutputPulseDurationRecordingLevel,
- SyncOutputPulseDurationRecordingPulse
- };
-
- public enum class SyncOutputPolarity
- {
- SyncOutputPolarityNormal = 0,
- SyncOutputPolarityInverted
- };
- public enum class USBSyncInControl
- {
- USBSyncInControlGateClosedDisabled=0,
- USBSyncInControlGateOpenEnabled
- };
+ {
+ Uninitialized = 0,
+ InitializingDevice,
+ InitializingCamera,
+ Initializing,
+ Initialized,
+ Disconnected,
+ Shutdown
+ };
+
+ public enum class SyncMode
+ {
+ SyncModeDefault = 0,
+ SyncModeCustom,
+ SyncModeShutterGoggles
+ };
+
+ public enum class SyncType
+ {
+ SyncTypeOptiSync = 0,
+ SyncTypeWiredSync
+ };
+
+ public enum class SyncCameraSync
+ {
+ SyncAutoUSBSync = 0,
+ SyncForceUSBSync
+ };
+
+ public enum class SyncInputSource
+ {
+ SyncInputSourceWired = 0,
+ SyncInputSourceInternal = 0,
+ SyncInputSourceSMPTEInput,
+ SyncInputSourceSyncExternal=2,
+ SyncInputSourceSyncExternalEitherEdge=2,
+ SyncInputSourceSyncExternalRisingEdge,
+ SyncInputSourceSyncExternalFallingEdge,
+ SyncInputSourceSyncExternalHighGated,
+ SyncInputSourceSyncExternalLowGated,
+ SyncInputSourceUSB
+ };
+
+ public enum class SyncOutputPhase
+ {
+ SyncOutputInPhase = 0,
+ SyncOutputDelayedByGlobalOffset
+ };
+ public enum class SyncOutputPulseDuration
+ {
+ SyncOutputPulseDurationExposureTime = 0,
+ SyncOutputPulseDurationPassThrough,
+ SyncOutputPulseDurationRecordingLevel,
+ SyncOutputPulseDurationRecordingPulse
+ };
+
+ public enum class SyncOutputPolarity
+ {
+ SyncOutputPolarityNormal = 0,
+ SyncOutputPolarityInverted
+ };
+ public enum class USBSyncInControl
+ {
+ USBSyncInControlGateClosedDisabled=0,
+ USBSyncInControlGateOpenEnabled
+ };
Please sign in to comment.
Something went wrong with that request. Please try again.