2using System.Collections.Generic;
7using System.Threading.Tasks;
20 [TypeConverter(typeof(ExpandableObjectConverter))]
24 bool m_bHistEq =
false;
25 bool m_bInverse =
false;
26 bool m_bDecolorize =
false;
27 bool m_bGaussBlur =
false;
29 bool m_bPosterize =
false;
30 bool m_bErode =
false;
31 bool m_bSaltPepper =
false;
33 bool m_bClahe =
false;
34 bool m_bConvertToHsv =
false;
35 bool m_bConvertToLab =
false;
48 [Description(
"Get/set probability of using this resize policy.")]
51 get {
return m_fProb; }
52 set { m_fProb = value; }
58 [Description(
"Get/set histogram equalized.")]
61 get {
return m_bHistEq; }
62 set { m_bHistEq = value; }
68 [Description(
"Get/set color inversion.")]
71 get {
return m_bInverse; }
72 set { m_bInverse = value; }
78 [Description(
"Get/set grayscale.")]
81 get {
return m_bDecolorize; }
82 set { m_bDecolorize = value; }
88 [Description(
"Get/set gaussian blur.")]
91 get {
return m_bGaussBlur; }
92 set { m_bGaussBlur = value; }
98 [Description(
"Get/set jpeg quality.")]
101 get {
return m_fJpeg; }
102 set { m_fJpeg = value; }
108 [Description(
"Get/set posterization.")]
111 get {
return m_bPosterize; }
112 set { m_bPosterize = value; }
118 [Description(
"Get/set erosion.")]
121 get {
return m_bErode; }
122 set { m_bErode = value; }
128 [Description(
"Get/set salt-n-pepper noise.")]
131 get {
return m_bSaltPepper; }
132 set { m_bSaltPepper = value; }
138 [Description(
"Get/set the salt-n-pepper parameter.")]
141 get {
return m_saltPepper; }
142 set { m_saltPepper = value; }
148 [Description(
"Get/set the local histogram equalization.")]
151 get {
return m_bClahe; }
152 set { m_bClahe = value; }
158 [Description(
"Get/set color space conversion to hsv.")]
161 get {
return m_bConvertToHsv; }
162 set { m_bConvertToHsv = value; }
168 [Description(
"Get/set color space convertion to lab.")]
171 get {
return m_bConvertToLab; }
172 set { m_bConvertToLab = value; }
208 RawProto rpBase = base.ToProto(
"option");
211 rgChildren.
Add(rpBase);
221 rgChildren.
Add(m_saltPepper.
ToProto(
"saltpepper_param"));
226 return new RawProto(strName,
"", rgChildren);
240 if (rpOption !=
null)
243 if ((strVal = rp.
FindValue(
"prob")) !=
null)
246 if ((strVal = rp.
FindValue(
"hist_eq")) !=
null)
247 p.
hist_eq =
bool.Parse(strVal);
249 if ((strVal = rp.
FindValue(
"inverse")) !=
null)
250 p.
inverse =
bool.Parse(strVal);
252 if ((strVal = rp.
FindValue(
"decolorize")) !=
null)
255 if ((strVal = rp.
FindValue(
"gauss_blur")) !=
null)
258 if ((strVal = rp.
FindValue(
"jpeg")) !=
null)
261 if ((strVal = rp.
FindValue(
"posterize")) !=
null)
264 if ((strVal = rp.
FindValue(
"erode")) !=
null)
265 p.
erode =
bool.Parse(strVal);
267 if ((strVal = rp.
FindValue(
"saltpepper")) !=
null)
274 if ((strVal = rp.
FindValue(
"clahe")) !=
null)
275 p.
clahe =
bool.Parse(strVal);
277 if ((strVal = rp.
FindValue(
"convert_to_hsv")) !=
null)
280 if ((strVal = rp.
FindValue(
"convert_to_lab")) !=
null)
The BaseParameter class is the base class for all other parameter classes.
static float ParseFloat(string strVal)
Parse float values using the US culture if the decimal separator = '.', then using the native culture...
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.
RawProto FindChild(string strName)
Searches for a given node.
string FindValue(string strName)
Searches for a falue of a node within this nodes children.
The OptionalParameter is the base class for parameters that are optional such as the MaskParameter,...
static OptionalParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
OptionalParameter(bool bActive=false)
The constructor.
bool Active
When active, the parameter is used, otherwise it is ignored.
Specifies the parameters for the NoiseParameter used with SSD.
bool convert_to_hsv
Get/set color space conversion to hsv.
bool hist_eq
Get/set histogram equalized.
override void Copy(OptionalParameter src)
Copy the object.
bool saltpepper
Get/set salt-n-pepper noise.
bool inverse
Get/set color inversion.
bool gauss_blur
Get/set gaussian blur.
float prob
Get/set probability of using this resize policy.
static new NoiseParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
float jpeg
Get/set jpeg quality.
bool clahe
Get/set the local histogram equalization.
NoiseParameter(bool bActive)
The constructor.
bool posterize
Get/set posterization.
override RawProto ToProto(string strName)
Convert this object to a raw proto.
bool erode
Get/set erosion.
bool convert_to_lab
Get/set color space convertion to lab.
bool decolorize
Get/set grayscale.
NoiseParameter Clone()
Return a clone of the object.
SaltPepperParameter saltpepper_param
Get/set the salt-n-pepper parameter.
Specifies the parameters for the SaltPepperParameter used with SSD.
override RawProto ToProto(string strName)
Convert this object to a raw proto.
static new SaltPepperParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
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-...