Skip to content
This repository was archived by the owner on May 3, 2025. It is now read-only.

Commit 362e38b

Browse files
authored
Image generation (matlab)
1 parent affe7b0 commit 362e38b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

displayImage.m

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
%% Ler matriz A.
2+
b = load("matrixA.txt");
3+
%%
4+
5+
%% Ler matriz B.
6+
a = load("matrixB.txt");
7+
%%
8+
9+
%% Display da primeira imagem.
10+
figure(1)
11+
%%
12+
13+
%% Passar os pixeis para uma escala de 0 a 1
14+
b=b/2;
15+
%%
16+
17+
imshow(b);
18+
%% Passar os pixeis para uma escala de 0 a 1
19+
a = a/2;
20+
%%
21+
22+
%% Os pixeis que originalmente tinham 0 ficam a preto,
23+
%% os que tinham 1 ficam a cinza e os que tinham 2
24+
%% ficam a branco
25+
figure(2)
26+
%%
27+
imshow(a);

0 commit comments

Comments
 (0)