Blender V4.3
image.cc File Reference
#include "intern/image.h"
#include "intern/utildefines.h"
#include "libmv/tracking/track_region.h"
#include <png.h>
#include <cassert>

Go to the source code of this file.

Functions

void libmv_floatImageDestroy (libmv_FloatImage *image)
 
void libmv_byteBufferToFloatImage (const unsigned char *buffer, int width, int height, int channels, FloatImage *image)
 
void libmv_floatBufferToFloatImage (const float *buffer, int width, int height, int channels, FloatImage *image)
 
void libmv_floatImageToFloatBuffer (const FloatImage &image, float *buffer)
 
void libmv_floatImageToByteBuffer (const libmv::FloatImage &image, unsigned char *buffer)
 
static bool savePNGImage (png_bytep *row_pointers, int width, int height, int depth, int color_type, const char *file_name)
 
bool libmv_saveImage (const FloatImage &image, const char *prefix, int x0, int y0)
 
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)
 
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)
 

Function Documentation

◆ libmv_byteBufferToFloatImage()

void libmv_byteBufferToFloatImage ( const unsigned char * buffer,
int width,
int height,
int channels,
FloatImage * image )

◆ libmv_floatBufferToFloatImage()

void libmv_floatBufferToFloatImage ( const float * buffer,
int width,
int height,
int channels,
FloatImage * image )

◆ libmv_floatImageDestroy()

void libmv_floatImageDestroy ( libmv_FloatImage * image)

Definition at line 15 of file intern/libmv/intern/image.cc.

Referenced by accessor_get_ibuf().

◆ libmv_floatImageToByteBuffer()

void libmv_floatImageToByteBuffer ( const libmv::FloatImage & image,
unsigned char * buffer )

Definition at line 61 of file intern/libmv/intern/image.cc.

References image().

Referenced by libmv_samplePlanarPatchByte().

◆ libmv_floatImageToFloatBuffer()

void libmv_floatImageToFloatBuffer ( const FloatImage & image,
float * buffer )

Definition at line 51 of file intern/libmv/intern/image.cc.

References image().

Referenced by libmv_samplePlanarPatchFloat().

◆ libmv_samplePlanarPatchByte()

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 )

◆ libmv_samplePlanarPatchFloat()

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 )

◆ libmv_saveImage()

bool libmv_saveImage ( const FloatImage & image,
const char * prefix,
int x0,
int y0 )

Definition at line 135 of file intern/libmv/intern/image.cc.

References image(), result, savePNGImage(), x, and y.

Referenced by libmv_trackRegion().

◆ savePNGImage()

static bool savePNGImage ( png_bytep * row_pointers,
int width,
int height,
int depth,
int color_type,
const char * file_name )
static

Definition at line 72 of file intern/libmv/intern/image.cc.

References NULL.

Referenced by libmv_saveImage().