Adds max image limit to avoid errors; start searching for image orientation in exif files

This commit is contained in:
2012-06-05 18:24:20 +02:00
parent 7c969fd9b3
commit 92a45fe285
4 changed files with 71 additions and 9 deletions

22
test/exif_landscape.py Normal file
View 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
View 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