How to write a matlab program to implement a curved tranform to transform a grayscale image?
up vote
-1
down vote
favorite
How to implement the transform in matlab given in the picture to get the output image as shown?
I tried to code but failed miserably.
I = imread('lena.jpg');
I = im2double(I);
[m n] = size(I);
J = ones(256);
alpha = 10;
beta = 10;
for i = 1 : m
for j = 1 : n
Z = (((1-beta)*5 + beta*50)*sin(alpha*180));
M = (((1-alpha)*5 + alpha*5)*sin(beta*180));
x = i + Z;
y = j + M;
J(abs(round(x))+1,abs(round(y))+1) = I(i,j);
%disp(x);
end
end
imshow(J);
image matlab
add a comment |
up vote
-1
down vote
favorite
How to implement the transform in matlab given in the picture to get the output image as shown?
I tried to code but failed miserably.
I = imread('lena.jpg');
I = im2double(I);
[m n] = size(I);
J = ones(256);
alpha = 10;
beta = 10;
for i = 1 : m
for j = 1 : n
Z = (((1-beta)*5 + beta*50)*sin(alpha*180));
M = (((1-alpha)*5 + alpha*5)*sin(beta*180));
x = i + Z;
y = j + M;
J(abs(round(x))+1,abs(round(y))+1) = I(i,j);
%disp(x);
end
end
imshow(J);
image matlab
I have no idea about what the values of alpha and beta doing here, I just tried to code it.
– Zubair J.
Nov 18 at 14:31
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
How to implement the transform in matlab given in the picture to get the output image as shown?
I tried to code but failed miserably.
I = imread('lena.jpg');
I = im2double(I);
[m n] = size(I);
J = ones(256);
alpha = 10;
beta = 10;
for i = 1 : m
for j = 1 : n
Z = (((1-beta)*5 + beta*50)*sin(alpha*180));
M = (((1-alpha)*5 + alpha*5)*sin(beta*180));
x = i + Z;
y = j + M;
J(abs(round(x))+1,abs(round(y))+1) = I(i,j);
%disp(x);
end
end
imshow(J);
image matlab
How to implement the transform in matlab given in the picture to get the output image as shown?
I tried to code but failed miserably.
I = imread('lena.jpg');
I = im2double(I);
[m n] = size(I);
J = ones(256);
alpha = 10;
beta = 10;
for i = 1 : m
for j = 1 : n
Z = (((1-beta)*5 + beta*50)*sin(alpha*180));
M = (((1-alpha)*5 + alpha*5)*sin(beta*180));
x = i + Z;
y = j + M;
J(abs(round(x))+1,abs(round(y))+1) = I(i,j);
%disp(x);
end
end
imshow(J);
image matlab
image matlab
edited Nov 18 at 17:00
James Z
11.1k71735
11.1k71735
asked Nov 18 at 14:22
Zubair J.
154
154
I have no idea about what the values of alpha and beta doing here, I just tried to code it.
– Zubair J.
Nov 18 at 14:31
add a comment |
I have no idea about what the values of alpha and beta doing here, I just tried to code it.
– Zubair J.
Nov 18 at 14:31
I have no idea about what the values of alpha and beta doing here, I just tried to code it.
– Zubair J.
Nov 18 at 14:31
I have no idea about what the values of alpha and beta doing here, I just tried to code it.
– Zubair J.
Nov 18 at 14:31
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53361900%2fhow-to-write-a-matlab-program-to-implement-a-curved-tranform-to-transform-a-gray%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I have no idea about what the values of alpha and beta doing here, I just tried to code it.
– Zubair J.
Nov 18 at 14:31