Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th July 2017, 20:19   #1  |  Link
luquinhas0021
The image enthusyast
 
Join Date: Mar 2015
Location: Brazil
Posts: 270
What is the blurriest image downscaler?

The blurriest image downscaler which doesn't produce other artifacts, like aliasing, Moiré, color/bright change, edge distortion (Unless blur) or new strange details, like lines or whatever that wasn't in image.
__________________
Searching for great solutions
luquinhas0021 is offline   Reply With Quote
Old 24th July 2017, 20:36   #2  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
Are you asking in regards to a specific purpose? Avoiding artifacts all together can be difficult for a resizer, simply because it is trying to keep the picture intact as much as possible whilst reducing the resolution. This can result in the artifacts you described. Probably the most ideal solution for your query is to use a simple pointresize, then apply a post resize blur using blur, or Gblur (gaussian blur) from Modplus.

Last edited by burfadel; 24th July 2017 at 20:40.
burfadel is offline   Reply With Quote
Old 24th July 2017, 20:46   #3  |  Link
luquinhas0021
The image enthusyast
 
Join Date: Mar 2015
Location: Brazil
Posts: 270
Quote:
Originally Posted by burfadel View Post
Are you asking in regards to a specific purpose or application?
Yes. It's for image upscaling, which can de done by downscaling a n x n part of an image using the downscaler I asked for, two times in each dimension. Then, I upscale it, two times in each dimension, too, using a super preserve detail and sharpness upscaler. So, I will have the original n x n part and the upscaled n x n part. Comparing this two, I will estimate the point spread function of the upscaled n x n part, in relation with the original one. This will be done with many, many, many n x n parts of image, generates randomly, and it will be passed into a neural network, for it learned the psf of a upscaled n x n part of this multiple images and try deconvolve them.
__________________
Searching for great solutions
luquinhas0021 is offline   Reply With Quote
Old 24th July 2017, 20:57   #4  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
Unfortunately that won't work. If you downsize the image half vertical and half horizontal, you will be left with an image a quarter of the original resolution. You are reading four pixels and resulting with one, so any information in those pixels is either lost or combined to get to the one resultant. If you then blur there simply won't be the information to result a higher quality image than what you started with, or at least one with desirable results.

I do understand your concept though, but the resizing part doesn't make sense when you could just apply Gblur for a more accurate result. In some ways what you suggested sounds like an adaptive unsharp mask. There are other ways of going what you suggest, like creating advanced masks in MaskTools, but that would be better described by someone that knows how to manipulate those functions.

Last edited by burfadel; 24th July 2017 at 21:08.
burfadel is offline   Reply With Quote
Old 24th July 2017, 21:07   #5  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
GaussResize(width, height, p=19)
Lower p is blurrier but may have a slightly blocky look - see this related thread.
raffriff42 is offline   Reply With Quote
Old 27th July 2017, 08:02   #6  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,056
The most notable property of bilinear resizing is that it is very blurry, but produces no other artifacts. However, like almost every other resizer in existence, it will very slightly alter the color and brightness of the image (http://entropymine.com/imageworsener/filterfairness). The only known resizer that doesn't do this would be area-averaging, AKA pixel-mixing (http://entropymine.com/imageworsener/pixelmixing), which Chikuzen has implemented as Arearesize (https://github.com/chikuzen/AreaResize). Like bilinear, it produces a lot of blurring but no other artifacts.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Old 27th July 2017, 14:28   #7  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
The colors are perfect, but there are some edge artifacts. It's a gamma thing. Resizing should really be done in linear light.

I have remove_gamma and restore_gamma for this purpose. Requires AVS+ and high bit depth.
http://avisynth.nl/images/Utils-r41.avsi

1920x1080, bilinear resize /8, then point resized x2 for viewing. Left - normal. Right - linear light.


1920x1080, gauss resize (p=1) /8, point resized x2 for viewing. Left - normal. Right - linear light.


The color bars may look different, but they are identical. They look different because the transitions are darker. To see this, probe them with a tool such as ColorPic.

EDIT use GaussResize(..., p=1) for extreme blurring

EDIT better post muh script.
Like I said, requires AVS+ and my Utils-r41.avsi
Code:
ColorbarsHD2(1920, 1080, rgb_out=1>0, bits_out=16)
gamma=1>0
remove_gamma(gamma)
#[[
#BilinearResize(Width/8, Height/8)
GaussResize(Width/8, Height/8, p=1)
#]]
restore_gamma(gamma)
ToVdubFM

Last edited by raffriff42; 27th July 2017 at 14:57.
raffriff42 is offline   Reply With Quote
Old 29th July 2017, 04:17   #8  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
For those of you who like to look at things other than color bars (why??), here's a real world example


Left=Bilinear; Right=Bilinear, linear light.
Center=cropped samples of the original: compare the detail of the white mortar and the dark ironwork -- you decide which is more accurate.
Make sure your browser is showing the image at 100% size!

(can't recall where the original came from, but this is basically the same image; University of Toronto, Soldier's Tower)
raffriff42 is offline   Reply With Quote
Old 6th August 2017, 03:44   #9  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,056
Quote:
Originally Posted by raffriff42 View Post
2C%20bilin%2Bgamma%29.jpg?raw=1[/img]
Left=Bilinear; Right=Bilinear, linear light.
Center=cropped samples of the original: compare the detail of the white mortar and the dark ironwork -- you decide which is more accurate.
They look identical to me.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Old 6th August 2017, 03:49   #10  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by Katie Boundary View Post
They look identical to me.
They are quite different - Pay attention to the boundaries, Ms. Boundary ;

Load them in tabs in something like avspmod, or a browser flip back & forth between tabs . Avspmod is nice because you can use the number keys to do this
poisondeathray is offline   Reply With Quote
Old 6th August 2017, 04:02   #11  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,056
Quote:
Originally Posted by poisondeathray View Post
They are quite different - Pay attention to the boundaries, Ms. Boundary ;

Load them in tabs in something like avspmod, or a browser flip back & forth between tabs . Avspmod is nice because you can use the number keys to do this
I opened it in MSpaint twice, hit select all, and dragged one copy of the image to the let of the screen so the two images would be in the same place. The image on the right is slightly brighter or paler than the one on the left, but not by enough of a margin for me to determine which one more closely resembles the images in the center.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.