Color Average and Variance adjustment

1 回表示 (過去 30 日間)
Maria Jeseca Baculo
Maria Jeseca Baculo 2018 年 7 月 31 日
Hi! I am working on a project that requires the adjustment of color average and variance of an image based on another image. This is the sample image. I want to adjust the color average and variance of the umbra region based on the values of the sunshine region.
I got the average and variance of the images using:
mean_sunshine=mean2(nonzeros(sunshine{1}))
var_sunshine=var(nonzeros(double(sunshine{1})))
mean_umbra=mean2(nonzeros(umbra{1}))
var_umbra=var(nonzeros(double(umbra{1})))
How to I perform the adjustments after computation? Thanks :)

回答 (1 件)

Image Analyst
Image Analyst 2018 年 7 月 31 日
Just do something within the mask, for example
yourImage(mask) = slope * yourImage(mask) + offset;
  1 件のコメント
Maria Jeseca Baculo
Maria Jeseca Baculo 2018 年 7 月 31 日
Thanks, but is there a solution similar to your answer in https://www.mathworks.com/matlabcentral/answers/31510-how-to-change-mean-and-variance-values-in-image that would be applicable in my case?

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by