1
00:00:15,000 --> 00:00:24,000
For friends today I will tell you how to use lab view for image processing.

2
00:00:25,000 --> 00:00:28,000
For that purpose you have to install.

3
00:00:30,000 --> 00:00:37,000
Reason and motion toolbox to your left.

4
00:00:37,000 --> 00:00:37,000
You.

5
00:00:38,000 --> 00:00:51,000
So in this, as you see on the block diagram window and functional palette, I have within motion toolbox

6
00:00:51,000 --> 00:00:53,000
as you see over here.

7
00:00:53,000 --> 00:00:55,000
This is my vision in motion.

8
00:00:55,000 --> 00:01:00,000
So I just locate over here for image processing.

9
00:01:01,000 --> 00:01:08,000
I just need this one within utility and image processing toolbox.

10
00:01:08,000 --> 00:01:09,000
Okay.

11
00:01:09,000 --> 00:01:19,000
If I go to our front panel window over here, also, you can find out the reason tool box.

12
00:01:20,000 --> 00:01:28,000
As you see over here, this is a reason tool for the image processing.

13
00:01:28,000 --> 00:01:33,000
I'll just go to our diagram window over here.

14
00:01:33,000 --> 00:01:38,000
First we have to save our image.

15
00:01:38,000 --> 00:01:41,000
So let's go to.

16
00:01:42,000 --> 00:01:52,000
Image reason utilities, image management or here you can find out I make you create.

17
00:01:53,000 --> 00:02:03,000
It is just like other like in the data acquisition case, we just create a channel.

18
00:02:03,000 --> 00:02:05,000
So over here, create a.

19
00:02:06,000 --> 00:02:07,000
Image.

20
00:02:08,000 --> 00:02:14,000
Okay, so over here to save an image, you have to just create a constant.

21
00:02:14,000 --> 00:02:20,000
So let's say my input image name is my name.

22
00:02:22,000 --> 00:02:22,000
Salim.

23
00:02:23,000 --> 00:02:36,000
And over here you can select the type or here you can find out like gray unsigned eight X ranges to

24
00:02:36,000 --> 00:02:47,000
raise to eight that is maximum to five five then greyscale integer 16 and other formats also available.

25
00:02:47,000 --> 00:02:55,000
I just use in this case create scale view eight unsigned integer state.

26
00:02:55,000 --> 00:03:01,000
Okay, so next I have to read five.

27
00:03:02,000 --> 00:03:11,000
So for the read file I just go back in the files or here you can.

28
00:03:12,000 --> 00:03:13,000
Find out.

29
00:03:13,000 --> 00:03:15,000
I make you read.

30
00:03:15,000 --> 00:03:19,000
Why do you have to just drag and drop over here?

31
00:03:20,000 --> 00:03:25,000
So connect new image to the image, as you see.

32
00:03:26,000 --> 00:03:30,000
And over here, you have to create a path.

33
00:03:30,000 --> 00:03:31,000
So to create a path.

34
00:03:32,000 --> 00:03:36,000
I just go to strings and file control path.

35
00:03:37,000 --> 00:03:41,000
So I just name it input.

36
00:03:43,000 --> 00:03:46,000
So just to go back, connect this.

37
00:03:48,000 --> 00:03:52,000
So it will take the part of image.

38
00:03:53,000 --> 00:03:56,000
And over here, this is the used file part.

39
00:03:56,000 --> 00:03:57,000
Image type.

40
00:03:58,000 --> 00:04:01,000
So create a constant right now.

41
00:04:01,000 --> 00:04:02,000
Just make it true.

42
00:04:04,000 --> 00:04:14,000
So next in this, I just use a classic image to display the image.

43
00:04:14,000 --> 00:04:23,000
So just go back over here in the vision toolbox you can find out image display classic.

44
00:04:24,000 --> 00:04:35,000
I just put it over here and this is my real image, so I just make it real.

45
00:04:36,000 --> 00:04:45,000
Okay, so more here, I just go back and connect it to the.

46
00:04:46,000 --> 00:04:47,000
Image.

47
00:04:47,000 --> 00:04:49,000
So go back.

48
00:04:50,000 --> 00:04:57,000
Select the image right now in the pictures or here, this is my image.

49
00:04:58,000 --> 00:04:59,000
I just select the part.

50
00:05:00,000 --> 00:05:07,000
So as you see and when I hit on run button you can check it is Zoom.

51
00:05:07,000 --> 00:05:10,000
So I just zoom.

52
00:05:11,000 --> 00:05:14,000
So as you see over here, I got the image.

53
00:05:15,000 --> 00:05:20,000
So this is how you can acquire image using LED view.

54
00:05:21,000 --> 00:05:24,000
Now this image.

55
00:05:26,000 --> 00:05:27,000
How pixels.

56
00:05:27,000 --> 00:05:31,000
So I want to work with the pixels.

57
00:05:31,000 --> 00:05:33,000
So I just go back.

58
00:05:34,000 --> 00:05:35,000
Two images.

59
00:05:35,000 --> 00:05:38,000
So now we have a match.

60
00:05:39,000 --> 00:05:40,000
Of real.

61
00:05:40,000 --> 00:05:42,000
Right now in this.

62
00:05:42,000 --> 00:05:46,000
If you make it false, then.

63
00:05:47,000 --> 00:05:50,000
Check out how the image behave.

64
00:05:50,000 --> 00:05:54,000
So it is great image over here as you see.

65
00:05:54,000 --> 00:05:59,000
And if I make it due then I got.

66
00:06:00,000 --> 00:06:03,000
Colorful image, as you see.

67
00:06:03,000 --> 00:06:07,000
So right now, I just make it false.

68
00:06:07,000 --> 00:06:11,000
So here I have my real image.

69
00:06:12,000 --> 00:06:15,000
Then I want to work with pixels.

70
00:06:15,000 --> 00:06:19,000
So for that purpose, go to these new realities.

71
00:06:19,000 --> 00:06:20,000
Pixel manipulation.

72
00:06:21,000 --> 00:06:23,000
Or here you have image.

73
00:06:24,000 --> 00:06:26,000
I make you image to edit.

74
00:06:26,000 --> 00:06:35,000
So I want to just convert this image to edit.

75
00:06:35,000 --> 00:06:38,000
So for that purpose, I make it.

76
00:06:39,000 --> 00:06:43,000
Control edge and over here on the top image pixels.

77
00:06:43,000 --> 00:06:46,000
You eight we got.

78
00:06:46,000 --> 00:06:54,000
So I just create an indicator for that I go to the array and you see two parallel lines are there.

79
00:06:55,000 --> 00:07:01,000
So I'm also creating labels for this so visible item label.

80
00:07:02,000 --> 00:07:04,000
So you so that you can see.

81
00:07:05,000 --> 00:07:08,000
So again over here, visible item labels.

82
00:07:12,000 --> 00:07:12,000
Again.

83
00:07:13,000 --> 00:07:15,000
Visible items, labels.

84
00:07:16,000 --> 00:07:17,000
So now.

85
00:07:18,000 --> 00:07:19,000
Photo.

86
00:07:21,000 --> 00:07:26,000
Are fentanyl and or here you can see.

87
00:07:27,000 --> 00:07:28,000
There is Eddie.

88
00:07:28,000 --> 00:07:37,000
And in this image I have 4608 columns and three, four, five, six roads.

89
00:07:37,000 --> 00:07:47,000
So when I hit on the button, as you see over here, according to the color, I got different metrics

90
00:07:47,000 --> 00:07:47,000
value.

91
00:07:47,000 --> 00:07:50,000
Basically, this is a pixel value.

92
00:07:50,000 --> 00:07:56,000
So over here you can put like 4600.

93
00:07:56,000 --> 00:07:58,000
Let's say this is a row.

94
00:07:58,000 --> 00:08:01,000
So I put 3400.

95
00:08:01,000 --> 00:08:06,000
And over here I just put 4600.

96
00:08:07,000 --> 00:08:10,000
So here you can find out.

97
00:08:10,000 --> 00:08:12,000
And if you drag it.

98
00:08:12,000 --> 00:08:15,000
So let's check.

99
00:08:17,000 --> 00:08:19,000
I like to increase the size of this.

100
00:08:21,000 --> 00:08:23,000
So let's see.

101
00:08:24,000 --> 00:08:25,000
I am increasing this.

102
00:08:29,000 --> 00:08:30,000
For Tottenham of.

103
00:08:31,000 --> 00:08:33,000
Because art, as you see.

104
00:08:35,000 --> 00:08:36,000
Six.

105
00:08:37,000 --> 00:08:38,000
Okay.

106
00:08:39,000 --> 00:08:40,000
So.

107
00:08:40,000 --> 00:08:42,000
And the number of columns are.

108
00:08:45,000 --> 00:08:46,000
So this is my last element.

109
00:08:47,000 --> 00:08:49,000
So from here, you can check.

110
00:08:50,000 --> 00:08:50,000
Okay.

111
00:08:50,000 --> 00:08:52,000
So this is my.

112
00:08:53,000 --> 00:08:55,000
Matrix for me.

113
00:08:55,000 --> 00:08:56,000
Image.

114
00:08:57,000 --> 00:08:59,000
Then I just go back.

115
00:09:00,000 --> 00:09:03,000
Right now I want to check.

116
00:09:04,000 --> 00:09:10,000
Or I want individual value or I want to convert this image.

117
00:09:11,000 --> 00:09:12,000
Going negative.

118
00:09:13,000 --> 00:09:16,000
And after that, I want to flip it.

119
00:09:16,000 --> 00:09:18,000
So for that purpose.

120
00:09:18,000 --> 00:09:25,000
I want to convert this you eight means pixel value.

121
00:09:25,000 --> 00:09:28,000
I'm using these pixel value.

122
00:09:30,000 --> 00:09:35,000
So for that purpose, I just using a nested loop.

123
00:09:36,000 --> 00:09:41,000
So in my previous videos you can check out what is next to do.

124
00:09:41,000 --> 00:09:49,000
So you have to connect this view eight or here this is my unit.

125
00:09:49,000 --> 00:09:50,000
Connect to the edge.

126
00:09:51,000 --> 00:09:52,000
And when you connect.

127
00:09:54,000 --> 00:09:57,000
To be added to the edge of for loop.

128
00:09:58,000 --> 00:10:05,000
The auto indexing tunnel is automatically turned on in default mode.

129
00:10:05,000 --> 00:10:06,000
So or here.

130
00:10:07,000 --> 00:10:10,000
So right now I'm using weight.

131
00:10:10,000 --> 00:10:12,000
So for that purpose, I want to.

132
00:10:15,000 --> 00:10:18,000
I get a negative of this image.

133
00:10:18,000 --> 00:10:20,000
So for that purpose you go to numeric.

134
00:10:21,000 --> 00:10:24,000
Subtract this value comma.

135
00:10:26,000 --> 00:10:27,000
Two, five, five.

136
00:10:28,000 --> 00:10:31,000
Because the maximum value for you it.

137
00:10:32,000 --> 00:10:36,000
Unsigned integer is 255.

138
00:10:36,000 --> 00:10:41,000
So just connect to the edge then.

139
00:10:41,000 --> 00:10:42,000
Or here again.

140
00:10:42,000 --> 00:10:49,000
I got the pixel value that is subtracted from 255 which will give me a negative.

141
00:10:49,000 --> 00:10:55,000
So I again use area to image function over here.

142
00:10:56,000 --> 00:10:57,000
So I just.

143
00:11:00,000 --> 00:11:01,000
Visible.

144
00:11:01,000 --> 00:11:01,000
It's.

145
00:11:04,000 --> 00:11:06,000
Label and you see.

146
00:11:07,000 --> 00:11:08,000
So connect this.

147
00:11:11,000 --> 00:11:12,000
Check first.

148
00:11:13,000 --> 00:11:13,000
It is a.

149
00:11:16,000 --> 00:11:16,000
You.

150
00:11:16,000 --> 00:11:18,000
It is over here.

151
00:11:18,000 --> 00:11:19,000
Okay.

152
00:11:19,000 --> 00:11:21,000
Now again, I have to create.

153
00:11:22,000 --> 00:11:23,000
Image.

154
00:11:23,000 --> 00:11:26,000
I want to save that image for that purpose.

155
00:11:26,000 --> 00:11:39,000
I just drag and copy this so my image is saved for let's see, name me because the name of this file

156
00:11:39,000 --> 00:11:40,000
and this file should be different.

157
00:11:41,000 --> 00:11:45,000
So I'll just connect this to this image.

158
00:11:45,000 --> 00:11:48,000
And over here, I got my.

159
00:11:49,000 --> 00:11:50,000
Negative.

160
00:11:52,000 --> 00:11:53,000
So.

161
00:11:54,000 --> 00:11:55,000
Let's be clear here.

162
00:11:55,000 --> 00:12:01,000
This is my negative or my particular image.

163
00:12:02,000 --> 00:12:03,000
So connect this.

164
00:12:06,000 --> 00:12:06,000
As you see.

165
00:12:07,000 --> 00:12:10,000
Well, let's go to panel.

166
00:12:17,000 --> 00:12:20,000
So when I hit on on button.

167
00:12:23,000 --> 00:12:24,000
As you see.

168
00:12:25,000 --> 00:12:30,000
Let's say I just make it through and.

169
00:12:31,000 --> 00:12:32,000
When I hit on the button.

170
00:12:35,000 --> 00:12:38,000
There are some problem in the immediate region.

171
00:12:42,000 --> 00:12:43,000
If my word.

172
00:12:57,000 --> 00:12:58,000
Everything is right.

173
00:12:58,000 --> 00:13:00,000
So, again, just.

174
00:13:01,000 --> 00:13:07,000
Google or here I just use positive symbol, so just delete it.

175
00:13:07,000 --> 00:13:10,000
I want to subtract, not add.

176
00:13:12,000 --> 00:13:12,000
Okay.

177
00:13:13,000 --> 00:13:14,000
Because I want to subtract.

178
00:13:16,000 --> 00:13:21,000
From 255 my particular value and it will give me the result.

179
00:13:23,000 --> 00:13:23,000
Again.

180
00:13:24,000 --> 00:13:26,000
Invented image type.

181
00:13:26,000 --> 00:13:29,000
So I just make it false.

182
00:13:29,000 --> 00:13:37,000
And when I hit on a button, as you see, or here, this is my image and this is my negative image,

183
00:13:37,000 --> 00:13:43,000
it directly make negative to positive, start to positive.

184
00:13:43,000 --> 00:13:45,000
As you see over here.

185
00:13:45,000 --> 00:13:45,000
This is dark.

186
00:13:46,000 --> 00:13:46,000
This is.

187
00:13:48,000 --> 00:13:55,000
Our hair in this case is white, so it will convert black to white or white to black.

188
00:13:55,000 --> 00:14:05,000
So because in this image processing, let's say zero denotes white and 255 denotes black.

189
00:14:05,000 --> 00:14:08,000
So when we subtract from 255.

190
00:14:08,000 --> 00:14:09,000
So it will convert.

191
00:14:10,000 --> 00:14:12,000
The image from white to black.

192
00:14:13,000 --> 00:14:13,000
Okay.

193
00:14:13,000 --> 00:14:17,000
So as you see over here, we have a negative image.

194
00:14:17,000 --> 00:14:23,000
Then after this, I want to also flip this.

195
00:14:23,000 --> 00:14:27,000
So for flipping, I again use.

196
00:14:28,000 --> 00:14:29,000
And this loop.

197
00:14:29,000 --> 00:14:32,000
I just go for a nested loop.

198
00:14:34,000 --> 00:14:37,000
Nested for loop, as you see.

199
00:14:37,000 --> 00:14:42,000
And this is my pixel value and I want to just reverse it.

200
00:14:43,000 --> 00:14:46,000
So go to arrays and or here.

201
00:14:47,000 --> 00:14:49,000
I was one dimensional.

202
00:14:49,000 --> 00:14:54,000
Okay, so just like, what's it?

203
00:14:55,000 --> 00:15:03,000
Or you can say in this case, I'm just not using this to loop in case all this.

204
00:15:03,000 --> 00:15:04,000
I'm just.

205
00:15:05,000 --> 00:15:11,000
It was one time because inside for loop, if you connect to the dimensional array, it will.

206
00:15:12,000 --> 00:15:16,000
So after this, it will convert two dimensional area to one dimensional.

207
00:15:16,000 --> 00:15:17,000
So as you see.

208
00:15:19,000 --> 00:15:20,000
So what?

209
00:15:20,000 --> 00:15:23,000
Here, I just copy it.

210
00:15:24,000 --> 00:15:26,000
And this is my flip.

211
00:15:27,000 --> 00:15:28,000
Image

212
00:15:31,000 --> 00:15:32,000
connected.

213
00:15:35,000 --> 00:15:40,000
It is not connecting to this because I want to.

214
00:15:41,000 --> 00:15:42,000
Connect this.

215
00:15:43,000 --> 00:15:43,000
Using.

216
00:15:45,000 --> 00:15:48,000
First I want to convert this area to image.

217
00:15:49,000 --> 00:15:50,000
It's been this.

218
00:15:52,000 --> 00:15:56,000
Connect this, and I also want to save it.

219
00:15:57,000 --> 00:16:02,000
So let's say this and in this case.

220
00:16:05,000 --> 00:16:05,000
They?

221
00:16:07,000 --> 00:16:13,000
SC Okay, so just name it and this.

222
00:16:14,000 --> 00:16:16,000
Yeah, I got my flip.

223
00:16:17,000 --> 00:16:18,000
Image.

224
00:16:18,000 --> 00:16:23,000
So that's what happened to my image.

225
00:16:23,000 --> 00:16:24,000
So when I hit on run button.

226
00:16:26,000 --> 00:16:30,000
And you see or hear, this is my actual grade image.

227
00:16:30,000 --> 00:16:33,000
Then I got a negative.

228
00:16:33,000 --> 00:16:37,000
Then I got a flip image in lab view.

229
00:16:37,000 --> 00:16:41,000
So over here, using these functions, you can.

230
00:16:43,000 --> 00:16:46,000
Use image processing toolbox in live view.

231
00:16:46,000 --> 00:16:47,000
Thank you.

