Thank you for your answer.

2018-05-09 13:22 GMT+02:00 johannes hanika <hana...@gmail.com>:

> heya,
>
> On Wed, May 9, 2018 at 12:27 PM, rawfiner <rawfi...@gmail.com> wrote:
> > 2018-05-08 17:16 GMT+02:00 johannes hanika <hana...@gmail.com>:
> >> i'm guessing you want to detect whether you are running a
> >> DT_DEV_PIXELPIPE_FULL pipe in darkroom mode (as opposed to
> >> DT_DEV_PIXELPIPE_PREVIEW or _EXPORT) and then do this downscaling
> >> yourself before running your algorithm on reduced resolution.
> >>
> >
> > Yes, and I would like to know the zoom factor in case of
> > DT_DEV_PIXELPIPE_PREVIEW , in order to downscale only if the image is
> > sufficiently zoomed out (for example, I don't want to downscale the
> image if
> > the zoom is at 90%, but I want to downscale if it is below 50%).
>
> right. to determine the total scale factor, you would need to do
> something like for instance in sharpen.c:
>
> const int rad = MIN(MAXR, ceilf(d->radius * roi_in->scale /
> piece->iscale));
>
> which determines the pixel radius scaled by input buffer scaling
> (iscale) and region of interest scaling (roi_in->scale).
>

Yes, I have seen that kind of things in the code of non local means.
Yet, if I understand correctly, this allows to retreive the scale factor
for an already downscaled image, i.e. when the image was downscaled
previously in the pipeline.
What I would like is a bit different, as it would be to know if I can
downscale the image or not, depending on the zoom level in the darkroom.
But I guess that I will find the necessary information in the function
dt_iop_clip_and_zoom_mosaic_half_size_f() that you pointed me out!


> note that the preview pipe is what fills the whole image but
> downscaled (iscale != 1) in the navigation view in the top left
> corner. the "full" pipeline fills the pixels in the center view of
> darkroom mode, at exactly the scale and crop you see on screen (iscale
> == 1 mostly but the other scale and bounds in roi_in will change with
> the current view).
>
> to find out whether you're running either one of the two you'd write
> something similar to bilat.c:
>
> if(self->dev->gui_attached && g && piece->pipe->type ==
> DT_DEV_PIXELPIPE_PREVIEW)
>

Ok, thank you for these explainations
I think I have everything I need to make some new trials!

Regards,

rawfiner

___________________________________________________________________________
darktable developer mailing list
to unsubscribe send a mail to darktable-dev+unsubscr...@lists.darktable.org

Reply via email to