本文介绍了如何使用JavaScript修复图像透视失真和旋转?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些使用手机拍摄的照片。是否有任何JavaScript库可以拉直纸张的照片并将其展平?例如,我想创建一个矩形图像,没有任何图像失真。



换句话说我想知道如何修复透视图使用JavaScript进行失真和旋转?



例如,我在



如何使用javascript修复此类图像?

解决方案

看起来像是什么您正在寻找。


I have some images that takes using mobile phone. Is there any JavaScript library which can straighten the photo of a paper and flatten it? For example I want to create a rectangular image without any distortion from this image.

In the other words I want to know how to fix perspective distortion and rotation with JavaScript?

For example I found below sample image from this article:

How to fix this type of image with javascript?

解决方案

Looks like https://www.npmjs.com/package/perspective-transform is what you are looking for.

这篇关于如何使用JavaScript修复图像透视失真和旋转?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-16 19:29
查看更多