Advertisement
Guest User

Untitled

a guest
May 24th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. int wb_get_average_rgb(whitebalance_t *wb) {
  2. int image_size = SNOOPY_IMAGE_WIDTH * SNOOPY_IMAGE_HEIGHT;
  3. wb_sums_t wbs = {0, 0, 0, 0, 0, 0};
  4. ippReadSumRGBvalues(wbp_obj.sport, &wbs);
  5. // Number of paxels
  6. wb->rgb_average[0] = (wbs.sum1_red / (image_size/4));
  7. wb->rgb_average[1] = (wbs.sum1_green / (image_size/2));
  8. wb->rgb_average[2] = (wbs.sum1_blue / (image_size/4));
  9. DEBUG_PRINT(wb->debug_on, "Average RGB =%d %d %d\n", wb->rgb_average[0], wb->rgb_average[1], wb->rgb_average[2]);
  10. return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement