summaryrefslogtreecommitdiff
path: root/image.h
diff options
context:
space:
mode:
Diffstat (limited to 'image.h')
-rw-r--r--image.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/image.h b/image.h
index ae33ca7..d854fcc 100644
--- a/image.h
+++ b/image.h
@@ -63,6 +63,12 @@ struct image {
void *release_user_data;
};
+/* Reference for white balance. */
+struct image_white_balance_reference {
+ /* White (maximum of each component). */
+ uint8_t r, g, b;
+};
+
/* Allocate an image using system allocator. */
struct image *
image_new(int width, int height, int stride, enum image_format format);
@@ -75,6 +81,20 @@ image_ref(struct image *image);
void
image_unref(struct image *image);
+/* Compute histogram(s), should provide an uint32_t[3][256] array. */
+void
+image_histogram(const struct image *image, uint32_t histogram[3][256]);
+
+/* Calibrate for white balance. */
+void
+image_white_balance_calibrate(const struct image *image,
+ struct image_white_balance_reference *reference);
+
+/* Apply the given white balance. */
+void
+image_white_balance(struct image *image,
+ const struct image_white_balance_reference *reference);
+
/* Copy an image to another one, converting format. */
void
image_convert(struct image *dst, const struct image *src);