Filters : Preview and Adjustement Layer

Cyrille Berger cberger at cberger.net
Mon Jan 28 13:00:16 CET 2008


Hello,

There is a few remaining issues concerning filters and preview and adjustement 
layers. Some filters don't get enough information when run in a preview layer 
or in an adjustement layer.

* Problems

 - filters that need the exact bound (I am thinking about round corner, lens 
correction or ), the image size isn't good enough, at least for "lens 
correction", because it needs to know the center of the photo, and on a 
composition of photo nothing proves that it is the center of the KisImage.
 - filters that need to compute a statistics on an image (I am mainly thinking 
about "fast color transfer" and "auto-adjustement"), there are two issues 
with those filters, firstly they need the full image and secondly they need 
to re-compute the full statistics for each change
 - filters that need the full image (I am thinking about the wavelet noise 
reducer or pyramidal sharpening (from krita-plugins) ), I am guessing that 
those filters will gives good enough result when applied on smallest part of 
an image

* Ideas of solutions
 - introduce some sort of dependency between update of the projection, for 
instance "lens correction filter" will force the adjustement layer to wait 
for the data bellow to be available
 - to address the first issue, I think that having the exact bound of the 
original image is a good enough approximation, and an other solution is to 
further refine the exact bound each time new data is available.
 - for statistics based filter, I am thinking that having a KisFilterStatistic 
object that we could give to process could be the solution, basically, 
instead of computing the statistics in KisFilter::process, we would do it in 
KisFilterStatistic, and when updating a small area of the paint device, we 
could just call a method from KisFilterStatistic with the pixels before and 
the pixels after (for instance KisFilterStatistic::append and 
KisFilterStatistic::remove). That doesn't solve the problem of the first 
initialization that still need to have access to the full KisPaintDevice  (or 
to use KisFilterStatistic::append) The use of such filter is probably going 
to trigger a lot of update in the projection, but I guess it can be done in 
the background (we probably would have to make the area that was painted have 
a higher priority)

Any other ideas, thoughts on the subject ?

PS: I have started a page about the state of filters : 
http://wiki.koffice.org/index.php?title=Krita/Filters_State

-- 
Cyrille Berger


More information about the kimageshop mailing list