CPC H04N 23/70 (2023.01) [G06T 7/11 (2017.01); G06T 7/194 (2017.01)] | 20 Claims |
1. A user device for adjusting brightness of a foreground video displayed over a background on a display, the user device comprising:
a camera configured to capture a background frame of the background;
at least one processor configured to:
receive and process the foreground video and the background,
divide the background frame of the background into a plurality of background sub-frames and a foreground video frame of the foreground video into a plurality of foreground sub-frames,
determine an average brightness value of each foreground sub-frame of the plurality of foreground sub-frames and an average brightness value of each background sub-frame of the plurality of background sub-frames,
cluster similar background sub-frames to form a plurality of background sections based on the average brightness value of each background sub-frame,
determine a luminance factor for each background sub-frame of the plurality of background sub-frames,
determine an effective brightness value for each background section of the plurality of background sections based on the luminance factor and the average brightness value of each background sub-frame forming the background section,
determine an enhancement factor for each background section of the plurality of background sections based on the effective brightness value of the background section and an average of the average brightness value of each foreground sub-frame corresponding to each background sub-frame forming the background section,
generate an enhancement mask for each foreground sub-frame of the plurality of foreground sub-frames based on the enhancement factor for the background section corresponding to the foreground sub-frame, and
adjust the average brightness value of each foreground sub-frame of the plurality of foreground sub-frames based on the corresponding enhancement mask to generate an enhanced foreground video frame; and
a display that displays the enhanced foreground video frame over the background on the display of the user device.
|