New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Imageio #633

Merged
merged 13 commits into from Feb 11, 2016

Conversation

Projects
None yet
2 participants
@patricksnape
Contributor

patricksnape commented Sep 7, 2015

Add ImageIO importing and exporting. In particular, this adds methods for import_video, import_videos and export_video.

I have also moved most of the common image importing to freeimage as this is faster that pillow.

Breaking Changes:

  • Use ImageIO for things like jpg and bmp
  • GIF importer now uses ImageIO and thus returns LazyList rather than list
  • Bump to scipy 0.17.*
@patricksnape

This comment has been minimized.

Contributor

patricksnape commented Sep 8, 2015

Jenkins is a liar - it's actually passing - @jabooth since you're at home, obviously bored, want to take a look at this as well? Maybe check it out and take it for a spin?

@patricksnape

This comment has been minimized.

Contributor

patricksnape commented Feb 6, 2016

This is now on top of #669 and thus relies on that coming in. The history is also totally wrong because of me force pushing the HEAD - but I will do it again once LazyList comes in so that its just a single commit on top of master.

@patricksnape patricksnape changed the title from Imageio to BREAKING: Imageio Feb 7, 2016

Add imageio importer, video and image, and exporter
This uses the newly released imageio conda package, which will
probably change a bunch but we are managing the conda package
for the time being. It uses freeimage for image importing and
ffmpeg for video import/export. This relies
on the LazyList functionality for lazily loading the videos.

@patricksnape patricksnape force-pushed the patricksnape:imageio branch from b0536eb to 0954c57 Feb 8, 2016

@patricksnape

This comment has been minimized.

Contributor

patricksnape commented Feb 8, 2016

OK so the force push has now correctly merged.

patricksnape added some commits Feb 8, 2016

Add new normalise and denormalise methods
Try and standardise a bit more how we convert between types
and flip channels back and forth. So now we can normalise and
denormalise data between float/bool (menpo supported types)
and uint8 and uint16 (menpo supported uint types).
Add new pixels_range method
Easy way to get the current range of the pixels (e.g [0, 1])
Allow adding axis in non-copy case
Since the data must be c-contiguous, we can just reshape 2D
images that are missing the channel axis to have the axis
on front and this is still c-contiguous.
Remove PIL GIF importer and use ImageIO
The ImageIO image importer is much better than the adhoc PIL
one that I made. It handles palletes much better than my code.
Now a LazyList is returned rather than a list.
Use PIL for PNG and fix tests
Tests should now pass and use PIL for PNG because PIL seems
to be more consistent in respecting types (more consistent with
returning UINT8).
PIL no more copies
Reduce copies for PIL importer
Add as_imageio
This returns a numpy array with channels at the back, scaled to
the output dtype specified (uint8 or uint16).
@patricksnape

This comment has been minimized.

Contributor

patricksnape commented Feb 8, 2016

jenkins, retest this please

@patricksnape

This comment has been minimized.

Contributor

patricksnape commented Feb 8, 2016

@jabooth I think this is ready for you to check before coming in.

patricksnape added some commits Feb 11, 2016

Merge branch 'master' into imageio
Conflicts:
	menpo/image/base.py
@patricksnape

This comment has been minimized.

Contributor

patricksnape commented Feb 11, 2016

jenkins retest this please

@jabooth

This comment has been minimized.

Member

jabooth commented Feb 11, 2016

@patricksnape seems to be working great for me. LGTM, give us some time to test it out before release.

+1

jabooth added a commit that referenced this pull request Feb 11, 2016

@jabooth jabooth merged commit 4c197bc into menpo:master Feb 11, 2016

4 checks passed

OS X MenpoBot Jenkins build passed No test results found.
Details
clahub All contributors have signed the Contributor License Agreement.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jabooth jabooth deleted the patricksnape:imageio branch Feb 11, 2016

@jabooth jabooth removed the in progress label Feb 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment