Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Least squares on whole images
Replies: 1   Last Post: Mar 23, 2014 9:45 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Adam Chapman

Posts: 171
Registered: 1/12/09
Least squares on whole images
Posted: Mar 22, 2014 6:24 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I'm trying to use least squares to minimise expression (9) http://infoscience.epfl.ch/record/188639/files/ImageDehazing_icip2013.pdf :

(J,t) = argmin || tJ+(1-t)A-Irgb||^2


where t is a single channel image array (mxn), J is an RGB image (mxnx3), and Irgb is a 3-channel image (mxnx3) A is a 3x1 vector.

I'm ignoring the gradient terms in the equation from the original paper for now.

J and t can change, but Irgb and A are constant.

I'm really struggling to formulate this into a format that I can use a least squares method with.

J can be calculated from t and Irgb, so I guess I can reduce the input to just J or t.


This is what I've tried-

I rearranged the expression above to :

|| t(J-A) - (Irgb + A) ||^2


now If I set my input x to equal J-A, and y = (Irgb+A), I would expect y\x to return an estimate of t?

the expression is now in the form: ax-y, where a=t, x=(J-A) and y=Irgb+A;

I've listed the inputs so
x=[Jr(:)-A(1) Jg(:)-A(2) Jr(:)-A(3)];
and
y=[I_R(:)+A(1) I_G(:)+A(2) I_B(:)+A(3)];

where I_R=I(:,:,1), I_G=I(:,:,2) and I_B=I(:,:,2)

y\x is actually giving me a 3x3 matrix and I'm sure my formulating must be wrong somewhere, because I can't multiply my Nx1 vector x by the 3x3 matrix

If anybody can see where I've messed up it would be great if they can let me know.

Thanks
Adam



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.