cameracoordinates.mdl

来自「1394 接口视觉工具箱 (英文工具箱」· MDL 代码 · 共 864 行 · 第 1/2 页

MDL
864
字号
	      ExtModeTransport	      0
	      ExtModeMexFile	      "ext_comm"
	      ExtModeIntrfLevel	      "Level1"
	      RTWCAPISignals	      off
	      RTWCAPIParams	      off
	      RTWCAPIStates	      off
	      GenerateASAP2	      off
	    }
	    PropName		    "Components"
	  }
	}
	PropName		"Components"
      }
      Name		      "Configuration"
      CurrentDlgPage	      "Solver"
    }
    PropName		    "ConfigurationSets"
  }
  Simulink.ConfigSet {
    $PropName		    "ActiveConfigurationSet"
    $ObjectID		    1
  }
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Abs
      SaturateOnIntegerOverflow	on
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      SamplingMode	      "Sample based"
      OutDataTypeMode	      "Inherit from 'Constant value'"
      OutDataType	      "sfix(16)"
      ConRadixGroup	      "Use specified scaling"
      OutScaling	      "2^0"
      SampleTime	      "inf"
      FramePeriod	      "inf"
    }
    Block {
      BlockType		      Display
      Format		      "short"
      Decimation	      "10"
      Floating		      off
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Inport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      LatchByDelayingOutsideSignal off
      LatchByCopyingInsideSignal off
      Interpolate	      on
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      DataType		      "auto"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      SignalType	      "auto"
      SamplingMode	      "auto"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      RelationalOperator
      Operator		      ">="
      InputSameDT	      on
      LogicOutDataTypeMode    "Logical (see Configuration Parameters: Optimiza"
"tion)"
      LogicDataType	      "uint(8)"
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      "FromPortIcon"
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      TreatAsAtomicUnit	      off
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    UseDisplayTextAsClickCallback off
  }
  LineDefaults {
    FontName		    "Helvetica"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "CameraCoordinates"
    Location		    [553, 182, 1209, 595]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "A4"
    PaperUnits		    "centimeters"
    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
    TiledPageScale	    1
    ShowPageBoundaries	    off
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Abs
      Name		      "Abs"
      Position		      [360, 155, 390, 185]
      ShowName		      off
    }
    Block {
      BlockType		      Abs
      Name		      "Abs1"
      Position		      [360, 240, 390, 270]
      ShowName		      off
    }
    Block {
      BlockType		      Reference
      Name		      "Compare\nTo Constant"
      Ports		      [1, 1]
      Position		      [360, 65, 390, 95]
      ShowName		      off
      SourceBlock	      "simulink/Logic and Bit\nOperations/Compare\nTo "
"Constant"
      SourceType	      "Compare To Constant"
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      relop		      ">"
      const		      "0"
      LogicOutDataTypeMode    "boolean"
      ZeroCross		      off
    }
    Block {
      BlockType		      Reference
      Name		      "Compare\nTo Constant1"
      Ports		      [1, 1]
      Position		      [360, 330, 390, 360]
      ShowName		      off
      SourceBlock	      "simulink/Logic and Bit\nOperations/Compare\nTo "
"Constant"
      SourceType	      "Compare To Constant"
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      relop		      ">"
      const		      "0"
      LogicOutDataTypeMode    "boolean"
      ZeroCross		      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "capture and process\nan image from a\nFireWire "
"camera"
      Ports		      [0, 2]
      Position		      [50, 126, 190, 299]
      FontSize		      12
      ShowPortLabels	      "none"
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      MaskHideContents	      off
      MaskType		      "GET_FIREWIRE"
      MaskDescription	      "Capture images of a firewire camera and process"
" them according to the supplied colour file definitions."
      MaskPromptString	      "Camera mode|Acquisition mode|Colour range defin"
"ition (filename)|Display camera image|Display mode"
      MaskStyleString	      "popup(CAMERA_YUV444_160x120|CAMERA_YUV422_320x2"
"40|CAMERA_YUV411_640x480|CAMERA_YUV422_640x480|CAMERA_RGB8_640x480|CAMERA_Y8_"
"640x480|CAMERA_Y16_640x480),popup(capture image (single frames)|acquire image"
" (video stream)),edit,checkbox,popup(regular image|classified image)"
      MaskTunableValueString  "off,off,off,off,on"
      MaskCallbackString      "||||"
      MaskEnableString	      "on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on"
      MaskVarAliasString      ",,,,"
      MaskVariables	      "cammod=@1;acqmod=@2;colour_def=&3;dispImg=@4;di"
"spmod=@5;"
      MaskInitialization      "% Ensure that colour definition file exists\ncd"
"ef = dir(colour_def);\nif(isempty(cdef))\n   fprintf('The specified colour de"
"finition file could not be found\\n');\n   cdef_str = '???';\nelse\n   cdef_s"
"tr = colour_def;\n   cdef_len = length(cdef_str);\n\n   % determine the numbe"
"r of colours to be scanned for\n   h = fopen(colour_def);\n   nCDef = 0;\n   "
"while(~feof(h))\n       myline = fgetl(h);\n\n       if(strcmpi(myline, '[thr"
"esholds]'))\n           break;\n       end\n\n       if(strcmpi(myline, '[col"
"ors]'))\n           nCDef = 0;\n       elseif(~strcmp(myline, ''))\n         "
"  nCDef = nCDef + 1;\n           %disp(['(' num2str(nCDef) ') : ' myline]);\n"
"           %pause\n       end\n   end\n   fclose(h);\n\nend\n\n% adjust varia"
"ble dispmod\ndispmod = dispmod - 1;\n\n% set camera mode string (icon)\nmyCam"
"eraModes = { ...\n	'YUV444_160x120', ...\n	'YUV422_320x240', .."
".\n	'YUV411_640x480', ...\n	'YUV422_640x480', ...\n	'RGB"
"8_640x480', ...\n	'Y8_640x480', ...\n	'Y16_640x480'\n};\n\ncamM"
"odeStr = myCameraModes{cammod};\n\n% adjust variable cammod\ncammod = cammod "
"- 1;\n\n% set video acquisition mode string (icon)\nmyAcquisitionModes = { .."
".\n	'single frames', ...\n	'video stream'\n};\n\nacqModeStr = m"
"yAcquisitionModes{acqmod};\n"
      MaskDisplay	      "fprintf('Get coordinates\\n\\nCamera mode:\\n%s"
"\\n%s\\n\\nDetecting %d colours\\n(according to colour def)\\n\\nColour defin"
"ition file:\\n%s', camModeStr, acqModeStr, nCDef, cdef_str)"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "CAMERA_YUV411_640x480|capture image (single fra"
"mes)|testcolors.txt|on|regular image"
      MaskTabNameString	      ",,,,"
      System {
	Name			"capture and process\nan image from a\nFireWir"
"e camera"
	Location		[230, 284, 682, 455]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  "S-Function"
	  Name			  "READ_FRAMEGRABBER"
	  Ports			  [0, 2]
	  Position		  [105, 46, 210, 119]
	  FontSize		  12
	  FunctionName		  "SFcapProc"
	  Parameters		  "cdef_str, cdef_len, nCDef, dispImg, dispmod"
", cammod, acqmod"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out"
	  Position		  [350, 54, 370, 76]
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [350, 89, 370, 111]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  BusOutputAsStruct	  off
	}
	Line {
	  SrcBlock		  "READ_FRAMEGRABBER"
	  SrcPort		  1
	  DstBlock		  "Out"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "READ_FRAMEGRABBER"
	  SrcPort		  2
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Display
      Name		      "valid value (x)"
      Ports		      [1]
      Position		      [500, 48, 590, 112]
      Decimation	      "1"
      Lockdown		      off
    }
    Block {
      BlockType		      Display
      Name		      "valid value (y)"
      Ports		      [1]
      Position		      [500, 313, 590, 377]
      Decimation	      "1"
      Lockdown		      off
    }
    Block {
      BlockType		      Display
      Name		      "x co-ordinates"
      Ports		      [1]
      Position		      [500, 138, 590, 202]
      Decimation	      "1"
      Lockdown		      off
    }
    Block {
      BlockType		      Display
      Name		      "y co-ordinates"
      Ports		      [1]
      Position		      [500, 222, 590, 288]
      Decimation	      "1"
      Lockdown		      off
    }
    Line {
      SrcBlock		      "capture and process\nan image from a\nFireWire "
"camera"
      SrcPort		      1
      Points		      [55, 0]
      Branch {
	DstBlock		"Abs"
	DstPort			1
      }
      Branch {
	Points			[0, -90]
	DstBlock		"Compare\nTo Constant"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Abs"
      SrcPort		      1
      DstBlock		      "x co-ordinates"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Abs1"
      SrcPort		      1
      DstBlock		      "y co-ordinates"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Compare\nTo Constant"
      SrcPort		      1
      DstBlock		      "valid value (x)"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Compare\nTo Constant1"
      SrcPort		      1
      DstBlock		      "valid value (y)"
      DstPort		      1
    }
    Line {
      SrcBlock		      "capture and process\nan image from a\nFireWire "
"camera"
      SrcPort		      2
      Points		      [55, 0]
      Branch {
	DstBlock		"Abs1"
	DstPort			1
      }
      Branch {
	Points			[0, 90]
	DstBlock		"Compare\nTo Constant1"
	DstPort			1
      }
    }
    Annotation {
      Name		      "Note:\nCoordinates are AVERAGED centroids\n(ove"
"r all detected centroids in each category)"
      Position		      [146, 31]
      FontName		      "Arial"
      FontSize		      12
      FontWeight	      "bold"
    }
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?