图像旋转算法 [英] Image rotation algorithm

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

问题描述

我在寻找一种算法,通过一些度旋转的图像(输入)。

I'm looking for an algorithm that rotates an image by some degrees (input).

public Image rotateImage(Image image, int degrees)

(图片实例可以替换为int []包含每个像素的RGB值, 我的问题是,我需要实现它的JavaME的MIDP 2.0的项目,所以我必须使用code可运行在JVM之前的1.5版 谁能帮我这个?

(Image instances could be replaced with int[] containing each pixel RGB values, My problem is that i need to implement it for a JavaME MIDP 2.0 project so i must use code runnable on JVM prior to version 1.5 Can anyone help me out with this ?

编辑:我忘了,更不用说我没有可用的SVG api和我需要一种方法,通过任意的程度比其他90旋转 - 180- 270

I forgot to mention that i don't have SVG APIs available and that i need a method to rotate by arbitrary degree other than 90 - 180- 270

此外,没有java.awt中。*包可在MIDP 2.0

Also, no java.awt.* packages are available on MIDP 2.0

推荐答案

一描述的图像旋转算法的最佳页,我在互联网上找到的是依赖于丹彭博的优秀的的leptonica库。虽然leptonica库本身是用C语言编写,并不会帮你,他对图像旋转算法的网页:

One of the best pages describing image rotation algorithms I've found on the internet is tied to Dan Bloomberg's excellent leptonica library. While the leptonica library itself is written in C and won't help you, his page on image rotation algorithms:

http://www.leptonica.com/rotation.html

绝对是值得一读。你很可能要实施类似的旋转通过区域映射算法,他描述了在页面的第二部分。

is definitely worth a read. You will most likely want to implement something like the Rotation by Area Mapping algorithm he describes in the second portion of the page.

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

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