如何在java中剪切四分之一的图像 [英] How to cut an image in quarters in java

查看:176
本文介绍了如何在java中剪切四分之一的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我上传到java编写程序中的图像剪切成四分之一,特别是金字塔。每个金字塔等级都有一个相应的图像,例如给定abc.pgm的输入图像,您将为金字塔等级1生成输出图像abc1.pgm,为金字塔等级2生成abc2.pgm。每个级别应该是前一级别的四分之一大小。但我真的不明白怎么做...任何信息都会非常感激!

I am trying to cut an image that I have uploaded into a java written program into quarters, specifically a pyramid. Every pyramid level will have a corresponding image, for example given an input image of abc.pgm, you will generate output images abc1.pgm for pyramid level 1, and abc2.pgm for pyramid level2. Each level should be in a quarter size from the previous level. But I really don't understand how to do this... any information would be greatly appreciated!

推荐答案

请查看我对该问题的最后评论,从当然,我理解。请求很模糊(你使用的图形框架/ API是什么?),但你需要的是:

http://en.wikipedia.org/wiki/Recursion [ ^ ],

http://en.wikipedia.org/ wiki / Recursion_%28computer_science%29 [ ^ ]。



有趣的是,这种结构经常(但并非总是)导致分形,具有非整数的几何对象(或在所谓的非均匀分形的情况下,甚至不存在 Hausdorff维数。这些物体甚至可以模拟现实生活中发现的许多现有物体,这些物体表现出非常奇特的物理特性,特别是在光学和固态物理学中。



请参阅:

http:/ /en.wikipedia.org/wiki/Fractal [ ^ ],

http://en.wikipedia.org/wiki/Hausdorff_dimension [< a href =http://en.wikipedia.org/wiki/Hausdorff_dimensiontarget =_ blanktitle =New Window> ^ ],

http://en.wikipedia.org/wiki/Fractal_dimension [ ^ ]。



当你有机会时这是真的一个案例(并且应该使用它,如果你是一个好学生)超越你的狭隘(专业),即使它像软件那么广泛,并获得一些基本的背景,特别是在数学和物理学。使用此更改!



-SA
Please see my last comment to the question, starting with "Sure, I understand that". The request is vague enough (what graphics framework/API are you using?), but what you need is this:
http://en.wikipedia.org/wiki/Recursion[^],
http://en.wikipedia.org/wiki/Recursion_%28computer_science%29[^].

Interestingly, such constructions often (but not always), lead to fractals, geometric objects with non-integer (or even non-existing, in case of so called non-uniform fractals) Hausdorff dimension. Such objects can even model many existing object found in real life, which manifest really exotic physical properties, especially in optics and solid-state physics.

Please see:
http://en.wikipedia.org/wiki/Fractal[^],
http://en.wikipedia.org/wiki/Hausdorff_dimension[^],
http://en.wikipedia.org/wiki/Fractal_dimension[^].

This is really a case when you get a chance (and should use it, if you are a good student) to go beyond your narrow ("profession"), even if it so broad as "software" and get some fundamental background, in particular, in mathematics and physics. Use this change!

—SA


这篇关于如何在java中剪切四分之一的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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