WEBVTT

NOTE
Part 8   Software Control
Transcript by BioGeeks: https://biogeeks.org/videos/C9uZGza77yQ

1
00:00:00.620 --> 00:00:04.740
Welcome back to the Tucsen Mastering Scientific Cameras course.

2
00:00:06.060 --> 00:00:08.680
This is part eight, software control.

3
00:00:09.100 --> 00:00:12.280
And in this part, we're going to be taking a bit of a step back from this process

4
00:00:12.280 --> 00:00:17.840
and thinking about what software we are using to control the camera at essentially every stage.

5
00:00:18.420 --> 00:00:20.860
The software, depending on what it is and what we're doing,

6
00:00:21.120 --> 00:00:26.920
might also be controlling analysis workflows or even other hardware within our optical setup as well.

7
00:00:27.740 --> 00:00:31.280
We'll also be looking at some of the essential camera controls,

8
00:00:31.780 --> 00:00:37.900
a bit of a checklist of essential camera controls to make sure that we've optimised each time we're imaging.

9
00:00:38.380 --> 00:00:45.040
These are the controls that you always want to make sure they have values that are appropriate for what you're doing each time you image.

10
00:00:46.120 --> 00:00:51.040
So first off, we're going to have a look at some of the different control software options,

11
00:00:51.040 --> 00:00:53.080
which are available to control cameras.

12
00:00:53.080 --> 00:00:57.060
Broadly speaking, we can divide these into four categories.

13
00:00:58.020 --> 00:01:02.720
First off, we have camera control software made by camera manufacturers.

14
00:01:03.200 --> 00:01:08.480
This might be the simplest and easiest way to get set up and get imaging,

15
00:01:09.060 --> 00:01:14.440
but typically this won't offer things like control over multiple other pieces of hardware

16
00:01:14.440 --> 00:01:18.480
or really advanced analysis and this kind of thing.

17
00:01:18.480 --> 00:01:22.780
But what it will offer is all of the controls of the camera,

18
00:01:23.180 --> 00:01:25.700
easily accessible and user-friendly,

19
00:01:26.100 --> 00:01:32.320
with perhaps some basic image enhancements, analysis or measurement tools thrown in there.

20
00:01:32.800 --> 00:01:36.280
A good example of this is Mosaic from Tucsen,

21
00:01:36.420 --> 00:01:39.760
which in fact is a little bit more powerful than these softwares tends to be.

22
00:01:39.760 --> 00:01:43.840
It's a very nice piece of software, both easy to use and powerful.

23
00:01:43.840 --> 00:01:52.660
Next, we have more general-use custom programmable software, such as LabVIEW and MATLAB.

24
00:01:52.660 --> 00:01:58.760
And in these cases, these softwares allow you to design your own experimental workflows,

25
00:01:58.760 --> 00:02:02.680
both on the acquisition side and on the analysis side,

26
00:02:02.680 --> 00:02:05.740
and then cameras can be integrated into those workflows.

27
00:02:05.740 --> 00:02:14.890
Next, we have microscopy-specific software, such as Micromanager, which is free and open source,

28
00:02:14.890 --> 00:02:19.210
or Metamorph, or software from microscope companies themselves.

29
00:02:19.770 --> 00:02:25.410
And in this case, these softwares tend to be able to control all the different automatable hardware

30
00:02:25.410 --> 00:02:27.770
that microscopes can offer.

31
00:02:27.770 --> 00:02:35.030
And this will make things much simpler and easier if you are running a microscope,

32
00:02:35.030 --> 00:02:41.670
because they'll have microscopy-specific workflows, analysis routines, experimental design tools,

33
00:02:41.730 --> 00:02:42.950
and all of this kind of thing.

34
00:02:45.150 --> 00:02:50.990
And then finally, for the truly custom option, we have integration into your own software,

35
00:02:51.250 --> 00:02:57.050
whether that's an existing piece of software or a new software that you're designing around an application.

36
00:02:57.050 --> 00:03:04.010
The software development kit, SDK, allows programmatical access to the camera

37
00:03:04.010 --> 00:03:08.690
in various languages, including C, C++, and C-sharp.

38
00:03:13.420 --> 00:03:17.740
Starting off with camera control software from the camera manufacturer,

39
00:03:18.380 --> 00:03:23.400
this will typically be free with the camera, offering basic camera control and capture.

40
00:03:24.140 --> 00:03:28.260
Some image enhancement tools and some analysis tools might be built in.

41
00:03:28.260 --> 00:03:33.180
But Mosaic is a really good example of this.

42
00:03:33.520 --> 00:03:36.700
It's got a really nice, simple, intuitive GUI.

43
00:03:37.800 --> 00:03:41.200
You can review captured images and make alterations,

44
00:03:41.460 --> 00:03:45.580
like brightness, contrast, and tinting images that were acquired in black and white.

45
00:03:45.720 --> 00:03:49.000
But in fact, we want them to have a specific color,

46
00:03:49.220 --> 00:03:52.100
representing, for example, the wavelength that we acquired them with.

47
00:03:52.100 --> 00:03:57.340
And we have some powerful analysis and acquisition tools built in,

48
00:03:57.480 --> 00:04:01.640
including multi-channel acquisition, tint and merge,

49
00:04:01.940 --> 00:04:06.320
for building up multi-channel images with monochrome cameras.

50
00:04:07.440 --> 00:04:12.500
And also, these quite advanced tools, such as an auto-counting algorithm,

51
00:04:13.500 --> 00:04:16.140
real-time image stitching, which is really powerful.

52
00:04:16.140 --> 00:04:20.900
If you move your large sample around with your stage on a microscope,

53
00:04:21.720 --> 00:04:24.240
the camera can be running in real-time,

54
00:04:24.820 --> 00:04:27.660
automatically stitching together a large-scale image

55
00:04:27.660 --> 00:04:30.400
to represent fields of view massively larger

56
00:04:30.400 --> 00:04:33.280
than what the camera can represent in one single image.

57
00:04:33.620 --> 00:04:35.000
This is a very powerful tool.

58
00:04:35.000 --> 00:04:39.680
And finally, we have a similar real-time tool

59
00:04:39.680 --> 00:04:43.100
for doing this same process, but with depth of field,

60
00:04:43.580 --> 00:04:50.260
where our focal plane will only represent a certain area

61
00:04:50.260 --> 00:04:53.620
of a three-dimensional sample.

62
00:04:53.940 --> 00:04:56.340
Only a certain area will be in focus.

63
00:04:56.980 --> 00:05:00.560
But we can sweep up and down a three-dimensional sample

64
00:05:00.560 --> 00:05:04.740
and build up an enhanced depth-of-field image

65
00:05:04.740 --> 00:05:08.000
simply by moving up and down through our sample.

66
00:05:08.780 --> 00:05:11.140
And the software will stitch that together in real-time.

67
00:05:13.260 --> 00:05:15.580
For general-use programmable software,

68
00:05:16.660 --> 00:05:20.540
such as National Instruments LabVIEW and MathWorks MATLAB,

69
00:05:21.020 --> 00:05:23.760
these can be hugely versatile pieces of software.

70
00:05:24.280 --> 00:05:28.620
LabVIEW, if you're familiar, has this more graphical interface

71
00:05:28.620 --> 00:05:30.980
and MATLAB is more programming-based.

72
00:05:31.620 --> 00:05:33.780
But in both cases, they're really good

73
00:05:33.780 --> 00:05:35.580
if you need to control lots of hardware

74
00:05:35.580 --> 00:05:38.760
or drive optical bench equipment like Piezo's

75
00:05:38.760 --> 00:05:42.360
and similar things, maybe driving lasers.

76
00:05:44.080 --> 00:05:47.140
And camera acquisition can be directly integrated then

77
00:05:47.140 --> 00:05:49.080
into analysis pipelines as well.

78
00:05:49.200 --> 00:05:52.080
So you can have one click to run an entire experiment

79
00:05:52.080 --> 00:05:56.320
versus having to acquire data in a separate program

80
00:05:56.320 --> 00:05:57.560
and then import it.

81
00:05:57.560 --> 00:05:59.600
We can still do that, of course,

82
00:05:59.700 --> 00:06:02.020
but we also have the option to directly integrate

83
00:06:02.020 --> 00:06:03.680
our camera with our analysis.

84
00:06:04.900 --> 00:06:07.320
We can also have complete flexibility

85
00:06:07.320 --> 00:06:09.960
to design our own algorithms

86
00:06:09.960 --> 00:06:12.860
and perform our own mathematical operations

87
00:06:12.860 --> 00:06:13.700
that we need to perform

88
00:06:13.700 --> 00:06:16.360
to analyze the images that we've captured.

89
00:06:21.040 --> 00:06:23.540
Next, we have microscope control software.

90
00:06:24.200 --> 00:06:27.180
And this really allows us to get the most out of the microscope

91
00:06:27.180 --> 00:06:30.180
and the common microscopy hardware that we might be using.

92
00:06:30.180 --> 00:06:34.640
Again, we have these three examples here,

93
00:06:34.640 --> 00:06:38.520
but there are multiple microscope control softwares on the market

94
00:06:38.520 --> 00:06:42.600
from different microscope companies.

95
00:06:42.600 --> 00:06:48.790
And in general, we can control automated microscope components

96
00:06:48.790 --> 00:06:52.110
with these softwares and integrate that into our camera acquisition.

97
00:06:52.110 --> 00:06:57.150
So for example, if we want to drive a Z stage to move up and down

98
00:06:57.150 --> 00:06:59.810
through a sample in an automated way,

99
00:06:59.810 --> 00:07:03.070
this microscope control software can manage that automatically

100
00:07:03.070 --> 00:07:08.090
to move up, acquire an image, move up, acquire an image, etc.

101
00:07:09.530 --> 00:07:12.110
It tends to be powerful and user-friendly software

102
00:07:12.110 --> 00:07:15.070
for anyone from casual users to experts

103
00:07:15.070 --> 00:07:18.870
with features that can be suited

104
00:07:18.870 --> 00:07:22.890
to a number of different common applications in microscopy.

105
00:07:22.890 --> 00:07:28.290
We can really unlock the true potential of microscope equipment

106
00:07:28.290 --> 00:07:32.430
by using it with software that's designed for it.

107
00:07:36.120 --> 00:07:39.780
We have general use microscopy software from free packages

108
00:07:39.780 --> 00:07:43.540
to paid packages, and we also have software

109
00:07:43.540 --> 00:07:45.120
from microscope manufacturers.

110
00:07:49.410 --> 00:07:52.690
And finally, we have the custom software with the SDK.

111
00:07:53.790 --> 00:07:57.010
Essentially, tux and cameras don't have to be just used

112
00:07:57.010 --> 00:07:58.610
with off-the-shelf software.

113
00:07:58.610 --> 00:08:02.850
You can also write your own software using the SDK,

114
00:08:02.850 --> 00:08:06.390
the software development kit, to integrate that software

115
00:08:06.390 --> 00:08:09.490
and interface that software with the cameras.

116
00:08:11.270 --> 00:08:17.070
Most cameras allow operation via C, C++ or C sharp commands.

117
00:08:17.650 --> 00:08:21.110
And this allows you to access only the functions

118
00:08:21.110 --> 00:08:23.870
and controls of the camera that you need to make software

119
00:08:23.870 --> 00:08:26.790
that's simpler and more efficiently designed

120
00:08:26.790 --> 00:08:29.750
for your particular application and your particular workflows.

121
00:08:31.780 --> 00:08:33.740
If you're using cameras as an OEM

122
00:08:33.740 --> 00:08:35.400
and you're trying to design software

123
00:08:35.400 --> 00:08:38.520
that will give your customers the most powerful

124
00:08:38.520 --> 00:08:41.580
and efficient experience, then the SDK allows you

125
00:08:41.580 --> 00:08:43.700
to have complete control over this process

126
00:08:44.080 --> 00:08:46.040
and really maximize the chances

127
00:08:46.040 --> 00:08:47.700
that everything is successfully deployed.

128
00:08:50.540 --> 00:08:51.580
Finally, we're going to have a look

129
00:08:51.580 --> 00:08:53.660
at the different file types available to us

130
00:08:53.660 --> 00:08:55.540
as users of camera software.

131
00:08:55.540 --> 00:08:59.900
For scientific images, as opposed to just the images

132
00:08:59.900 --> 00:09:02.380
that might come from our iPhone or our consumer camera,

133
00:09:02.760 --> 00:09:05.000
we have different file types available to us

134
00:09:05.000 --> 00:09:06.880
because the data is subtly different.

135
00:09:08.120 --> 00:09:11.960
We have to consider some different factors

136
00:09:11.960 --> 00:09:13.400
in choosing a file type.

137
00:09:13.900 --> 00:09:16.040
One important one is data preservation.

138
00:09:16.680 --> 00:09:17.840
And the question here is,

139
00:09:18.020 --> 00:09:20.240
if we have a 12-bit camera, for example,

140
00:09:20.940 --> 00:09:23.260
is that entire bit depth preserved

141
00:09:23.260 --> 00:09:24.700
when we save that image

142
00:09:24.700 --> 00:09:27.320
or is it compressed down to 8-bits

143
00:09:27.320 --> 00:09:31.480
as all images acquired on consumer cameras tend to be?

144
00:09:32.820 --> 00:09:35.160
If it's compressed down,

145
00:09:37.530 --> 00:09:39.570
the next question is flexibility.

146
00:09:40.110 --> 00:09:42.810
What other software can work with that file type?

147
00:09:42.810 --> 00:09:43.850
And is the metadata,

148
00:09:44.570 --> 00:09:47.690
that's the information about any other hardware

149
00:09:47.690 --> 00:09:49.730
that was being controlled by the software at the time,

150
00:09:49.830 --> 00:09:51.950
the timestamp of the image,

151
00:09:52.270 --> 00:09:54.670
any information about the scale bars

152
00:09:54.670 --> 00:09:56.230
and similar things in the image,

153
00:09:56.670 --> 00:09:58.890
information about the lenses with which it was acquired,

154
00:09:59.030 --> 00:10:00.270
if that's available,

155
00:10:00.670 --> 00:10:02.690
all of that data about the data,

156
00:10:02.910 --> 00:10:03.370
the metadata,

157
00:10:03.690 --> 00:10:06.010
is that included when you save the image

158
00:10:06.010 --> 00:10:07.930
is another question that we need to ask.

159
00:10:07.930 --> 00:10:13.290
Also, the file size can sometimes be important.

160
00:10:13.290 --> 00:10:16.510
If you're acquiring a massive quantity of images,

161
00:10:16.770 --> 00:10:20.830
then we might be significantly weighed down

162
00:10:20.830 --> 00:10:22.270
by large file sizes.

163
00:10:22.750 --> 00:10:23.890
So the question is then,

164
00:10:24.170 --> 00:10:28.150
does this file type offer compression of the information?

165
00:10:28.790 --> 00:10:30.930
But importantly, we need to realise

166
00:10:30.930 --> 00:10:35.150
whether this compression is lossless or lossy,

167
00:10:35.150 --> 00:10:38.730
i.e. does the act of compressing the data

168
00:10:38.730 --> 00:10:40.610
lose some of the data?

169
00:10:40.790 --> 00:10:42.390
Whether that's perceptible or not,

170
00:10:42.650 --> 00:10:45.350
are the true intensity values still preserved?

171
00:10:46.450 --> 00:10:48.530
So we're going to look at a few file types

172
00:10:48.530 --> 00:10:50.890
and we can generally rank them

173
00:10:50.890 --> 00:10:52.690
between the best data preservation

174
00:10:52.690 --> 00:10:55.430
and the smallest file size.

175
00:10:56.490 --> 00:11:00.930
So we have .tiff files, .png and .jpg

176
00:11:00.930 --> 00:11:02.930
are the three most common options

177
00:11:02.930 --> 00:11:04.110
that are available to us.

178
00:11:05.150 --> 00:11:07.170
And if we look at .tiff files,

179
00:11:07.530 --> 00:11:09.550
this is kind of the scientific standard

180
00:11:09.550 --> 00:11:12.950
because the original raw image data is preserved.

181
00:11:13.410 --> 00:11:19.970
The full 16-bit depth of 16-bit images

182
00:11:19.970 --> 00:11:20.830
will be preserved.

183
00:11:21.630 --> 00:11:23.470
12-bit will be preserved, et cetera.

184
00:11:24.030 --> 00:11:27.790
The actual values that our camera has given us,

185
00:11:28.170 --> 00:11:29.130
which will be, of course,

186
00:11:29.210 --> 00:11:30.910
the ones that we would want to use

187
00:11:30.910 --> 00:11:32.230
in analysis pipelines,

188
00:11:32.670 --> 00:11:33.930
those are preserved.

189
00:11:33.930 --> 00:11:36.630
Images are completely uncompressed,

190
00:11:36.630 --> 00:11:38.910
so there's no form of compression

191
00:11:38.910 --> 00:11:42.850
that other software would have to decompress effectively.

192
00:11:44.990 --> 00:11:49.470
But this preservation of the original image data

193
00:11:49.470 --> 00:11:53.330
means that our standard 16-bit scientific tiffs

194
00:11:53.330 --> 00:11:55.230
can't be opened correctly

195
00:11:55.230 --> 00:11:57.310
in most non-scientific software.

196
00:11:57.310 --> 00:11:59.370
And that's because, if we recall,

197
00:11:59.690 --> 00:12:01.970
we're applying histogram scaling settings

198
00:12:01.970 --> 00:12:04.730
to our data with scientific software.

199
00:12:05.030 --> 00:12:07.610
We don't have, typically,

200
00:12:08.790 --> 00:12:12.910
image data all the way up to an intensity value of 65,000,

201
00:12:13.410 --> 00:12:15.790
you know, representing fully white

202
00:12:15.790 --> 00:12:17.210
if we see the whole scale.

203
00:12:17.650 --> 00:12:20.570
But non-scientific software doesn't realize that.

204
00:12:20.570 --> 00:12:22.830
It just attempts to show the entire scale

205
00:12:22.830 --> 00:12:26.550
from zero all the way up to 65,536.

206
00:12:27.290 --> 00:12:30.310
And if most of our image intensity values

207
00:12:30.310 --> 00:12:31.850
are, say, less than 1,000,

208
00:12:32.290 --> 00:12:34.290
then it's going to be a very, very dark image.

209
00:12:34.490 --> 00:12:38.070
And that's how a lot of images will appear.

210
00:12:38.070 --> 00:12:40.690
So, for example, if we save .TIFF files

211
00:12:40.690 --> 00:12:44.570
and then just look at a thumbnail of that image

212
00:12:44.570 --> 00:12:45.670
in Windows Explorer

213
00:12:45.670 --> 00:12:47.830
or try and open that image in, you know,

214
00:12:47.890 --> 00:12:52.610
simple software like Windows Image Viewer,

215
00:12:52.790 --> 00:12:54.710
then it's going to look mostly black

216
00:12:54.710 --> 00:12:56.610
or very gray in most cases.

217
00:12:57.110 --> 00:12:58.870
So that's just something to bear in mind,

218
00:12:58.930 --> 00:13:00.250
that we need scientific software

219
00:13:00.250 --> 00:13:01.850
to work with scientific tiffs.

220
00:13:03.230 --> 00:13:06.030
But finally, unfortunately, for TIFF files,

221
00:13:06.250 --> 00:13:07.510
almost all the time,

222
00:13:07.510 --> 00:13:10.550
the metadata around the image is also included.

223
00:13:13.010 --> 00:13:15.310
Next up, we have .png files.

224
00:13:15.470 --> 00:13:19.450
And this is the first of our two compressed file formats.

225
00:13:20.410 --> 00:13:22.770
But with .png and .jpg,

226
00:13:22.990 --> 00:13:25.950
the thing to realize is that images are rescaled

227
00:13:25.950 --> 00:13:28.110
to 8-bit according to the current

228
00:13:28.110 --> 00:13:29.670
histogram scaling settings.

229
00:13:30.230 --> 00:13:33.390
So as we have these histogram settings

230
00:13:33.390 --> 00:13:35.730
that rescale our, you know,

231
00:13:35.810 --> 00:13:36.970
higher bit depth information

232
00:13:36.970 --> 00:13:39.230
to the 8-bits that our monitors can work

233
00:13:39.230 --> 00:13:41.030
with, when we save that image

234
00:13:41.030 --> 00:13:43.030
to .png or .jpg,

235
00:13:43.550 --> 00:13:47.570
that rescaling to 8-bit is saved

236
00:13:47.570 --> 00:13:50.470
and preserved and applied to the images.

237
00:13:50.690 --> 00:13:52.870
And the original values are lost.

238
00:13:53.450 --> 00:13:55.470
So that's something to bear in mind

239
00:13:55.470 --> 00:13:58.010
that if we save as .png or .jpg,

240
00:13:58.110 --> 00:13:59.450
we are not preserving

241
00:13:59.450 --> 00:14:01.830
that original image intensity values.

242
00:14:01.830 --> 00:14:02.630
But for .png,

243
00:14:02.630 --> 00:14:04.430
but for .png,

244
00:14:04.430 --> 00:14:07.430
a lossless compression

245
00:14:07.430 --> 00:14:10.830
is applied to the actual image

246
00:14:10.830 --> 00:14:12.250
after this rescaling,

247
00:14:13.010 --> 00:14:14.830
meaning no information is lost

248
00:14:14.830 --> 00:14:17.750
about these rescaled values.

249
00:14:17.990 --> 00:14:19.830
Of course, the original intensity values

250
00:14:19.830 --> 00:14:20.450
are lost,

251
00:14:20.570 --> 00:14:22.610
but there's no change made

252
00:14:22.610 --> 00:14:23.910
after this rescaling

253
00:14:23.910 --> 00:14:25.590
when the files are compressed.

254
00:14:27.290 --> 00:14:29.810
.png files are completely versatile

255
00:14:29.810 --> 00:14:31.410
in using them in other software

256
00:14:31.410 --> 00:14:32.690
like Microsoft Word

257
00:14:32.690 --> 00:14:33.650
or whatever it would be.

258
00:14:34.210 --> 00:14:35.210
And they do have

259
00:14:35.210 --> 00:14:37.530
a significantly smaller file size

260
00:14:37.530 --> 00:14:39.170
typically than .tiff files.

261
00:14:40.610 --> 00:14:42.190
Finally, we have what's typically

262
00:14:42.190 --> 00:14:43.690
the smallest file size

263
00:14:43.690 --> 00:14:44.610
available to us,

264
00:14:44.890 --> 00:14:46.610
which is .jpg files.

265
00:14:46.890 --> 00:14:47.770
As I mentioned,

266
00:14:47.970 --> 00:14:49.970
these are also rescaled to 8-bit,

267
00:14:50.450 --> 00:14:52.470
applying the histogram scaling settings

268
00:14:52.470 --> 00:14:53.430
just like .png.

269
00:14:53.430 --> 00:14:54.750
But in this case,

270
00:14:55.190 --> 00:14:57.630
.jpg uses a lossy compression,

271
00:14:58.190 --> 00:14:59.850
meaning that the actual image

272
00:14:59.850 --> 00:15:00.630
that we see

273
00:15:00.630 --> 00:15:02.910
is going to be distorted

274
00:15:02.910 --> 00:15:04.030
in some way,

275
00:15:04.190 --> 00:15:07.130
whether that's a large-scale distortion

276
00:15:07.130 --> 00:15:08.410
that we'll see

277
00:15:08.410 --> 00:15:10.930
or whether it's completely imperceptible

278
00:15:10.930 --> 00:15:13.290
is down to different images

279
00:15:13.290 --> 00:15:15.190
and different levels of compression

280
00:15:15.190 --> 00:15:16.950
that different software might use

281
00:15:16.950 --> 00:15:18.650
in storing .jpg files.

282
00:15:19.050 --> 00:15:20.550
But there's some chance

283
00:15:20.550 --> 00:15:21.550
that image details

284
00:15:21.550 --> 00:15:22.930
might be lost or distorted

285
00:15:22.930 --> 00:15:24.790
by this compression process.

286
00:15:25.370 --> 00:15:26.010
And that's something

287
00:15:26.010 --> 00:15:27.130
to always remember

288
00:15:27.130 --> 00:15:29.390
if we're using .jpg files

289
00:15:29.390 --> 00:15:30.750
in a scientific context.

290
00:15:31.030 --> 00:15:32.970
If we're just saving them

291
00:15:32.970 --> 00:15:36.230
to look at them by eye

292
00:15:36.230 --> 00:15:37.750
for maybe more qualitative

293
00:15:37.750 --> 00:15:40.710
measurements and evaluations,

294
00:15:40.990 --> 00:15:42.110
then it's very likely

295
00:15:42.110 --> 00:15:45.550
that these compression artifacts

296
00:15:46.190 --> 00:15:47.770
or potential compression artifacts

297
00:15:47.770 --> 00:15:50.410
won't really influence things.

298
00:15:50.410 --> 00:15:52.210
we'll really have to zoom in

299
00:15:52.210 --> 00:15:54.510
very close to the image

300
00:15:54.510 --> 00:15:55.590
and sort of examine it

301
00:15:55.590 --> 00:15:56.790
on a pixel level typically

302
00:15:56.790 --> 00:15:59.590
to really see compression artifacts

303
00:15:59.590 --> 00:16:00.290
with .jpg.

304
00:16:00.530 --> 00:16:01.850
But it might change

305
00:16:01.850 --> 00:16:03.170
from application to application.

306
00:16:03.330 --> 00:16:03.990
So this is something

307
00:16:03.990 --> 00:16:05.430
that would be wise to explore.

308
00:16:06.070 --> 00:16:07.150
But just like .png,

309
00:16:07.410 --> 00:16:08.250
these can of course

310
00:16:08.250 --> 00:16:09.450
be opened in all software

311
00:16:09.450 --> 00:16:11.190
and .jpg offers

312
00:16:11.190 --> 00:16:12.850
the smallest file size

313
00:16:12.850 --> 00:16:14.230
typically of these three.

314
00:16:17.500 --> 00:16:19.640
So we're going to round off

315
00:16:19.640 --> 00:16:22.480
with an essential camera controls checklist.

316
00:16:23.360 --> 00:16:24.640
So these are the things

317
00:16:24.640 --> 00:16:25.480
to bear in mind

318
00:16:25.480 --> 00:16:26.980
each time you image

319
00:16:26.980 --> 00:16:28.740
whatever software package

320
00:16:28.740 --> 00:16:29.320
you're using

321
00:16:29.320 --> 00:16:30.760
we would typically want

322
00:16:30.760 --> 00:16:31.360
to make sure

323
00:16:31.360 --> 00:16:34.380
that all of these camera controls

324
00:16:34.380 --> 00:16:35.940
are set to values

325
00:16:35.940 --> 00:16:36.660
that make sense

326
00:16:36.660 --> 00:16:38.000
for our imaging application.

327
00:16:41.040 --> 00:16:41.920
So first of all

328
00:16:41.920 --> 00:16:43.800
we have histogram controls

329
00:16:43.800 --> 00:16:46.340
and we've talked about these before.

330
00:16:46.660 --> 00:16:48.000
If these aren't set appropriately

331
00:16:48.000 --> 00:16:49.200
you might not see

332
00:16:49.200 --> 00:16:50.400
what you expect to see

333
00:16:50.400 --> 00:16:52.320
might start changing

334
00:16:52.320 --> 00:16:53.100
other settings

335
00:16:53.100 --> 00:16:55.700
to correct a problem

336
00:16:55.700 --> 00:16:56.340
that's actually

337
00:16:56.340 --> 00:16:57.620
in our histogram controls.

338
00:16:58.600 --> 00:17:00.000
We also sometimes

339
00:17:00.000 --> 00:17:01.780
have different readout modes

340
00:17:01.780 --> 00:17:04.540
for some cameras

341
00:17:04.540 --> 00:17:05.540
which might offer

342
00:17:05.540 --> 00:17:06.320
different speed,

343
00:17:06.500 --> 00:17:07.180
dynamic range

344
00:17:07.180 --> 00:17:08.380
or noise characteristics

345
00:17:08.380 --> 00:17:09.120
and behaviors.

346
00:17:10.520 --> 00:17:11.940
For some cameras

347
00:17:11.940 --> 00:17:12.880
we will have

348
00:17:12.880 --> 00:17:14.820
selectable gain settings.

349
00:17:15.040 --> 00:17:16.300
We talked about gain before

350
00:17:16.300 --> 00:17:17.480
and how appropriate

351
00:17:17.480 --> 00:17:18.700
how important it is

352
00:17:18.700 --> 00:17:20.020
to set this correctly.

353
00:17:20.700 --> 00:17:21.880
For low light imaging

354
00:17:21.880 --> 00:17:24.740
usually the maximum gain setting

355
00:17:24.740 --> 00:17:25.260
a value

356
00:17:25.260 --> 00:17:27.200
the maximum gain setting

357
00:17:27.200 --> 00:17:28.580
available

358
00:17:28.580 --> 00:17:30.400
will be the appropriate setting

359
00:17:30.400 --> 00:17:31.660
but this will change

360
00:17:31.660 --> 00:17:32.600
from camera to camera

361
00:17:32.600 --> 00:17:33.420
and it's important

362
00:17:33.420 --> 00:17:34.000
to understand

363
00:17:34.000 --> 00:17:35.460
how your camera operates.

364
00:17:36.740 --> 00:17:38.280
But if for example

365
00:17:38.280 --> 00:17:39.300
a camera offers

366
00:17:39.300 --> 00:17:40.140
you know

367
00:17:40.140 --> 00:17:41.780
two or three gain settings

368
00:17:41.780 --> 00:17:42.820
rather than

369
00:17:42.820 --> 00:17:45.840
a smoothly adjustable

370
00:17:45.840 --> 00:17:46.840
gain slider

371
00:17:46.840 --> 00:17:48.140
for these

372
00:17:48.140 --> 00:17:49.640
two or three gain settings

373
00:17:49.640 --> 00:17:50.200
cameras

374
00:17:50.200 --> 00:17:51.160
typically

375
00:17:51.160 --> 00:17:52.180
if you're working

376
00:17:52.180 --> 00:17:53.120
in low light conditions

377
00:17:53.120 --> 00:17:54.500
the highest gain setting

378
00:17:54.500 --> 00:17:55.640
is going to be the best.

379
00:17:56.100 --> 00:17:56.860
It's usually going to be

380
00:17:56.860 --> 00:17:57.920
the lowest noise

381
00:17:57.920 --> 00:17:59.280
and offer you

382
00:17:59.280 --> 00:18:00.900
the most dynamic range

383
00:18:00.900 --> 00:18:03.060
for low light imaging situations.

384
00:18:03.600 --> 00:18:05.480
For other situations

385
00:18:05.480 --> 00:18:07.440
this question of dynamic range

386
00:18:07.440 --> 00:18:08.920
is what should drive

387
00:18:08.920 --> 00:18:09.640
your decision.

388
00:18:09.640 --> 00:18:11.480
if you are having

389
00:18:11.480 --> 00:18:13.400
overexposed pixels

390
00:18:13.400 --> 00:18:14.720
in a gain setting

391
00:18:14.720 --> 00:18:16.860
then move to a lower

392
00:18:16.860 --> 00:18:17.880
gain setting

393
00:18:17.880 --> 00:18:19.780
and that's essentially

394
00:18:19.780 --> 00:18:20.840
what drives this.

395
00:18:21.040 --> 00:18:22.160
It's using the maximum

396
00:18:22.160 --> 00:18:22.880
gain setting

397
00:18:22.880 --> 00:18:23.560
that we can

398
00:18:23.560 --> 00:18:24.840
while not getting

399
00:18:24.840 --> 00:18:26.480
overexposed pixels.

400
00:18:28.420 --> 00:18:29.820
Next we have binning

401
00:18:29.820 --> 00:18:30.980
which if you recall

402
00:18:30.980 --> 00:18:32.060
is this grouping

403
00:18:32.060 --> 00:18:33.620
of pixels together

404
00:18:33.620 --> 00:18:35.020
into two by two

405
00:18:35.020 --> 00:18:35.640
or sometimes

406
00:18:35.640 --> 00:18:36.780
other groupings

407
00:18:36.780 --> 00:18:37.940
of like three by three

408
00:18:37.940 --> 00:18:38.840
or four by four

409
00:18:38.840 --> 00:18:40.920
to make effectively

410
00:18:40.920 --> 00:18:42.120
larger pixels

411
00:18:42.120 --> 00:18:43.160
in exchange

412
00:18:43.160 --> 00:18:44.320
for some slight

413
00:18:44.320 --> 00:18:45.680
noise penalty

414
00:18:45.680 --> 00:18:47.440
but this can increase

415
00:18:47.440 --> 00:18:48.320
sensitivity

416
00:18:48.320 --> 00:18:49.240
in exchange

417
00:18:49.240 --> 00:18:51.140
for reducing resolution

418
00:18:51.140 --> 00:18:52.720
but also reducing

419
00:18:52.720 --> 00:18:53.640
file size.

420
00:18:56.180 --> 00:18:57.000
Next we have

421
00:18:57.000 --> 00:18:58.400
the exposure time

422
00:18:58.400 --> 00:18:59.200
which is

423
00:18:59.200 --> 00:18:59.820
you know

424
00:18:59.820 --> 00:19:01.000
a very important thing

425
00:19:01.000 --> 00:19:01.900
to set

426
00:19:01.900 --> 00:19:02.920
for many applications.

427
00:19:03.760 --> 00:19:04.620
For some applications

428
00:19:04.620 --> 00:19:04.960
though

429
00:19:04.960 --> 00:19:06.260
it's not all that important

430
00:19:06.260 --> 00:19:07.220
to set this yourself

431
00:19:07.220 --> 00:19:08.600
and you can safely use

432
00:19:08.600 --> 00:19:10.000
auto exposure features.

433
00:19:10.000 --> 00:19:11.660
when this might be the case

434
00:19:11.660 --> 00:19:13.240
is if you have free control

435
00:19:13.240 --> 00:19:15.120
over the illumination intensity

436
00:19:15.120 --> 00:19:16.440
like in brightfield

437
00:19:16.440 --> 00:19:18.980
or phase contrast imaging

438
00:19:18.980 --> 00:19:20.360
or in inspection imaging

439
00:19:20.360 --> 00:19:22.080
it can be absolutely fine

440
00:19:22.080 --> 00:19:23.600
to let the camera decide

441
00:19:23.600 --> 00:19:26.020
what an appropriate exposure level is

442
00:19:26.020 --> 00:19:26.720
and just use

443
00:19:26.720 --> 00:19:28.000
auto exposure options.

444
00:19:28.580 --> 00:19:29.880
But if you're doing

445
00:19:29.880 --> 00:19:30.920
low light imaging

446
00:19:30.920 --> 00:19:32.780
auto exposure is unlikely

447
00:19:32.780 --> 00:19:36.400
to be the sensible choice

448
00:19:36.400 --> 00:19:38.220
because typically

449
00:19:38.220 --> 00:19:39.400
auto exposure means

450
00:19:39.400 --> 00:19:40.360
the camera will try

451
00:19:40.360 --> 00:19:41.840
to fill its entire

452
00:19:41.840 --> 00:19:42.900
full well capacity

453
00:19:42.900 --> 00:19:44.300
and if you're in

454
00:19:44.300 --> 00:19:45.520
a low light situation

455
00:19:45.520 --> 00:19:46.720
that might mean

456
00:19:46.720 --> 00:19:48.380
a very long exposure time.

457
00:19:48.940 --> 00:19:49.440
It might mean

458
00:19:49.440 --> 00:19:49.960
for example

459
00:19:49.960 --> 00:19:51.220
if a camera has

460
00:19:51.220 --> 00:19:51.800
a very high

461
00:19:51.800 --> 00:19:52.720
full well capacity

462
00:19:52.720 --> 00:19:54.180
which many cameras do

463
00:19:54.180 --> 00:19:55.180
even if they're designed

464
00:19:55.180 --> 00:19:55.980
for low light imaging

465
00:19:55.980 --> 00:19:56.920
it could mean

466
00:19:56.920 --> 00:19:57.760
an exposure time

467
00:19:57.760 --> 00:19:58.660
of five seconds

468
00:19:58.660 --> 00:20:00.340
when an exposure time

469
00:20:00.340 --> 00:20:01.680
of 200 milliseconds

470
00:20:01.680 --> 00:20:02.520
would give you

471
00:20:02.520 --> 00:20:03.400
an image good enough

472
00:20:03.400 --> 00:20:04.240
for you to work with.

473
00:20:04.520 --> 00:20:05.160
So this is something

474
00:20:05.160 --> 00:20:05.820
to be aware of

475
00:20:06.800 --> 00:20:08.580
But in general

476
00:20:08.580 --> 00:20:09.440
exposure time

477
00:20:09.440 --> 00:20:09.960
should be set

478
00:20:09.960 --> 00:20:10.600
as high

479
00:20:10.600 --> 00:20:11.540
as is practical

480
00:20:11.540 --> 00:20:12.220
for you

481
00:20:12.220 --> 00:20:13.460
until you reach

482
00:20:13.460 --> 00:20:14.420
your desired signal

483
00:20:14.420 --> 00:20:15.360
to noise ratio.

484
00:20:15.840 --> 00:20:17.240
But the order

485
00:20:17.240 --> 00:20:17.920
of this list

486
00:20:17.920 --> 00:20:18.620
is important.

487
00:20:18.960 --> 00:20:19.580
It's important

488
00:20:19.580 --> 00:20:20.240
to make sure

489
00:20:20.240 --> 00:20:20.800
that you've set

490
00:20:20.800 --> 00:20:22.280
the correct readout mode

491
00:20:22.280 --> 00:20:23.720
and gain setting

492
00:20:23.720 --> 00:20:25.240
and indeed binning

493
00:20:25.240 --> 00:20:26.420
level

494
00:20:26.420 --> 00:20:27.600
if you're using binning

495
00:20:27.600 --> 00:20:28.680
before you set

496
00:20:28.680 --> 00:20:29.660
the exposure time

497
00:20:29.660 --> 00:20:30.700
because these controls

498
00:20:30.700 --> 00:20:31.540
might change

499
00:20:31.540 --> 00:20:32.780
what the kind

500
00:20:32.780 --> 00:20:34.660
of different

501
00:20:34.660 --> 00:20:35.280
light levels

502
00:20:35.280 --> 00:20:35.740
and different

503
00:20:35.740 --> 00:20:36.640
signal to noise

504
00:20:36.640 --> 00:20:37.480
ratios you get

505
00:20:37.480 --> 00:20:37.900
at different

506
00:20:37.900 --> 00:20:38.660
exposure times

507
00:20:38.660 --> 00:20:39.080
will be.

508
00:20:39.500 --> 00:20:40.360
So set the exposure

509
00:20:40.360 --> 00:20:41.260
time after these

510
00:20:41.260 --> 00:20:41.960
other controls.

511
00:20:44.600 --> 00:20:45.500
Finally we have

512
00:20:45.500 --> 00:20:46.620
region of interest

513
00:20:46.620 --> 00:20:48.120
which is as we

514
00:20:48.120 --> 00:20:49.020
introduced before

515
00:20:49.020 --> 00:20:50.440
in the speed section

516
00:20:50.440 --> 00:20:52.860
delineating a certain

517
00:20:52.860 --> 00:20:53.880
area of our sensor

518
00:20:53.880 --> 00:20:54.940
that we want to read off

519
00:20:54.940 --> 00:20:56.360
maybe to increase

520
00:20:56.360 --> 00:20:57.000
the speed

521
00:20:57.000 --> 00:20:58.240
with which we can

522
00:20:58.240 --> 00:21:00.440
acquire images

523
00:21:00.440 --> 00:21:02.120
or simply to reduce

524
00:21:02.120 --> 00:21:02.880
file sizes

525
00:21:02.880 --> 00:21:03.940
and make things

526
00:21:03.940 --> 00:21:04.560
more streamlined

527
00:21:04.560 --> 00:21:06.840
and triggering settings

528
00:21:06.840 --> 00:21:08.160
for hardware triggering

529
00:21:08.160 --> 00:21:09.160
which we're going to

530
00:21:09.160 --> 00:21:09.680
talk about

531
00:21:09.680 --> 00:21:10.900
in the next part

532
00:21:10.900 --> 00:21:11.740
of this course.

533
00:21:14.740 --> 00:21:15.940
So in summary

534
00:21:15.940 --> 00:21:17.500
for software controls

535
00:21:17.500 --> 00:21:18.940
we have

536
00:21:18.940 --> 00:21:20.780
different software options

537
00:21:20.780 --> 00:21:22.060
for different applications

538
00:21:22.060 --> 00:21:23.520
depending on your need

539
00:21:23.520 --> 00:21:24.420
for simplicity

540
00:21:24.420 --> 00:21:26.520
programmable control

541
00:21:26.520 --> 00:21:27.660
and application

542
00:21:27.660 --> 00:21:28.720
specific features

543
00:21:28.720 --> 00:21:29.480
such as the

544
00:21:29.480 --> 00:21:30.800
microscopy tools

545
00:21:30.800 --> 00:21:31.680
that microscopy

546
00:21:31.680 --> 00:21:32.460
software offers

547
00:21:32.460 --> 00:21:33.400
and of course

548
00:21:33.400 --> 00:21:34.580
low cost might play

549
00:21:34.580 --> 00:21:35.360
into this too.

550
00:21:36.620 --> 00:21:37.840
We looked at Mosaic

551
00:21:37.840 --> 00:21:39.220
which is Tucsen's

552
00:21:39.220 --> 00:21:40.380
powerful and versatile

553
00:21:40.380 --> 00:21:41.780
free camera control

554
00:21:41.780 --> 00:21:42.240
software

555
00:21:42.240 --> 00:21:44.560
and also we have

556
00:21:44.560 --> 00:21:45.240
the SDK

557
00:21:45.240 --> 00:21:46.880
which allows integration

558
00:21:46.880 --> 00:21:48.100
into custom designed

559
00:21:48.100 --> 00:21:48.600
software.

560
00:21:49.940 --> 00:21:51.040
For the essential

561
00:21:51.040 --> 00:21:51.860
camera controls

562
00:21:51.860 --> 00:21:54.020
we had this list

563
00:21:54.020 --> 00:21:54.580
of controls

564
00:21:54.580 --> 00:21:55.920
which we can return

565
00:21:55.920 --> 00:21:56.660
to that slide

566
00:21:56.660 --> 00:21:58.360
to and work through

567
00:21:58.360 --> 00:21:58.860
the checklist

568
00:21:58.860 --> 00:21:59.600
whenever we need

569
00:21:59.600 --> 00:22:00.420
to return to it

570
00:22:00.420 --> 00:22:02.600
but just to help

571
00:22:02.600 --> 00:22:03.300
jog your memory

572
00:22:03.300 --> 00:22:03.900
next time

573
00:22:03.900 --> 00:22:04.480
we had the

574
00:22:04.480 --> 00:22:05.480
histogram controls

575
00:22:05.480 --> 00:22:06.900
the readout modes

576
00:22:06.900 --> 00:22:07.940
if the camera has

577
00:22:07.940 --> 00:22:08.920
different readout modes

578
00:22:08.920 --> 00:22:10.200
the gain setting

579
00:22:10.200 --> 00:22:11.240
if the camera has

580
00:22:11.240 --> 00:22:12.360
different gain settings

581
00:22:12.360 --> 00:22:13.900
binning controls

582
00:22:13.900 --> 00:22:15.320
exposure time

583
00:22:15.320 --> 00:22:16.740
region of interest

584
00:22:16.740 --> 00:22:18.140
and triggering settings.

585
00:22:18.140 --> 00:22:20.920
and we also looked

586
00:22:20.920 --> 00:22:22.320
at different file types

587
00:22:22.320 --> 00:22:23.920
and this is a balance

588
00:22:23.920 --> 00:22:25.480
of the smallest file size

589
00:22:25.480 --> 00:22:26.760
which is .jpeg

590
00:22:26.760 --> 00:22:27.320
typically

591
00:22:27.320 --> 00:22:28.760
versus having

592
00:22:28.760 --> 00:22:30.000
lossless compression

593
00:22:30.000 --> 00:22:31.200
.png

594
00:22:31.200 --> 00:22:32.400
or the saving

595
00:22:32.400 --> 00:22:33.300
of the true

596
00:22:33.300 --> 00:22:34.700
original raw

597
00:22:34.700 --> 00:22:35.840
image data

598
00:22:35.840 --> 00:22:36.440
that the camera

599
00:22:36.440 --> 00:22:37.280
has given us

600
00:22:37.280 --> 00:22:38.220
along with

601
00:22:38.220 --> 00:22:39.640
metadata

602
00:22:39.640 --> 00:22:41.060
for analysis

603
00:22:41.060 --> 00:22:42.380
and that's .tiff.
