/// <summary> /// 初始化 /// </summary> /// <param name="fgArgs"></param> /// <param name="FPS"></param> private void initialize(FrameGrabberArgs fgArgs, int?FPS) { Status = new WorkingManStatus() { IsConnection = false, Message = "", Instruction = GrabInstruction.Initialize, Stage = GrabStage.Initial, State = GrabState.Idle }; setFPS(FPS); _FGArgs = fgArgs; initializeBackgroundWorker(); }
public HalconGrabber(FrameGrabberArgs framegrabberArgs) { _FGArgs = framegrabberArgs; }
/// <summary> /// 初始化 Camera 參數 /// </summary> private static void initGrabArguments() { var section = ConfigurationManager.GetSection("CameraSettingSection") as CameraSettingSection; var fpath = CameraSettingRepo.GetCameraSettingFilepath(section); var dict = CameraSettingRepo.GetCameraSettingDictionary(fpath); _fgArgs = new FrameGrabberArgs() { Name = dict["Name"], HorizontalResolution = Convert.ToInt32(dict["HorizontalResolution"]), VerticalResolution = Convert.ToInt32(dict["VerticalResolution"]), ImageWidth = Convert.ToInt32(dict["ImageWidth"]), ImageHeight = Convert.ToInt32(dict["ImageHeight"]), StartRow = Convert.ToInt32(dict["StartRow"]), StartColumn = Convert.ToInt32(dict["StartColumn"]), Field = dict["Field"], BitsPerChannel = Convert.ToInt32(dict["BitsPerChannel"]), ColorSpace = dict["ColorSpace"], Generic = dict["Generic"], ExternalTrigger = dict["ExternalTrigger"], CameraType = dict["CameraType"], Device = dict["Device"], Port = Convert.ToInt32(dict["Port"]), LineIn = Convert.ToInt32(dict["LineIn"]) }; }
// /// <summary> /// 設定鏡頭參數 /// </summary> /// <param name="fgArgs">FrameGrabberArgs</param> /// <param name="FPS">Frame per second, default = 17</param> public GrabImageWorkingMan(FrameGrabberArgs fgArgs, int?FPS) { initialize(fgArgs, FPS); }
/// <summary> /// 設定鏡頭參數 /// </summary> /// <param name="fgArgs">FrameGrabberArgs</param> public GrabImageWorkingMan(FrameGrabberArgs fgArgs) { initialize(fgArgs, null); }
// /// <summary> /// 設定鏡頭參數 /// </summary> /// <param name="fgArgs">FrameGrabberArgs</param> /// <param name="FPS">Frame per second, default = 17</param> public GrabImageWorkingMan(FrameGrabberArgs fgArgs, int? FPS) { initialize(fgArgs, FPS); }
/// <summary> /// 初始化 /// </summary> /// <param name="fgArgs"></param> /// <param name="FPS"></param> private void initialize(FrameGrabberArgs fgArgs, int? FPS) { Status = new WorkingManStatus() { IsConnection = false, Message = "", Instruction = GrabInstruction.Initialize, Stage = GrabStage.Initial, State = GrabState.Idle }; setFPS(FPS); _FGArgs = fgArgs; initializeBackgroundWorker(); }