(George Koubbe) #1

This is what I have so far, but it takes too long and does not even work:

% create a Tiff object and read data from the TIFF file
t = Tiff(‘cguitar.tif’, ‘r’);

``````% display the image
imshow(imageData);
title('corrupted guitar')

% close the Tiff object
close(t);

% get size of image
[l,k] = size(imageData);

% begin our cvx problem
cvx_begin
variables E(l,k) a b c
expression R(l,k)
for i = 1:k
for j = 1:l
if i < 50 && j < 250
E(j,i) == 255
end
a*i + b*j + c >= 0
a*i + b*j + c <= 1
R(j,i) =  a*i + b*j + c;
end
end
minimize (norm(R.*E - imageData))
cvx_end
``````

Any help is greatly appreciated please! I do not know what to do with e(i,j) since I only know the values of the upper left corner. What kind of problem is this? LP?

(Mark L. Stone) #2

This appears to be a school assignment. So you should do most of the work.

As it is, your model involves the multiplication of CVX variables E and {a, b, c} via R, which is not a convex model formulation. I leave it to you, in conjunction with your course instructor how to deal with that and what the intended model is.