2using System.Collections.Generic;
 
   18    [TypeConverter(typeof(ExpandableObjectConverter))]
 
   23        string m_strVideoFile;
 
   24        uint m_nSkipFrames = 0;
 
   25        uint m_nVideoWidth = 400;
 
   26        uint m_nVideoHeight = 300;
 
   53        [Description(
"Specifies the video type (default = WEBCAM).")]
 
   56            get { 
return m_videoType; }
 
   57            set { m_videoType = value; }
 
   63        [Description(
"Specifies the device ID (default = 0).")]
 
   66            get { 
return m_nDeviceID; }
 
   67            set { m_nDeviceID = value; }
 
   73        [Description(
"Specifies the video file when using the VIDEO type.")]
 
   76            get { 
return m_strVideoFile; }
 
   77            set { m_strVideoFile = value; }
 
   83        [Description(
"Optionally, specifies the number of frames to be skipped before processing a frame (default = 0).")]
 
   86            get { 
return m_nSkipFrames; }
 
   87            set { m_nSkipFrames = value; }
 
   93        [Description(
"Optionally, specifies the video width (default = 400).")]
 
   96            get { 
return m_nVideoWidth; }
 
   97            set { m_nVideoWidth = value; }
 
  103        [Description(
"Optionally, specifies the video height (default = 300).")]
 
  106            get { 
return m_nVideoHeight; }
 
  107            set { m_nVideoHeight = value; }
 
  116        public override object Load(
System.IO.BinaryReader br, 
bool bNewInstance = 
true)
 
  135            m_videoType = p.m_videoType;
 
  136            m_nDeviceID = p.m_nDeviceID;
 
  137            m_strVideoFile = p.m_strVideoFile;
 
  138            m_nSkipFrames = p.m_nSkipFrames;
 
  139            m_nVideoWidth = p.m_nVideoWidth;
 
  140            m_nVideoHeight = p.m_nVideoHeight;
 
  163            rgChildren.
Add(
new RawProto(
"video_type", m_videoType.ToString()));
 
  164            rgChildren.
Add(
new RawProto(
"device_id", m_nDeviceID.ToString()));
 
  166            if (!
string.IsNullOrEmpty(m_strVideoFile))
 
  167                rgChildren.
Add(
new RawProto(
"video_file", m_strVideoFile.ToString()));
 
  169            rgChildren.
Add(
new RawProto(
"skip_frames", m_nSkipFrames.ToString()));
 
  170            rgChildren.
Add(
new RawProto(
"video_width", m_nVideoWidth.ToString()));
 
  171            rgChildren.
Add(
new RawProto(
"video_height", m_nVideoHeight.ToString()));
 
  173            return new RawProto(strName, 
"", rgChildren);
 
  186            if ((strVal = rp.
FindValue(
"video_type")) != 
null)
 
  188                if (strVal == 
VideoType.VIDEO.ToString())
 
  194            if ((strVal = rp.
FindValue(
"device_id")) != 
null)
 
  197            if ((strVal = rp.
FindValue(
"video_file")) != 
null)
 
  200            if ((strVal = rp.
FindValue(
"skip_frames")) != 
null)
 
  203            if ((strVal = rp.
FindValue(
"video_width")) != 
null)
 
  206            if ((strVal = rp.
FindValue(
"video_height")) != 
null)
 
The RawProtoCollection class is a list of RawProto objects.
 
void Add(RawProto p)
Adds a RawProto to the collection.
 
The RawProto class is used to parse and output Google prototxt file data.
 
static RawProto Parse(string str)
Parses a prototxt and places it in a new RawProto.
 
string FindValue(string strName)
Searches for a falue of a node within this nodes children.
 
The LayerParameterBase is the base class for all other layer specific parameters.
 
Specifies the parameters for the VideoDataLayer.
 
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
 
uint video_width
Optionally, specifies the video width (default = 400).
 
static VideoDataParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
 
VideoType
Defines the video type.
 
uint skip_frames
Optionally, specifies the number of frames to be skipped before processing a frame (default = 0).
 
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
 
VideoDataParameter()
The constructor.
 
string video_file
Specifies the video file when using the VIDEO type.
 
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
 
override void Copy(LayerParameterBase src)
Copy on parameter to another.
 
int device_id
Specifies the device ID (default = 0).
 
uint video_height
Optionally, specifies the video height (default = 300).
 
VideoType video_type
Specifies the video type (default = WEBCAM).
 
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
 
The MyCaffe.param.ssd namespace contains all SSD related parameter objects that correspond to the nat...
 
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...