Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoSentinel
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoSentinel
Commits
589a6302
Commit
589a6302
authored
May 17, 2018
by
Mario Chirinos Colunga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
continue extraction zip
parent
7209e37b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
52 deletions
+8
-52
sentinelToRGBJPG.sh
geosentinel/sentinelToRGBJPG.sh
+0
-51
sentinelToRGBJPG.sh
tools/sentinelToRGBJPG.sh
+8
-1
No files found.
geosentinel/sentinelToRGBJPG.sh
deleted
100644 → 0
View file @
7209e37b
#!/bin/sh
BASEDIR
=
$1
OUTDIR
=
$2
count
=
1
ext
=
.jpg
cd
$BASEDIR
for
f
in
$(
find
.
-type
f
-name
'*.zip'
)
do
file
=
$f
"/"
filename
=
$OUTDIR
"/T"
$(
echo
$f
|
cut
-d
"T"
-f2-10
|
cut
-d
"."
-f1
)
"_B"
if
[
!
-e
$filename
"02.jp2"
||
!
-e
$filename
"03.jp2"
||
!
-e
$filename
"04.jp2"
]
;
then
unzip
-j
$f
*
B02.jp2
*
B03.jp2
*
B04.jp2
-d
$OUTDIR
else
echo
PASS
$f
fi
cd
$OUTDIR
red
=
$(
ls
*
B04.jp2
-t
|head
-1
)
green
=
$(
ls
*
B03.jp2
-t
|head
-1
)
blue
=
$(
ls
*
B02.jp2
-t
|head
-1
)
# m=$(pwd)
# red=$m/$red
# green=$m/$green
# blue=$m/$blue
# ./jp2ToJPGandStretch $red
# ./jp2ToJPGandStretch $green
# ./jp2ToJPGandStretch $blue
# red=$(ls *B04.jpg -t |head -1)
# green=$(ls *B03.jpg -t |head -1)
# blue=$(ls *B02.jpg -t |head -1)
# m=$(pwd)
# red=$m/$red
# green=$m/$green
# blue=$m/$blue
# convert $red $green $blue -combine $(OUTDIR)/$count$ext
# rm *.jp2
# rm *B04.jpg
# rm *B03.jpg
# rm *B02.jpg
# count=$((count+1))
cd
..
done
tools/sentinelToRGBJPG.sh
View file @
589a6302
...
...
@@ -7,7 +7,14 @@ ext=.jpg
cd
$BASEDIR
for
f
in
$(
find
.
-type
f
-name
'*.zip'
)
do
unzip
-j
$f
*
B02.jp2
*
B03.jp2
*
B04.jp2
-d
$OUTDIR
filename
=
$OUTDIR
"/T"
$(
echo
$f
|
cut
-d
"T"
-f2-10
|
cut
-d
"."
-f1
)
"_B"
if
[
!
-e
$filename
"02.jp2"
||
!
-e
$filename
"03.jp2"
||
!
-e
$filename
"04.jp2"
]
;
then
unzip
-j
$f
*
B02.jp2
*
B03.jp2
*
B04.jp2
-d
$OUTDIR
else
echo
PASS
$f
fi
cd
$OUTDIR
red
=
$(
ls
*
B04.jp2
-t
|head
-1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment