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
321b95df
Commit
321b95df
authored
May 18, 2018
by
geoint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
video
parent
589a6302
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
14 deletions
+32
-14
APISentinel.pyc
geosentinel/APISentinel.pyc
+0
-0
__init__.pyc
geosentinel/__init__.pyc
+0
-0
ADT_Jasper.cpp
tools/jp2tojpg/ADT_Jasper.cpp
+3
-3
sentinelToRGBJPG.sh
tools/sentinelToRGBJPG.sh
+29
-11
No files found.
geosentinel/APISentinel.pyc
View file @
321b95df
No preview for this file type
geosentinel/__init__.pyc
View file @
321b95df
No preview for this file type
tools/jp2tojpg/ADT_Jasper.cpp
View file @
321b95df
...
...
@@ -184,9 +184,9 @@ jas_matrix_t *imgData[nChannels];
{
for
(
unsigned
int
x
=
0
;
x
<
width
;
++
x
)
{
//in
t delta = max-min;
//jas_matrix_set(imgData[i], y, x, (unsigned char)(255* (
data[nChannels*(y*width+x)+i]-min)/delta) );
jas_matrix_set
(
imgData
[
i
],
y
,
x
,
(
unsigned
char
)(
255
*
data
[
nChannels
*
(
y
*
width
+
x
)
+
i
]
/
(
pow
(
2
,
12
)))
);
floa
t
delta
=
max
-
min
;
jas_matrix_set
(
imgData
[
i
],
y
,
x
,
(
unsigned
char
)(
255
*
((
float
)
data
[
nChannels
*
(
y
*
width
+
x
)
+
i
]
-
min
)
/
delta
)
);
//
jas_matrix_set(imgData[i], y, x, (unsigned char)(255*data[nChannels*(y*width+x)+i]/(pow(2,12))) );
}
}
}
...
...
tools/sentinelToRGBJPG.sh
View file @
321b95df
...
...
@@ -7,28 +7,42 @@ ext=.jpg
cd
$BASEDIR
for
f
in
$(
find
.
-type
f
-name
'*.zip'
)
do
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
filepattern
=
$(
echo
$f
|
cut
-d
"_"
-f6
)
"_"
$(
echo
$f
|
cut
-d
"_"
-f3
)
"_B"
filename
=
$OUTDIR$filepattern
echo
$filename
if
[
!
-e
$filename
"02.jp2"
-o
!
-e
$filename
"03.jp2"
-o
!
-e
$filename
"04.jp2"
]
;
then
unzip
-
j
$f
*
B02.jp2
*
B03.jp2
*
B04.jp2
-d
$OUTDIR
unzip
-
n
-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
)
red
=
$(
ls
$filepattern
"04.jp2"
-t
|head
-1
)
green
=
$(
ls
$filepattern
"03.jp2"
-t
|head
-1
)
blue
=
$(
ls
$filepattern
"02.jp2"
-t
|head
-1
)
echo
"red-"
$red
echo
"gre-"
$green
echo
"blu-"
$blue
# m=$(pwd)
# red=$m/$red
# green=$m/$green
# blue=$m/$blue
# ./jp2ToJPGandStretch $red
# ./jp2ToJPGandStretch $green
# ./jp2ToJPGandStretch $blue
if
[
!
-e
$filepattern
"04.jpg"
]
;
then
jp2ToJPGandStretch
$red
fi
if
[
!
-e
$filepattern
"03.jpg"
]
;
then
jp2ToJPGandStretch
$green
fi
if
[
!
-e
$filepattern
"02.jpg"
]
;
then
jp2ToJPGandStretch
$blue
fi
# red=$(ls *B04.jpg -t |head -1)
# green=$(ls *B03.jpg -t |head -1)
# blue=$(ls *B02.jpg -t |head -1)
...
...
@@ -36,12 +50,16 @@ do
# red=$m/$red
# green=$m/$green
# blue=$m/$blue
# convert $red $green $blue -combine $(OUTDIR)/$count$ext
if
[
!
-d
"video"
]
;
then
mkdir
video
fi
fileout
=
$(
echo
$filepattern
|
cut
-d
"_"
-f2
)
convert
$filepattern
"04.jpg"
$filepattern
"02.jpg"
$filepattern
"02.jpg"
-combine
video/
$fileout
".jpg"
# rm *.jp2
# rm *B04.jpg
# rm *B03.jpg
# rm *B02.jpg
# count=$((count+1))
cd
..
done
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