[英]What does CIImageAccumulator do?
The apple documentation states when the CIImageAccumulater
can be used, but unfortunately it does not say what it actually does. Apple文档说明了可以使用
CIImageAccumulater
时间,但不幸的是,它没有说明其实际作用。
The CIImageAccumulator class enables feedback-based image processing for such things as iterative painting operations or fluid dynamics simulations.
CIImageAccumulator类可用于基于迭代的绘画操作或流体动力学仿真之类的基于反馈的图像处理。 You use CIImageAccumulator objects in conjunction with other Core Image classes, such as CIFilter, CIImage, CIVector, and CIContext, to take advantage of the built-in Core Image filters when processing images.
您可以将CIImageAccumulator对象与其他Core Image类(例如CIFilter,CIImage,CIVector和CIContext)结合使用,以在处理图像时利用内置的Core Image过滤器。
I have to fix code that used a CIImageAccumulator
. 我必须修复使用
CIImageAccumulator
代码。 It seems to me that all it is meant to do, despite its name, is to return a CIImage
with all CIFilter
s applied to the image. 在我看来,尽
CIFilter
什么名字,但它要做的只是返回一个CIImage
其中所有CIFilter
应用于该图像。 Adding the first image however darkens the output. 但是添加第一张图像会使输出变暗。 That is not what I would expect from an accumulator nor from any other Operator that enables feedback based image processing.
这不是我希望从累加器或任何其他启用基于反馈的图像处理的运算符获得的期望。
Can anyone answer what logic / algorithm is being used when setting and getting images in and out of the CIImageAccumulator
任何人都可以回答在设置图像到
CIImageAccumulator
中以及CIImageAccumulator
取出图像时正在使用什么逻辑/算法。
The biggest advantage of the CIImageAccumulater
is that stores its contents between different rendering steps (in contrast to CIFilter
or CIImage
). CIImageAccumulater
的最大优点是可以在不同的渲染步骤之间存储其内容(与CIFilter
或CIImage
)。 This allows you to use the state of a previous rendering step, blend it with something new and store that result again in the accumulator. 这使您可以使用上一个渲染步骤的状态,将其与新内容混合,然后将结果再次存储在累加器中。
Apple's main use case is interactive painting: You retrieve the current image from the accumulator, blend a new stroke the user just painted with a gesture on top of it, and store the resulting image back into the accumulator. 苹果公司的主要用例是交互式绘画:您可以从累加器中检索当前图像,将用户刚刚绘制的新笔划与笔触混合在一起,然后将结果图像存储回累加器中。 Then you display the content of the accumulator.
然后显示累加器的内容。 You can read about it here .
你可以在这里阅读。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.