27 struct ApplyIntrinsicsFunction {
28 ApplyIntrinsicsFunction(
const CameraIntrinsics& intrinsics,
33 double normalized_x, normalized_y;
34 intrinsics.ImageSpaceToNormalized(
x,
y, &normalized_x, &normalized_y);
35 intrinsics.ApplyIntrinsics(normalized_x, normalized_y, warp_x, warp_y);
39 struct InvertIntrinsicsFunction {
40 InvertIntrinsicsFunction(
const CameraIntrinsics& intrinsics,
45 double normalized_x, normalized_y;
46 intrinsics.InvertIntrinsics(
x,
y, &normalized_x, &normalized_y);
47 intrinsics.NormalizedToImageSpace(
48 normalized_x, normalized_y, warp_x, warp_y);
57 template <
typename WarpFunction>
58 void LookupWarpGrid::Compute(
const CameraIntrinsics& intrinsics,
64 double aspx = (
double)
w / intrinsics.image_width();
65 double aspy = (
double)h / intrinsics.image_height();
67 # pragma omp parallel for schedule(static) \
68 num_threads(threads_) if (threads_ > 1 && height > 100)
72 double src_x = (
x - 0.5 *
overscan *
w) / aspx,
74 double warp_x, warp_y;
75 WarpFunction(intrinsics, src_x, src_y, &warp_x, &warp_y);
76 warp_x = warp_x * aspx + 0.5 *
overscan *
w;
77 warp_y = warp_y * aspy + 0.5 *
overscan * h;
78 int ix = int(warp_x), iy = int(warp_y);
79 int fx = round((warp_x - ix) * 256), fy = round((warp_y - iy) * 256);
109 template <
typename WarpFunction>
118 if (offset_ ==
NULL) {
129 template <
typename PixelType>
134 PixelType* output_buffer) {
136 # pragma omp parallel for schedule(static) \
137 num_threads(threads_) if (threads_ > 1 && height > 100)
142 const int pixel_index =
144 const PixelType* s = &input_buffer[pixel_index];
145 for (
int i = 0; i <
channels; i++) {
160 template <
typename PixelType>
166 PixelType* output_buffer) {
170 distort_.
Apply<PixelType>(
174 template <
typename PixelType>
180 PixelType* output_buffer) {
185 undistort_.
Apply<PixelType>(
typedef double(DMatrix)[4][4]
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_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 y
_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
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void DistortBuffer(const PixelType *input_buffer, int width, int height, double overscan, int channels, PixelType *output_buffer)
void UndistortBuffer(const PixelType *input_buffer, int width, int height, double overscan, int channels, PixelType *output_buffer)
void Apply(const PixelType *input_buffer, int width, int height, int channels, PixelType *output_buffer)
void Update(const CameraIntrinsics &intrinsics, int width, int height, double overscan)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset