3 * Copyright (C) 1997-2014 Adam Williams <broadcast at earthling dot net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include "pluginvclient.h"
24 #include "loadbalance.h"
27 #include "opencv2/core/types.hpp"
28 #include "opencv2/core/mat.hpp"
29 #include "opencv2/calib3d.hpp"
30 #include "opencv2/photo.hpp"
31 #include "opencv2/ximgproc.hpp"
32 #include "opencv2/video/video.hpp"
39 using namespace cv::ximgproc;
41 class PuzzleObjConfig;
52 int equivalent(PuzzleObjConfig &that);
53 void copy_from(PuzzleObjConfig &that);
54 void interpolate(PuzzleObjConfig &prev, PuzzleObjConfig &next,
55 long prev_frame, long next_frame, long current_frame);
59 class PuzzleObj : public PluginVClient
62 PuzzleObj(PluginServer *server);
64 PLUGIN_CLASS_MEMBERS2(PuzzleObjConfig)
67 void save_data(KeyFrame *keyframe);
68 void read_data(KeyFrame *keyframe);
69 int process_buffer(VFrame *frame, int64_t start_position, double frame_rate);
70 void to_mat(Mat &mat, int mcols, int mrows,
71 VFrame *inp, int ix,int iy, int mcolor_model);
73 int width, height, color_model;
74 VFrame *input, *output;
76 int ss_width, ss_height, ss_channels;
77 int ss_pixels, ss_levels, ss_prior, ss_hist_bins;
79 Ptr<SuperpixelSEEDS> sseeds;