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
d796697e
Commit
d796697e
authored
May 17, 2018
by
Mario Chirinos Colunga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools
parent
65d7a8e7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
36 deletions
+40
-36
sentinelToRGBJPG.sh
geosentinel/sentinelToRGBJPG.sh
+0
-36
sentinelToRGBJPG.sh
tools/sentinelToRGBJPG.sh
+40
-0
No files found.
geosentinel/sentinelToRGBJPG.sh
deleted
100644 → 0
View file @
65d7a8e7
#!/bin/sh
BASEDIR
=
"
$1
"
acu
=
1
ext
=
.jpg
for
f
in
$(
find
.
-type
f
-name
'*.zip'
)
do
unzip
-j
$f
*
B02.jp2
*
B03.jp2
*
B04.jp2
-d
.
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
$2$acu$ext
rm
*
.jp2
rm
*
B04.jpg
rm
*
B03.jpg
rm
*
B02.jpg
acu
=
$((
acu+1
))
done
tools/sentinelToRGBJPG.sh
0 → 100644
View file @
d796697e
#!/bin/sh
BASEDIR
=
$1
OUTDIR
=
$2
count
=
1
ext
=
.jpg
cd
$BASEDIR
for
f
in
$(
find
.
-type
f
-name
'*.zip'
)
do
unzip
-j
$f
*
B02.jp2
*
B03.jp2
*
B04.jp2
-d
$OUTDIR
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
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