Skip to content
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

Demo-Spatial Transformations #167

Merged
merged 6 commits into from
Dec 5, 2020
Merged

Demo-Spatial Transformations #167

merged 6 commits into from
Dec 5, 2020

Conversation

ashwani-rathee
Copy link
Member

@ashwani-rathee ashwani-rathee commented Nov 24, 2020

Demo for cropping,resizing and rescaling has been added with this and address issue #130

closes #130

Copy link
Member

@johnnychen94 johnnychen94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even though these are basic operations, it is a very nice explanation and I'm impressed!

I've left tons of format and language suggestions, hope you don't mind.

Two other things I also wish to see in this demo are:

  • image rotation: imrotate
  • image flip: reverse. Note that there are two flip options: flip the image data or flip the image axes.

@ashwani-rathee
Copy link
Member Author

ashwani-rathee commented Nov 25, 2020

Can I make another demo for other transformations?? This has three operations which seems just the right amount for one demo I think.

@johnnychen94
Copy link
Member

Of course.

And feel free to resolve the comments I added.

@johnnychen94
Copy link
Member

johnnychen94 commented Dec 5, 2020

Is this PR done? ( I guess you're still playing with PaddedViews things?)

@ashwani-rathee
Copy link
Member Author

ashwani-rathee commented Dec 5, 2020

I think so,I will change the image simple view to @view version and add padded view example .But how do I convert padded view array to image??

@johnnychen94
Copy link
Member

But how do I convert padded view array to image??

Can you explain this more? I'm not sure if I understand your question clearly.

You don't need to convert a PaddedView array to image, because in JuliaImages, every colorant array is a valid image, i.e., AbstractArray{<:Colorant}.

@ashwani-rathee
Copy link
Member Author

In pluto,when we use PaddedView the array doesn't directly convert to image or maybe I am missing something

@johnnychen94
Copy link
Member

This is probably a Pluto issue; If I get it correctly, it implements a different image display pipeline and not using ImageShow:

In IJulia, it is displayed as an image:

image

# This demonstration shows how to use cropping,resizing and rescaling operations on an
# image in Julia using ImageTransformations.jl

using ImageCore, ImageShow, ImageTransformations, TestImages, OffsetArrays, ImageShow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplicated ImageShow here.

Might be more concise to just import Images if we have a lot of packages to import

Suggested change
using ImageCore, ImageShow, ImageTransformations, TestImages, OffsetArrays, ImageShow
using Images, TestImages, OffsetArrays

@johnnychen94 johnnychen94 merged commit 16a6d42 into JuliaImages:source Dec 5, 2020
@johnnychen94
Copy link
Member

Welcome as a contributor to JuliaImages! @ashwani-rathee

@ashwani-rathee
Copy link
Member Author

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cropping using Images
2 participants