-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.m
More file actions
76 lines (66 loc) · 1.23 KB
/
Copy pathcode.m
File metadata and controls
76 lines (66 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
a = imread('crop.jpg');
subplot(2,3,1);
imshow(a);
b = rgb2gray(a);
subplot(2,3,2);
imshow(b);
c = im2bw(a);
subplot(2,3,3);
imshow(c);
d = imadjust(b);
subplot(2,3,4);
imshow(d);
e = a;
e=rgb2gray(e);
subplot(2,3,5);
imhist(e);
imfinfo('Gated LP-670.jpg')
[height, width, colour_planes] = size(a)
colormap('spring')
%2. By creating a GUI for the above commands:
%● For histogram
a=getappdata(0,'a');
ahist=a;
ahist=rgb2gray(ahist);
axes(handles.axes1);
imhist(ahist);
%● For rgb to grayscale
a=getappdata(0,'a');
agray=rgb2gray(a);
axes(handles.axes1);
imshow(agray);
%● For upload
a=uigetfile('.jpg')
a=imread(a);
axes(handles.axes1);
imshow(a);
setappdata(0,'a',a)
%● For reset
a=getappdata(0,'a');
axes(handles.axes1);
imshow(a);
%● For Complement
a=getappdata(0,'a');
acomp=a;
acomp=imcomplement(acomp);
axes(handles.axes1);
imshow(acomp);
%● For Edge Direction
a=getappdata(0,'a');
aedge=a;
aedge=rgb2gray(aedge);
aedge=edge(aedge,'Canny')'
axes(handles.axes1);
imshow(aedge);
%● For clockwise
a=getappdata(0,'a');
aclock=a;
aclock=imrotate(aclock,270);
axes(handles.axes1);
imshow(aclock)
%● For anticlockwise
a=getappdata(0,'a');
aclock=a;
aclock=imrotate(aclock,90);
axes(handles.axes1);
imshow(aclock);