像camscanner这样的Android裁剪图像 [英] Android crop image like camscanner

查看:150
本文介绍了像camscanner这样的Android裁剪图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个需要图像裁剪功能(例如camscanner android应用程序)的项目,当拍照时,当用户单击裁剪按钮时,应在camscanner中显示一个矩形叠加层。矩形路径可以拉伸到任意角度并可以进行裁剪。请帮我解决问题。

I am developing a project which requires the image crop feature like camscanner android application,when a picture is taken and when user clicks the crop button, a rectangle overlay should be shown as in camscanner. Where the rectangle path can be stretched to any angle and can perform crop.please do help me with a solution.

我指的是 https://github.com/edmodo/cropper 。但这仅是带有4个点的矩形叠加层。如果有人有链接或解决方案,请帮帮我!

I was referring to https://github.com/edmodo/cropper . but this as only rectangle overlay with 4 points.please do help me if any one has a link or solution!!

推荐答案

I有类似的要求,我也没有找到任何与CamScanner类似的具体解决方案,因此我接受了挑战并实现了与CamScanner类似的扫描库(在OpenCV之上,丰富的图像处理库),可以轻松地集成到现有的应用程序,使用该库,您将能够以任意角度选择确切的边缘,并从选定的4个边缘中相应地裁剪文档,并更改裁剪图像的透视变换。

I had a similar requirement and I too didn't find any concrete solution similar to CamScanner, so I have taken the challenge and have implemented a scan library (on top of OpenCV, rich image processing library) similar to CamScanner which can be easily integrated into an existing application, using the library you will be able to select the exact edges in whatever angle and crop the document accordingly from the selected 4 edges and change the perspective transformation of the cropped image.

Android ScanLibrary的Github链接: https://github.com/jhansireddy/AndroidScannerDemo

Github link of the Android ScanLibrary: https://github.com/jhansireddy/AndroidScannerDemo

这篇关于像camscanner这样的Android裁剪图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆