使用 Java2D 对 ROI 进行图像过滤
我想在用户选择的感兴趣区域上应用一些过滤器[图像过滤器]。
我需要 API 来获取该区域的像素 [多边形或手绘矩形] 并应用
过滤器。对此工作有何建议?
i want apply some filters [image filter] on Region Of Interest that user selected.
i need API for getting pixels of this area [polygon or freehand also Rectangle] and apply
filter.any Suggestion for this work ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上,您需要做的是:
在伪代码中:
要应用过滤器,请参阅 java.awt.image
如您所见,这个可以在java2d中完成,但是API相当复杂。如果您有兴趣,我可以建议用纸浆核心作为替代框架。它包括几个预定义过滤器和一个用于应用它们的单行 API。请参阅演示。还包括一个 Java2DSprite 类,用于在pullcore 和java2d 之间轻松移植。
Basically, what you need to do is:
In pseudocode:
For applying filter, see java.awt.image
As you can see, this can be done in java2d, but the API is quite complicated. If you're interested I can suggest pulpcore as a replacement framework. It includes several predefine filters and a one-line-API for apply them. See demo. Also includes a Java2DSprite class for easy porting between pulpcore and java2d.