2015-09-01 04:25:20 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
|
|
|
|
* Copyright (C) 2015 Vasily Khoruzhick <anarsoul@gmail.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2018-09-28 09:32:09 +00:00
|
|
|
#ifndef __FPI_ASSEMBLING_H__
|
|
|
|
#define __FPI_ASSEMBLING_H__
|
2015-09-01 04:25:20 +00:00
|
|
|
|
2018-05-28 09:53:30 +00:00
|
|
|
#include <fprint.h>
|
2015-09-01 04:25:20 +00:00
|
|
|
|
|
|
|
struct fpi_frame {
|
|
|
|
int delta_x;
|
|
|
|
int delta_y;
|
|
|
|
unsigned char data[0];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct fpi_frame_asmbl_ctx {
|
2018-11-09 13:20:19 +00:00
|
|
|
unsigned int frame_width;
|
|
|
|
unsigned int frame_height;
|
|
|
|
unsigned int image_width;
|
2015-09-01 04:25:20 +00:00
|
|
|
unsigned char (*get_pixel)(struct fpi_frame_asmbl_ctx *ctx,
|
|
|
|
struct fpi_frame *frame,
|
2018-11-09 13:20:19 +00:00
|
|
|
unsigned int x,
|
|
|
|
unsigned int y);
|
2015-09-01 04:25:20 +00:00
|
|
|
};
|
|
|
|
|
2015-09-19 22:27:19 +00:00
|
|
|
void fpi_do_movement_estimation(struct fpi_frame_asmbl_ctx *ctx,
|
|
|
|
GSList *stripes, size_t stripes_len);
|
2015-09-01 04:25:20 +00:00
|
|
|
|
|
|
|
struct fp_img *fpi_assemble_frames(struct fpi_frame_asmbl_ctx *ctx,
|
|
|
|
GSList *stripes, size_t stripes_len);
|
|
|
|
|
2015-09-05 16:38:10 +00:00
|
|
|
struct fpi_line_asmbl_ctx {
|
2018-11-09 13:20:19 +00:00
|
|
|
unsigned int line_width;
|
|
|
|
unsigned int max_height;
|
|
|
|
unsigned int resolution;
|
|
|
|
unsigned int median_filter_size;
|
|
|
|
unsigned int max_search_offset;
|
2015-09-05 16:38:10 +00:00
|
|
|
int (*get_deviation)(struct fpi_line_asmbl_ctx *ctx,
|
|
|
|
GSList *line1, GSList *line2);
|
|
|
|
unsigned char (*get_pixel)(struct fpi_line_asmbl_ctx *ctx,
|
|
|
|
GSList *line,
|
2018-11-09 13:20:19 +00:00
|
|
|
unsigned int x);
|
2015-09-05 16:38:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct fp_img *fpi_assemble_lines(struct fpi_line_asmbl_ctx *ctx,
|
|
|
|
GSList *lines, size_t lines_len);
|
|
|
|
|
2015-09-01 04:25:20 +00:00
|
|
|
#endif
|