mirror of
https://github.com/jlengrand/Ivolution.git
synced 2026-03-10 08:21:18 +00:00
Adds max image limit to avoid errors; start searching for image orientation in exif files
This commit is contained in:
22
test/exif_landscape.py
Normal file
22
test/exif_landscape.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""
|
||||
.. module:: max_size
|
||||
:platform: Unix, Windows
|
||||
:synopsis: Test class aiming at finding the maximum image size that can be generated to create a FaceMovie using OpenCV
|
||||
|
||||
.. moduleauthor:: Julien Lengrand-Lambert <jlengrand@gmail.com>
|
||||
|
||||
"""
|
||||
|
||||
from facemovie.lib import exif
|
||||
import cv
|
||||
|
||||
|
||||
guy_source = "C:\Users\jll\perso\workspace\FaceMovie\data\inputs\moi\DSC04869.JPG"
|
||||
aa = cv.LoadImage(guy_source)
|
||||
cv.NamedWindow("a")
|
||||
cv.ShowImage("a", aa)
|
||||
cv.WaitKey(100)
|
||||
|
||||
data = exif.parse(guy_source)
|
||||
print data.keys()
|
||||
print data["Orientation"] # portrait/ paysage? ? ?
|
||||
35
test/max_size.py
Normal file
35
test/max_size.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""
|
||||
.. module:: max_size
|
||||
:platform: Unix, Windows
|
||||
:synopsis: Test class aiming at finding the maximum image size that can be generated to create a FaceMovie using OpenCV
|
||||
|
||||
.. moduleauthor:: Julien Lengrand-Lambert <jlengrand@gmail.com>
|
||||
|
||||
"""
|
||||
|
||||
import cv
|
||||
|
||||
|
||||
|
||||
#x = 1000
|
||||
#y = 169000
|
||||
x = 13000
|
||||
y = 13000
|
||||
|
||||
max_pix = x * y
|
||||
|
||||
bb = cv.LoadImage("../data/inputs/moi/DSC04862.JPG")
|
||||
|
||||
aa = cv.CreateImage((x, y), cv.IPL_DEPTH_8U, 3)
|
||||
|
||||
#cv.Resize(bb, aa)
|
||||
cv.Zero(aa)
|
||||
|
||||
cv.NamedWindow("a", 1)
|
||||
cv.ShowImage("a", aa)
|
||||
cv.WaitKey(1000)
|
||||
|
||||
|
||||
print "Done!"
|
||||
print max_pix
|
||||
print 13000 * 13000
|
||||
Reference in New Issue
Block a user