why this code can't run in my PC but can run in another. it show error about "Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters"
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
R=imread('test.png');
R=rgb2gray(R);
figure(1); imshow(R);
F=[0:255];
gamma1=0.6;
G1=(round(255*(F/255).^gamma1)
gamma2=0.4;
G2=(round(255*(F/255).^gamma2)
R2=uint8(zeros(size(R)));
R3=uint8(zeros(size(R)));
for i=1:numel(R)
R2(i)=G1(R(i)+1);
R3(i)=G2(R(i)+1);
end
figure(2); imshow(R2,[]);
figure(3); imshow(R3);
figure(4); plot(F,G1); xlabel('f(r,c)');ylabel('g(r,c)');
hold on
plot(F,G2);
0 Commenti
Risposte (1)
Sudhakar Shinde
il 3 Nov 2020
Looks like bracket close ')' missing for G1 & G2:
G1=(round(255*(F/255).^gamma1))
G2=(round(255*(F/255).^gamma2))
1 Commento
Vedere anche
Categorie
Scopri di più su Gamma Functions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!