The open imaging DSP library
Loading...
Searching...
No Matches
Functions
mpix/print.h

Print images and statistics. More...

Functions

void mpix_print_buf (const uint8_t *src, size_t size, const struct mpix_format *fmt, bool truecolor)
 Print a buffer using terminal escape codes.
 
void mpix_print_2_rows (const uint8_t *top, const uint8_t *bot, int16_t width, uint32_t fourcc, bool truecolor)
 Print 2 rows of pixels using terminal escape codes.
 
void mpix_hexdump_buf (const uint8_t *buf, size_t size, const struct mpix_format *fmt)
 Hexdump a buffer in the specified format.
 
void mpix_hexdump_raw (const uint8_t *buf, size_t size)
 Hexdump a byte buffer.
 
void mpix_print_rgb_hist (const uint16_t *r_hist, const uint16_t *g_hist, const uint16_t *b_hist, size_t size, uint16_t height)
 Printing RGB histograms to the terminal.
 
void mpix_print_y_hist (const uint16_t *y8hist, size_t size, uint16_t height)
 Printing Y histograms to the terminal.
 
void mpix_print_pipeline (struct mpix_base_op *op)
 Print details about every operation of a pipeline.
 
void mpix_print_op (struct mpix_base_op *op)
 Print details about a signle operation.
 
void mpix_print_stats (struct mpix_stats *stats)
 Print a representation of the statistics in the console for debug purpose.
 
void mpix_print_ctrls (int32_t *ctrls[])
 Print a summary of available controls an their value.
 

Detailed Description

Print images and statistics.

Function Documentation

◆ mpix_hexdump_buf()

void mpix_hexdump_buf ( const uint8_t *  buf,
size_t  size,
const struct mpix_format fmt 
)

Hexdump a buffer in the specified format.

Parameters
bufInput buffer to display in the terminal.
sizeSize of the input buffer in bytes.
fmtImage format of the buffer

◆ mpix_hexdump_raw()

void mpix_hexdump_raw ( const uint8_t *  buf,
size_t  size 
)

Hexdump a byte buffer.

Parameters
bufInput buffer to hexdump in the terminal.
sizeSize of the input buffer in bytes.

◆ mpix_print_2_rows()

void mpix_print_2_rows ( const uint8_t *  top,
const uint8_t *  bot,
int16_t  width,
uint32_t  fourcc,
bool  truecolor 
)

Print 2 rows of pixels using terminal escape codes.

Parameters
topTop row of pixels to print.
botBottom row of pixels to print.
widthNumber of bytes to print
fourccPixel format of the top and bot rows of pixels.
truecolorUse higher quality but slower TRUECOLOR instead of 256COLOR escape codes.

◆ mpix_print_buf()

void mpix_print_buf ( const uint8_t *  src,
size_t  size,
const struct mpix_format fmt,
bool  truecolor 
)

Print a buffer using terminal escape codes.

Parameters
bufImagme buffer to display in the terminal.
sizeSize of the buffer in bytes.
fmtImage format of the buffer.
truecolorUse higher quality but slower TRUECOLOR instead of 256COLOR escape codes.

◆ mpix_print_ctrls()

void mpix_print_ctrls ( int32_t *  ctrls[])

Print a summary of available controls an their value.

Parameters
ctrlsArray of control to print

◆ mpix_print_op()

void mpix_print_op ( struct mpix_base_op op)

Print details about a signle operation.

Parameters
opOperation to print

◆ mpix_print_pipeline()

void mpix_print_pipeline ( struct mpix_base_op op)

Print details about every operation of a pipeline.

Parameters
opFirst operation of the pipeline

◆ mpix_print_rgb_hist()

void mpix_print_rgb_hist ( const uint16_t *  r_hist,
const uint16_t *  g_hist,
const uint16_t *  b_hist,
size_t  size,
uint16_t  height 
)

Printing RGB histograms to the terminal.

Parameters
r_histBuckets for the red channel.
g_histBuckets for the green channel.
b_histBuckets for the blue channel.
sizeTotal number of buckets in total contained within rgb24hist all channels included.
heightDesired height of the chart in pixels.

◆ mpix_print_stats()

void mpix_print_stats ( struct mpix_stats stats)

Print a representation of the statistics in the console for debug purpose.

Parameters
statsThe statistics to print out.

◆ mpix_print_y_hist()

void mpix_print_y_hist ( const uint16_t *  y8hist,
size_t  size,
uint16_t  height 
)

Printing Y histograms to the terminal.

Parameters
y8histBuffer storing the histogram for the Y (luma) channel.
sizeTotal number of buckets in total contained within hist.
heightDesired height of the chart in pixels.