Changes
Page history
Update How tos
authored
Jan 10, 2022
by
Aylin Carmen Klarer
Hide whitespace changes
Inline
Side-by-side
How-tos.md
View page @
613c1f36
...
@@ -285,6 +285,7 @@ The region of interest of your tracking is specified by your mask. To get starte
...
@@ -285,6 +285,7 @@ The region of interest of your tracking is specified by your mask. To get starte
```
matlab
```
matlab
%%% Create custom mask based on camera image
%%% Create custom mask based on camera image
dataRaw
=
load
(
'arenaScreenshot.mat'
);
% black tape to mark boundaries of arena
dataRaw
=
load
(
'arenaScreenshot.mat'
);
% black tape to mark boundaries of arena
% figure; image(dataRaw.data); % to visualize
data
=
dataRaw
.
data
<
35
;
% identify black pixels within image (manually adjust threshold)
data
=
dataRaw
.
data
<
35
;
% identify black pixels within image (manually adjust threshold)
dataMargin
=
bwareaopen
(
data
,
20
);
% remove unconnected pixel
dataMargin
=
bwareaopen
(
data
,
20
);
% remove unconnected pixel
dataROI
=
imfill
(
dataMargin
,
'holes'
);
% fill space within hexagon with 'true'
dataROI
=
imfill
(
dataMargin
,
'holes'
);
% fill space within hexagon with 'true'
...
...
...
...