pooh_bear
pooh_bear

Reputation: 63

Combine RGB colors from several images

I've several images with different color values, each value is 8-bit value. Every image represents the same frame. I'm trying to sum all images together to get a better picture. I've tried combining the colors using the average of the colors, however the combined picture is too dark. Is there a known algorithm that combines the colors?

Thanks

Upvotes: 1

Views: 1124

Answers (3)

BatyaGG
BatyaGG

Reputation: 734

You have to average colors of each pixel corresponding to each other. Just sum images to each other and then element-wise divide it by number of images. If you want to take some area from one image and others from other you have to slice your matrices and then fill its values to new empty array or array of zeros.

Upvotes: 0

Yoav
Yoav

Reputation: 6098

If the photos are geometrically calibrated (i.e. the camera and the scene were not changed between shots), simply average the value value of each pixel across all images. This will reduce noise, and will keep your result in color.

Upvotes: 0

Peter Sobot
Peter Sobot

Reputation: 2557

It sounds like you're trying to make a greyscale image out of several colour channels. While averaging might work, one standard method is to use log-average luminance:

gray_pixel = 0.27*red + 0.67*green + 0.06*blue

Note that all methods like this try to produce perceived luminance of each colour based on how the average human eye sees images. There are many other constants that produce similar results - see this StackOverflow answer for more info on objective and perceived brightness.

Upvotes: 1

Related Questions