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

image auto crop like ios question #73

Closed
YIFanH opened this issue Apr 11, 2016 · 3 comments
Closed

image auto crop like ios question #73

YIFanH opened this issue Apr 11, 2016 · 3 comments

Comments

@YIFanH
Copy link

YIFanH commented Apr 11, 2016

Dear Tim Oliver:

 I am one image processer from china and doing image croping as ios, but how to detect the rotate angle for the auto crop, i do some experiments on this quesion,but can not to find a simple rule. I am Looking forward to your reply.
@TimOliver
Copy link
Owner

Hi @YIFanH!

Haha sorry, I have no idea how Apple implemented that auto-crop feature in the Photos app. I'm curious about it too, but I'm not even sure what it's doing to the photo to get that information.

Sorry! :(

@TimOliver
Copy link
Owner

Oh hang on! I spoke too soon!

It's a Core Image filter! Go to the Core Image Class Reference Page and there's a method called [CIImage autoAdjustmentFiltersWithOptions:]. One of the options you can pick is kCIImageAutoAdjustCrop.

Good luck!

@YIFanH
Copy link
Author

YIFanH commented Apr 13, 2016

@TimOliver
Thanks for your reply, I uesd the lines and vanishing point feature to find the rotate angle, but the results is is different with the ios. I guess the ios only used the lines feature,So i make the special image which only have some lines,but can not find a simple rules to find angle。

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

No branches or pull requests

2 participants