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. |
|
|
#61 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,568
|
Add this to your script, top or bottom, or save it to an avsi file in your \avisynth 2.5\plugins folder:
Code:
function makemod(clip c,int "xmod",int "ymod",bool "crop") {
xmod=default(xmod,16)
ymod=default(ymod,xmod)
crop=default(crop,false)
c
ox=width
oy=height
xm=width%xmod
ym=height%ymod
w=c.isrgb32() || c.isrgb24() ? 1 : 2
right=c.crop(ox-w,0,w,0)
right=right.stackhorizontal(right,right,right)
right=xmod>w*4 ? right.stackhorizontal(right,right,right) : right
vx=ox % xmod==0 ? c : stackhorizontal(c,right.crop(0,0,xmod-(ox % xmod),0))
bottom=vx.crop(0,oy-w,0,w)
bottom=bottom.stackvertical(bottom,bottom,bottom)
bottom=ymod>w*4 ? bottom.stackvertical(bottom,bottom,bottom) : bottom
vy=oy % ymod==0 ? vx : stackvertical(vx,bottom.crop(0,0,0,ymod-(oy % ymod)))
cropped = c.crop(0,0,width-xm,height-ym)
return crop == true ? cropped : vy
}
MakeMod(4) It'll mirror the edge pixels so that filters don't munge a huge black border into the image. I used to use it a lot when I did a lot of upscaling & filtering of web images, and it had to be fairly memory efficient. |
|
|
|
|
|
#63 | Link | ||
|
Registered User
Join Date: Apr 2005
Posts: 213
|
Quote:
See the script only as a simple example, not as a ready to use solution which handles all possible input values.Quote:
Cropping unnecessary pixels already begins, when a conversion from RGB32 to YV12 takes place (if width or height of the image are not even numbers). So the best way should be a separate script (a template) which can be placed in front of any filter to make a special mod resolution. I will provide two new scripts, called "FritzPhotoModStart" and "FritzPhotoModEnd". "FritzPhotoModStart" will have two parameters "xmod" and "ymod" (same parameters as in foxyshadis script ) and should be the very first script in the job list (where the input is RGB32). "FritzPhotoModEnd" should be placed after filtering. It crops the added borders, so the image has its original resolution again.Example (job list): Code:
FritzPhotoModStart GradFun2DBMod FritzPhotoModEnd Last edited by Archimedes; 14th June 2010 at 23:31. |
||
|
|
|
|
|
#64 | Link | |
|
Registered User
Join Date: Apr 2005
Posts: 213
|
Quote:
|
|
|
|
|
|
|
#65 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,568
|
All of the sharpening filters used here already are useful approximations of deconvolution filters. *.mp4 guy, Didée and I have looked into real ones and come away with "not worth the time and effort," too much information is already thrown away by the time it gets into Avisynth. They may be more useful with 10+ bit raw photos, if you knew the exact lens curvature, but I've never had that kind of info.
|
|
|
|
|
|
#66 | Link |
|
Registered User
Join Date: Jan 2005
Location: cz
Posts: 704
|
Thank you both for reply! I know image analyzer. Have tried http://www.adptools.com/en/deblurmyi...scription.html. Best results got with astroart, but it is not free.
My source is raw image from nikon d70. |
|
|
|
|
|
#67 | Link |
|
Registered User
Join Date: Apr 2005
Posts: 213
|
Update available.
Changes: Code:
lib: - Updated blah. plugins: - Updated SmoothAdjust. Templates: - Added FritzPhotoModBegin and FritzPhotoModEnd. As I wrote above, FritzPhotoModBegin should be the very first script in the job list (before any color conversion is occuring). FritzPhotoModEnd should be placed at the very end of the job list. The script is cropping the added pixels and bring back the original resolution. foxyshadis, thanks for sharing your script! Last edited by Archimedes; 15th June 2010 at 14:01. |
|
|
|
|
|
#70 | Link |
|
Registered User
Join Date: Jan 2005
Location: cz
Posts: 704
|
Archimedes, thank you for nice example. (I dont think there is a motion blur there.)
Please post your settings. On first look i thought its not good result, but on second i think - its good! Thank you, Terka |
|
|
|
|
|
#71 | Link | ||
|
Registered User
Join Date: Apr 2005
Posts: 213
|
Quote:
![]() Quote:
SSSharp: Code:
rad = 1.25 ssw = False strength = 15.0 iter = 1 ss = True denoise = 0 Code:
Ax = 10 Ay = 10 Sx = 3 Sy = 3 Bx = 1 By = 1 a = 0.96 h_y = 3.6 h_u = 0.0 h_v = 0.0 sse = True |
||
|
|
|
|
|
#72 | Link | |
|
Registered User
Join Date: Jan 2005
Location: cz
Posts: 704
|
which order?
1.nlmeans, 2. SSSharp or 1. SSSharp 2.nlmeans Quote:
maybee these areas could be eliminated. it looks like kind of ghosting. will be great if its possible. |
|
|
|
|
|
|
#74 | Link |
|
Registered User
Join Date: Feb 2004
Location: USA
Posts: 1,348
|
The effect is due to incompletely suppressed haloing and oversharpened "flat" blurring, you can see that the erroneous features are already slightly present in the source due to the characteristic out-of-focus blur from the camera. And yes the situation can be improved on, but its difficult to get that much sharpening without screwing up the already screwy blur-gradients.
Example1 Example2 Example3 |
|
|
|
|
|
#75 | Link |
|
Registered User
Join Date: Apr 2005
Posts: 213
|
I have changed the template SSSharp (SuperSlowSharpen) a little bit. After sharpening there was very often bright thin lines around the image. And there was also a problem with the denoise parameter (not really usable). So i add a border (mirrored pixels) around the image before filtering and crop them after filtering. This helps.
|
|
|
|
|
|
#79 | Link |
|
Registered User
Join Date: Feb 2004
Location: USA
Posts: 1,348
|
Its based on some bits of blah that I am fiddling with. Technically its not significantly similar in any way to any of the deconvolution methods I've read about. Its non-iterative, only needs to have a ballpark of the blur radius to function, and the noise suppression is just part of how it works. Its more similar to sssharp (and a bit less to medsharp) than anything else I know of, and its not particularly similar to either.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|