If you try to resize an image with a fraction (0.5) a TypeError exception is thrown. This is because the call to cv.CreateImage expects int not float types. I would suggest casting w and h to int.
Not sure if this is acceptable, but it would make more sense than casting the arguments to the resize call to int. I have a pull request lined up, but due to my vim's whitespace cleanup it's going to push a lot of whitespace changes, so I need to redo the commit if this change is acceptable.
If you try to resize an image with a fraction (0.5) a TypeError exception is thrown. This is because the call to cv.CreateImage expects int not float types. I would suggest casting w and h to int.
example:
Not sure if this is acceptable, but it would make more sense than casting the arguments to the resize call to int. I have a pull request lined up, but due to my vim's whitespace cleanup it's going to push a lot of whitespace changes, so I need to redo the commit if this change is acceptable.