Blender  V2.93
libmv/intern/image.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2011 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #ifndef LIBMV_IMAGE_H_
21 #define LIBMV_IMAGE_H_
22 
23 #ifdef __cplusplus
24 # include "libmv/image/image.h"
25 void libmv_byteBufferToFloatImage(const unsigned char* buffer,
26  int width,
27  int height,
28  int channels,
29  libmv::FloatImage* image);
30 
31 void libmv_floatBufferToFloatImage(const float* buffer,
32  int width,
33  int height,
34  int channels,
35  libmv::FloatImage* image);
36 
38  float* buffer);
39 
41  unsigned char* buffer);
42 
43 bool libmv_saveImage(const libmv::FloatImage& image,
44  const char* prefix,
45  int x0,
46  int y0);
47 #endif // __cplusplus
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 typedef struct libmv_FloatImage {
54  float* buffer;
55  int width;
56  int height;
57  int channels;
59 
61 
62 void libmv_samplePlanarPatchFloat(const float* image,
63  int width,
64  int height,
65  int channels,
66  const double* xs,
67  const double* ys,
68  int num_samples_x,
69  int num_samples_y,
70  const float* mask,
71  float* patch,
72  double* warped_position_x,
73  double* warped_position_y);
74 
75 void libmv_samplePlanarPatchByte(const unsigned char* image,
76  int width,
77  int height,
78  int channels,
79  const double* xs,
80  const double* ys,
81  int num_samples_x,
82  int num_samples_y,
83  const float* mask,
84  unsigned char* patch,
85  double* warped_position_x,
86  double* warped_position_y);
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
92 #endif // LIBMV_IMAGE_H_
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
3D array (row, column, channel).
Definition: array_nd.h:325
bool libmv_saveImage(const FloatImage &image, const char *prefix, int x0, int y0)
Definition: image.cc:150
void libmv_floatBufferToFloatImage(const float *buffer, int width, int height, int channels, FloatImage *image)
Definition: image.cc:51
void libmv_floatImageToFloatBuffer(const FloatImage &image, float *buffer)
Definition: image.cc:66
void libmv_floatImageToByteBuffer(const libmv::FloatImage &image, unsigned char *buffer)
Definition: image.cc:76
void libmv_byteBufferToFloatImage(const unsigned char *buffer, int width, int height, int channels, FloatImage *image)
Definition: image.cc:36
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
void libmv_samplePlanarPatchFloat(const float *image, int width, int height, int channels, const double *xs, const double *ys, int num_samples_x, int num_samples_y, const float *mask, float *patch, double *warped_position_x, double *warped_position_y)
Definition: image.cc:199
void libmv_samplePlanarPatchByte(const unsigned char *image, int width, int height, int channels, const double *xs, const double *ys, int num_samples_x, int num_samples_y, const float *mask, unsigned char *patch, double *warped_position_x, double *warped_position_y)
Definition: image.cc:234
struct libmv_FloatImage libmv_FloatImage
void libmv_floatImageDestroy(libmv_FloatImage *image)
Definition: image.cc:30
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)