MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
ImageDescriptor.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6
8{
12 [Serializable]
13 public class ImageDescriptor
14 {
15 int m_nID;
16 int m_nHeight;
17 int m_nWidth;
18 int m_nChannels;
19 bool m_bEncoded;
20 int m_nSourceID;
21 int m_nIdx;
22 int m_nActiveLabel;
23 bool m_bActive;
24 string m_strDescription;
25 DateTime m_dt;
26
41 public ImageDescriptor(int nID, int nH, int nW, int nC, bool bEncoded, int nSrcID, int nIdx, int nActiveLabel, bool bActive, string strDesc, DateTime dt)
42 {
43 m_nID = nID;
44 m_nHeight = nH;
45 m_nWidth = nW;
46 m_nChannels = nC;
47 m_bEncoded = bEncoded;
48 m_nSourceID = nSrcID;
49 m_nIdx = nIdx;
50 m_nActiveLabel = nActiveLabel;
51 m_bActive = bActive;
52 m_strDescription = strDesc;
53 m_dt = dt;
54 }
55
61 : this(id.ID, id.Height, id.Width, id.Channels, id.Encoded, id.SourceID, id.Index, id.ActiveLabel, id.Active, id.Description, id.TimeStamp)
62 {
63 }
64
68 public int ID
69 {
70 get { return m_nID; }
71 }
72
76 public int Height
77 {
78 get { return m_nHeight; }
79 }
80
84 public int Width
85 {
86 get { return m_nWidth; }
87 }
88
92 public int Channels
93 {
94 get { return m_nChannels; }
95 }
96
100 public bool Encoded
101 {
102 get { return m_bEncoded; }
103 }
104
108 public int SourceID
109 {
110 get { return m_nSourceID; }
111 }
112
116 public int Index
117 {
118 get { return m_nIdx; }
119 }
120
124 public int ActiveLabel
125 {
126 get { return m_nActiveLabel; }
127 }
128
132 public bool Active
133 {
134 get { return m_bActive; }
135 }
136
140 public string Description
141 {
142 get { return m_strDescription; }
143 }
144
148 public DateTime TimeStamp
149 {
150 get { return m_dt; }
151 }
152
157 public override string ToString()
158 {
159 return m_nID.ToString() + ": " + m_nChannels.ToString() + " x " + m_nHeight.ToString() + " x " + m_nWidth.ToString();
160 }
161 }
162}
The ImageDescriptor class describes a single image in the database.
int Channels
Returns the channels of the image (i.e. 3 = RGB, 1 = B/W)
override string ToString()
Creates the string representation of the descriptor.
int Width
Returns the width of the image.
bool Encoded
Returns whether or not the image is encoded.
bool Active
Returns whether or not the image is active.
DateTime TimeStamp
Specifies the time-stamp of the image (if any).
int ActiveLabel
Returns the active label of the image.
int Index
Returns the index of the image.
int Height
Returns the height of the image.
ImageDescriptor(int nID, int nH, int nW, int nC, bool bEncoded, int nSrcID, int nIdx, int nActiveLabel, bool bActive, string strDesc, DateTime dt)
The ImageDescriptor constructor.
string Description
Returns the description of the image.
ImageDescriptor(ImageDescriptor id)
The ImageDescriptor constructor.
int SourceID
Returns the ID of the source associated with the image.
int ID
Returns the ID of the image.
The descriptors namespace contains all descriptor used to describe various items stored within the da...