Caffe2 - C++ API
A deep learning, cross platform ML framework
video_io.h
1 #ifndef CAFFE2_VIDEO_VIDEO_IO_H_
2 #define CAFFE2_VIDEO_VIDEO_IO_H_
3 
4 #include <caffe2/core/common.h>
5 #include <caffe2/video/optical_flow.h>
6 #include <caffe2/video/video_decoder.h>
7 #include <opencv2/opencv.hpp>
8 #include <random>
9 
10 #include <istream>
11 #include <ostream>
12 
13 namespace caffe2 {
14 
15 CAFFE2_API void ClipTransformRGB(
16  const unsigned char* buffer_rgb,
17  const int multi_crop_count,
18  const int crop_height,
19  const int crop_width,
20  const int length_rgb,
21  const int channels_rgb,
22  const int sampling_rate_rgb,
23  const int height,
24  const int width,
25  const int h_off,
26  const int w_off,
27  const int* multi_crop_h_off,
28  const int* multi_crop_w_off,
29  const bool mirror_me,
30  const bool color_jitter,
31  const float saturation,
32  const float brightness,
33  const float contrast,
34  const bool color_lighting,
35  const float color_lighting_std,
36  const std::vector<std::vector<float>>& color_lighting_eigvecs,
37  const std::vector<float>& color_lighting_eigvals,
38  const std::vector<float>& mean_rgb,
39  const std::vector<float>& inv_std_rgb,
40  std::mt19937* randgen,
41  float* transformed_clip);
42 
43 CAFFE2_API void ClipTransformOpticalFlow(
44  const unsigned char* buffer_rgb,
45  const int crop_height,
46  const int crop_width,
47  const int length_of,
48  const int channels_of,
49  const int sampling_rate_of,
50  const int height,
51  const int width,
52  const cv::Rect& rect,
53  const int channels_rgb,
54  const bool mirror_me,
55  const int flow_alg_type,
56  const int flow_data_type,
57  const int frame_gap_of,
58  const bool do_flow_aggregation,
59  const std::vector<float>& mean_of,
60  const std::vector<float>& inv_std_of,
61  float* transformed_clip);
62 
63 CAFFE2_API void FreeDecodedData(
64  std::vector<std::unique_ptr<DecodedFrame>>& sampledFrames);
65 
66 CAFFE2_API bool DecodeMultipleClipsFromVideo(
67  const char* video_buffer,
68  const std::string& video_filename,
69  const int encoded_size,
70  const Params& params,
71  const int start_frm,
72  const int clip_per_video,
73  const bool use_local_file,
74  int& height,
75  int& width,
76  std::vector<unsigned char*>& buffer_rgb);
77 
78 } // namespace caffe2
79 
80 #endif // CAFFE2_VIDEO_VIDEO_IO_H_
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13