@@ -15,22 +15,56 @@ namespace cv { namespace photometric_calib{
15
15
// ! @addtogroup photometric_calib
16
16
// ! @{
17
17
18
+ /* !
19
+ * @brief Class for reading the sequence used for photometric calibration. Both the folder path of the sequence
20
+ * and the path of time file should be provided. The images of the sequence should be of format CV_8U. The time
21
+ * file should be .yaml or .yml. In the time file, the timestamps and exposure duration of the corresponding images
22
+ * of the sequence should be provided.
23
+ *
24
+ * The image paths are stored in std::vector<String> images, timestamps are stored in std::vector<double> timeStamps,
25
+ * exposure duration is stored in std::vector<float> exposureTimes
26
+ */
27
+
18
28
class Reader
19
29
{
20
30
public:
31
+ /* !
32
+ * @brief Constructor
33
+ * @param folderPath the path of folder which contains the images
34
+ * @param timesPath the path of time file
35
+ */
21
36
Reader (const std::string &folderPath, const std::string ×Path);
22
37
38
+ /* !
39
+ * @return the amount of images loaded
40
+ */
23
41
unsigned long getNumImages () const ;
24
42
43
+
44
+ /* !
45
+ * @brief Given the id of the image and return its timestamp value. id is in fact just the index of the image in the
46
+ * vector contains all the images.
47
+ * @param id
48
+ * @return timestamp of the id^th image.
49
+ */
25
50
double getTimestamp (unsigned long id) const ;
26
51
52
+ /* !
53
+ * @brief Given the id of the image and return its exposure duration when is was taken.
54
+ * @param id
55
+ * @return exposure duration of the image.
56
+ */
27
57
float getExposureDuration (unsigned long id) const ;
28
58
29
59
int getWidth () const ;
30
60
int getHeight () const ;
31
61
const std::string &getFolderPath () const ;
32
62
33
63
private:
64
+ /* !
65
+ * @brief Load timestamps and exposure duration.
66
+ * @param timesFile
67
+ */
34
68
inline void loadTimestamps (const std::string ×File);
35
69
36
70
std::vector<String> images; // All the names/paths of images
0 commit comments