Selur's Little Message Board

Full Version: "Blur" filters in Hybrid
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
Maybe also try a lower the strength of BlindDehalo3 and test whether using different Sharpness and PPMode values changes the result.
Hello Selur,

  I attached a couple of examples where after having resized a frame with realesr-general is:

     a) applied a weighted merge (weight: 0.3, 0.4, 0.5, 0.6, 0.7) with a frame resized with "lanczos"
     b) applied BlindDeHalo3 with strength 80, 100, 120

  In my opinion the method a) provides better overall results (with my eyes). I don't see an easy way to replace the artifacts introduced using realesr-general by applying a DeHalo or Blur filter after the resize, this because the image is already damaged and the only way to reduce the effect is to replace part of it with a non damaged image.

Dan
After I spend hours implementing this, you post this now. Sad
Send you a link to a dev version for testing which allows to:
  • select the base resizer that is used for the smoothed clip
  • select whether that resizer should be:
    • merged using a simple weight for all planes ('all') or by a weight per plane ('split')
      Also, in 'split' mode one can select whether the weights should be applied in YUV or RGB color space.
    • masked merged with the smoothed clip, where the mask is build using BlindDehalo3 and an edge mask on the smoothed clip.
    it also has an option 'Config->Internals->Handling->Do not Synth preview process priority'.

    Going to bed now.
    Please test this. If the BlindDehalo3 part is not useful and the simple weighted merge is enough, let me know and I'll remove it.

    Cu Selur

    Ps.: going to bed now Smile
Hello Selur,

    Thanks for the new dev-version. I will test it tomorrow.

    In effect your implementation is going in the right direction because in this case BlindDeHalo3 is used to build the mask to be used to merge the frame resized with realesr-general and a non damaged frame resized with lancozos. The examples provided in my previous post BlindDeHalo3 was used directly on the frame resized with realesr-general and I posted it to confirm that is necessary to go in the direction of merging the frames. Your implementation is even better because in this case BlindDeHalo3 is used to perform a more edge-aware merge by using a MaskedMerge. If the Mask is built in a good way this approach should provide better results.
    But a lot of tests are necessary to find the right way.

Thanks again Smile
Dan
Hello Selur,

   I started to use the new version. It is possible to build a lot of combinations and a lot of tests are necessary.
   I noted that Kirsch is listed 2 times, the second one should be available to select Kirsch2 but in the script is still used Kirsch.
   It would be useful if is enabled the possibility to view in output the generated mask.

Thanks,
Dan
Quote: I noted that Kirsch is listed 2 times, the second one should be available to select Kirsch2 but in the script is still used Kirsch.
It would be useful if is enabled the possibility to view in output the generated mask.
will look at it after work
Send you a link to a dev version which adds Krisch2 and has a 'Show mask' option.

Cu Selur
Hello Selur,

  Thanks for the new version!  Smile
 
  As last change, it could be useful an option to swap the sources in MaskedMerge or to invert the Mask (should be the same as the swap of sources).

Dan
send you a new link Smile

Cu Selur
Hello Selur,

   thanks for your release. I performed some tests and I think that could be useful share the results obtained.

      The problem that required the implementation of additional filters after the resizing, is mainly due to the fact that realesr-general, which is a very good resizer, sometime introduces artifacts on the resized image that are very bad. Of course, if the video to be resized is very good these problems are absent, but probably in this case would be not necessary to use realesr-general. An example of artifacts introduced by realesr-general is shown in the following link:

https://imgsli.com/MTQ4NTE3

    the video contained some noise so I applied KMNL with strength 2.0 to remove it (KMNL is a good and fast denoise). As it is possible to see, with realesr the face was deformed and were removed many terrain details. To overcome this problem, it is not possible to simply apply a DeHalo filter (usually used to remove the dark halos from too strong "Edge Enhancement") to improve the images, because in this case the image is already deformed. To solve this problem is necessary to substitute part of the image with an image not deformed.
A simple solution is to merge the video resized with realeser with a video resized with a simpler resize (spline36 or lanczos) at the following link there is the comparison of the merge with weight 0.3 and 0.5:

https://imgsli.com/MTQ4NTI0
 
    In this way the terrain details were restored and with weight 0.3 was removed also the artifact on the face (with weight 0.5 is still a little visible).
It is possible to improve the quality ?: theoretically by performing a weighted merge, could be possible to improve the quality. To do that is available the function MaskedMerge. The problem with this function is that the weights are contained in the mask, there is not the possibility to apply an additional weight to the function call. To solve this problem was decided to use the filter BlindDeHalo3 (BDH3) to add more control on the weights. In the following link there is an example of mask generated using BDH3 with strength 25 and 300:

https://imgsli.com/MTQ4NTI2

    As it is possible to see the mask built using BDH3 with strength 300 has the white edges softer (less weight) and thicker respect to the one built with strength 25. What is the effect of this mask on the image? at the following link there is the answer:

https://imgsli.com/MTQ4NTM1

   unfortunately the effect is not very good, this because the artifact is located on dark part of the mask that is replaced with the frame resized with realeser. So it is necessary to invert the mask. The inverted masks are shown at the following link:

https://imgsli.com/MTQ4NTM2

  This could be a good solution, since realesr is very good in enhance the details and the edges of the objects. Using the inverted mask, only the dark lines (the edges) will be replaced with realesr. It is interesting to note that BDH3(300) allows to reduce the weights on the edges, especially on the face of the woman. Let’s see the impact of these masks on the final image:

https://imgsli.com/MTQ4NTM4

   In both the images the artifact on the face was almost removed, with BDH3(25) providing a sharper image.

Finally in the following link there is the comparison between the image obtained with a simple weight of 0.3 the one obtained using the inverted mask built with BDH3(25):

https://imgsli.com/MTQ4NTQw

   The 2 images are similar but the one obtained with BDH3(25) is a little sharper, because with the mask was possible to apply more weight on the edges obtained with realesr.

   To see better the effect of the filters applied, in this link there is the comparison between the original image and the final one obtained with the inverted mask built with BDH3(25):

https://imgsli.com/MTQ4NTQz

    I’d like thanks again Selur without whose help it would not have been possible to produce the test images.

Dan
Pages: 1 2 3 4