Image reconstruction
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
http://www.flickr.com/photos/58977081@N02/5579460185/ Dear all I am currently doing the last part of my project, My project is to create the high resolution image, so as described as above, I have implemented a code for the ak function like
function piecewise=piecew(x)
z = mod(x,2)-1;
piecewise=abs(1-abs(z)).*(abs(z)<1);
end
for those I1(x-x1,y-y1),I2(x-x2,y-y2)....Ik(x-xk,y-yk) noted that x1,y1,x2......yk are the shifts on each images. so how can I use the piecew(x) function to construct a high resolution code ? thanks
0 Kommentare
Antworten (1)
Walter Roberson
am 1 Apr. 2011
mod(x,2) is zero if and only if x is an integer multiple of 2; otherwise, mod(x,2) is a number larger than 0. z = mod(x,2)-1 thus reaches its minimum, -1 if x is an integer multiple of 2 and reaches its maximum (2-delta)-1 = 1-delta at limit(delta->0, delta>0, x+delta is an integer multiple of 2). -1 <= z < 1 .
abs(z) is thus 1 if and only if x is an integer multiple of 2, and is less than 1 otherwise. Hence abs(z)<1 is false (0) if and only if x is an integer multiple of 2, and is true (1) otherwise.
abs(z) decreases from 1 as x increases away from an integer multiple of 2, reaching minimum of 0 at x-1 being an integer multiple of 2, and increasing again to 1-delta as x approaches the next multiple of 2.
Hence 1-abs(z) increases from 0 as x increases away from an integer multiple of 2, reaching 1 when x-1 is an integer multiple of 2, and decreases again to delta as x approaches the next multiple of 2. None of these values are negative so abs(1-abs(z)) has the same behavior.
The effect of multiplying the above expression by a number that is 0 when x is an integer multiple of 2 is nothing, as the value is already 0 when that is the case. The overall expression can thus be reduced to
1-abs(mod(x,2)-1)
As analyzed above, this expresion is 0 when x is an integer multiple of 2, is mod(x,2) when mod(x,2) <= 1, and is 1-mod(x,2) for mod(x,2) > 1
This function is not 1-periodic as is required by the problem definition paper: it is 2-periodic instead. You would have to work with z = mod(2*x,2)-1 instead to make it 1-periodic, and if you are going to do that you might as well rebuild the function from scratch.
2 Kommentare
Walter Roberson
am 4 Apr. 2011
No, 1-abs(mod(x,2)-1) is the _same_ as your function, and has the same problem as your function: it is 2-periodic instead of 1-periodic. You need to find a new function that is 1-periodic.
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!