1 #ifndef CAFFE2_VIDEO_VIDEO_IO_H_ 2 #define CAFFE2_VIDEO_VIDEO_IO_H_ 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> 15 CAFFE2_API
void ClipTransformRGB(
16 const unsigned char* buffer_rgb,
17 const int multi_crop_count,
18 const int crop_height,
21 const int channels_rgb,
22 const int sampling_rate_rgb,
27 const int* multi_crop_h_off,
28 const int* multi_crop_w_off,
30 const bool color_jitter,
31 const float saturation,
32 const float brightness,
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);
43 CAFFE2_API
void ClipTransformOpticalFlow(
44 const unsigned char* buffer_rgb,
45 const int crop_height,
48 const int channels_of,
49 const int sampling_rate_of,
53 const int channels_rgb,
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);
63 CAFFE2_API
void FreeDecodedData(
64 std::vector<std::unique_ptr<DecodedFrame>>& sampledFrames);
66 CAFFE2_API
bool DecodeMultipleClipsFromVideo(
67 const char* video_buffer,
68 const std::string& video_filename,
69 const int encoded_size,
72 const int clip_per_video,
73 const bool use_local_file,
76 std::vector<unsigned char*>& buffer_rgb);
80 #endif // CAFFE2_VIDEO_VIDEO_IO_H_ A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...