Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int wb_get_average_rgb(whitebalance_t *wb) {
- int image_size = SNOOPY_IMAGE_WIDTH * SNOOPY_IMAGE_HEIGHT;
- wb_sums_t wbs = {0, 0, 0, 0, 0, 0};
- ippReadSumRGBvalues(wbp_obj.sport, &wbs);
- // Number of paxels
- wb->rgb_average[0] = (wbs.sum1_red / (image_size/4));
- wb->rgb_average[1] = (wbs.sum1_green / (image_size/2));
- wb->rgb_average[2] = (wbs.sum1_blue / (image_size/4));
- DEBUG_PRINT(wb->debug_on, "Average RGB =%d %d %d\n", wb->rgb_average[0], wb->rgb_average[1], wb->rgb_average[2]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement