Commit edf41700 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

renaming and license/description headers

parent 59af6bb9
__copyright__ = "Copyright 2018, Elphel, Inc."
__license__ = "GPL-3.0+"
__maintainer__ = "Oleg Dzhimiev"
__email__ = "oleg@elphel.com"
'''
SPDX-License-Identifier: GPL-3.0-or-later
Copyright (c) 2020, Elphel, Inc.
Author: Oleg Dzhimiev <oleg@elphel.com>
Description: Class for converting JP4 raw images to
JPEG for previewing
'''
import numpy as np
#import imageio
......
#!/usr/bin/env python3
'''
SPDX-License-Identifier: GPL-3.0-or-later
Copyright (c) 2020, Elphel, Inc.
Author: Oleg Dzhimiev <oleg@elphel.com>
Description: Converts jp4 images to jpeg for preview
Scans all images in src-dir and puts results to dst-dir
'''
from jp4_composite import JP4_C
#import cv2
import numpy as np
......@@ -30,10 +39,11 @@ for f in lst:
#print(img.exif.data['Model'])
img.deblock()
img.demosaic_bilinear()
img.saturation()
img_arr = img.saturation()
im = Image.fromarray(img_arr.astype(np.uint8))
im.save(os.path.join(dst,img.basename+"_"+str(img.subnames)+".jpeg"))
subs = img.extract_subframes()
for i in range(len(subs)):
#subs = img.extract_subframes()
#for i in range(len(subs)):
#subs[i].save(os.path.join("../res",img.basename+"_"+str(img.subnames[i])+".png"))
subs[i].save(os.path.join(dst,img.basename+"_"+str(img.subnames[i])+".jpeg"))
# subs[i].save(os.path.join(dst,img.basename+"_"+str(img.subnames[i])+".jpeg"))
#!/usr/bin/env python3
'''
SPDX-License-Identifier: GPL-3.0-or-later
Copyright (c) 2020, Elphel, Inc.
Author: Oleg Dzhimiev <oleg@elphel.com>
Description: Converts composite jp4 images from Eyesis4Pi-like camera or
camera with mux. A "composite" image consists of 2-3 images stacked
vertically.
Scans all images in src-dir and puts results to dst-dir.
'''
from jp4_composite import JP4_C
#import cv2
import numpy as np
......@@ -30,12 +41,9 @@ for f in lst:
#print(img.exif.data['Model'])
img.deblock()
img.demosaic_bilinear()
img_arr = img.saturation()
im = Image.fromarray(img_arr.astype(np.uint8))
im.save(os.path.join(dst,img.basename+"_"+str(img.subnames)+".jpeg"))
img.saturation()
#subs = img.extract_subframes()
#for i in range(len(subs)):
subs = img.extract_subframes()
for i in range(len(subs)):
#subs[i].save(os.path.join("../res",img.basename+"_"+str(img.subnames[i])+".png"))
# subs[i].save(os.path.join(dst,img.basename+"_"+str(img.subnames[i])+".jpeg"))
subs[i].save(os.path.join(dst,img.basename+"_"+str(img.subnames[i])+".jpeg"))
'''
SPDX-License-Identifier: GPL-3.0-or-later
Copyright (c) 2020, Elphel, Inc.
Author: Oleg Dzhimiev <oleg@elphel.com>
Description: Class for converting composite JP4 raw images to
JPEG for previewing.
Composite images consist of 2-3 single ones stacked vertically -
for example in Eyesis4Pi panoramic camera.
The methods here are specifically for Eyesis4Pi - channels are
hardcoded.
'''
import re
import os
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment