Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KB_DDHT_AI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adriaens, Ines
KB_DDHT_AI
Commits
dca7f66d
Commit
dca7f66d
authored
3 years ago
by
Adriaens, Ines
Browse files
Options
Downloads
Patches
Plain Diff
system copy
parent
6ee40926
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Sm3_selectvideos.asv
+10
-10
10 additions, 10 deletions
Sm3_selectvideos.asv
Sm3_selectvideos.m
+6
-3
6 additions, 3 deletions
Sm3_selectvideos.m
with
16 additions
and
13 deletions
Sm3_selectvideos.asv
+
10
−
10
View file @
dca7f66d
...
...
@@ -19,9 +19,8 @@ clc
init_.inpdir = 'W:\ASG\WLR_Dataopslag\DWZ\1519\DC2019\liestand\ses2\';
% video path destination
init_.
paren
tdir = ['W:\ASG\WLR_Genomica\Projects\Sustainable_breeding\' ...
init_.
des
tdir = ['W:\ASG\WLR_Genomica\Projects\Sustainable_breeding\' ...
'44 0000 2700 KB DDHT AI 2020\6. Data\gu_ld_bb'];
init_.destdir = 'gu_ld_bb';
% number of selected videos
N = 15;
...
...
@@ -34,7 +33,6 @@ vid_list.liedown = ls([init_.inpdir 'lied*']);
%% select videos and place them in new folder
% select N videos randomly from the list
idx = randi(size(vid_list.getup,1),N);
sel_list.getup = vid_list.getup(sort(randperm(size(vid_list.getup,1),N)),:);
sel_list.liedown = vid_list.liedown(sort(randperm(size(vid_list.getup,1),N)),:);
...
...
@@ -44,14 +42,16 @@ if ~isfolder(init_.destdir) % folder doesn't exist - create
end
% delete all that are in
old_list = ls([init_.destdir '*.avi'])
if ~isempty(old_list)
delete('init_.destdir
delete('init_.destdir\*.avi')
% copy new selection in folder
for i = 1:N
system(['copy "' init_.inpdir sel_list.getup(i,:) '"' ...
' "' mapsucces meta.(fields_{1}).file{i} '"']);
copyfile([init_.inpdir sel_list.getup(i,:)], [init_.destdir '\'])
copyfile([init_.inpdir sel_list.liedown(i,:)], [init_.destdir '\'])
end
...
...
This diff is collapsed.
Click to expand it.
Sm3_selectvideos.m
+
6
−
3
View file @
dca7f66d
...
...
@@ -46,10 +46,13 @@ delete('init_.destdir\*.avi')
% copy new selection in folder
for
i
=
1
:
N
copyfile
([
init_
.
inpdir
sel_list
.
getup
(
i
,:)],
[
init_
.
destdir
'\'
])
copyfile
([
init_
.
inpdir
sel_list
.
liedown
(
i
,:)],
[
init_
.
destdir
'\'
])
disp
([
'i = '
num2str
(
i
)
' out of '
num2str
(
N
)])
system
([
'copy "'
init_
.
inpdir
sel_list
.
getup
(
i
,:)
'"'
...
' "'
[
init_
.
destdir
'\'
sel_list
.
getup
(
i
,:)]
'"'
]);
system
([
'copy "'
init_
.
inpdir
sel_list
.
liedown
(
i
,:)
'"'
...
' "'
[
init_
.
destdir
'\'
sel_list
.
liedown
(
i
,:)]
'"'
]);
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment