Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
python3-convert-jp4
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
Elphel
python3-convert-jp4
Commits
25ce6e0e
Commit
25ce6e0e
authored
May 14, 2019
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
completed the last bayer configuration - Gb,B/R,Gr
parent
4cf95fb9
Pipeline
#1071
failed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
jp4.py
jp4.py
+23
-0
No files found.
jp4.py
View file @
25ce6e0e
...
...
@@ -110,6 +110,11 @@ class JP4:
if
self
.
bayer
==
[[
"Gr"
,
"R"
],[
"B"
,
"Gb"
]]:
self
.
bayer
=
[[
"B"
,
"Gb"
],[
"Gr"
,
"R"
]]
elif
self
.
exif
.
data
[
'Orientation'
]
==
1
:
self
.
bayer
=
[[
"Gb"
,
"B"
],[
"R"
,
"Gr"
]]
#im = ImageOps.mirror(im)
#im = im.rotate(270)
...
...
@@ -354,6 +359,24 @@ class JP4:
G
[
1
::
2
,
1
::
2
]
=
(
p10
+
narc
(
p10
)
+
p01
+
nabr
(
p01
))
/
4
B
[
1
::
2
,
1
::
2
]
=
(
p00
+
nabr
(
p00
)
+
narc
(
p00
+
nabr
(
p00
)))
/
4
elif
bayer
==
[[
"Gb"
,
"B"
],[
"R"
,
"Gr"
]]:
R
[
0
::
2
,
0
::
2
]
=
(
p10
+
naur
(
p10
))
/
2
G
[
0
::
2
,
0
::
2
]
=
(
4
*
p00
+
p11
+
naur
(
p11
)
+
nalc
(
p11
+
naur
(
p11
)))
/
8
B
[
0
::
2
,
0
::
2
]
=
(
p01
+
nalc
(
p01
))
/
2
R
[
0
::
2
,
1
::
2
]
=
(
p10
+
naur
(
p10
)
+
narc
(
p10
+
naur
(
p10
)))
/
4
G
[
0
::
2
,
1
::
2
]
=
(
p00
+
narc
(
p00
)
+
p11
+
naur
(
p11
))
/
4
B
[
0
::
2
,
1
::
2
]
=
p01
R
[
1
::
2
,
0
::
2
]
=
p10
G
[
1
::
2
,
0
::
2
]
=
(
p00
+
nabr
(
p00
)
+
p11
+
nalc
(
p11
))
/
4
B
[
1
::
2
,
0
::
2
]
=
(
p01
+
nabr
(
p01
)
+
nalc
(
p01
+
nabr
(
p01
)))
/
4
R
[
1
::
2
,
1
::
2
]
=
(
p10
+
narc
(
p10
))
/
2
G
[
1
::
2
,
1
::
2
]
=
(
4
*
p11
+
p00
+
nabr
(
p00
)
+
narc
(
p00
+
nabr
(
p00
)))
/
8
B
[
1
::
2
,
1
::
2
]
=
(
p01
+
nabr
(
p01
))
/
2
# OpenCV uses BGR format
I
=
np
.
dstack
([
B
,
G
,
R
])
self
.
image
=
I
...
...
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