Hi All,
What could one try to improve the appearance of "glassy" video? It was shot with a wide-angle lens attachment which caused a glassy blur across almost the entire image except the centre. Here's a short sample:
http://www.mediafire.com/file/0lym5r657vplaa7/Wide-angle_lens_blurring_sample.wmv
What processes might this video benefit from?
Which particular Avisynth or VirtualDub tools would you recommend for the job?
Many thanks in advance,
Francois
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 11 of 11
			
		- 
	
- 
	I'm guessing you tried to zoom in through a cheap adapter. The only way to fix it is to get a better lens. Surely those ants will retun for a retake. 
 
 There's really no good way to unblur something that dramatic -- and you have center to edge VARIABLE blur.
 
 Sorry.Last edited by smrpix; 24th Oct 2012 at 15:06. 
- 
	As smrpix suggested, one approach to improve it would be a variable sharpen through a mask . Areas in white are 100% transparent, black 0% transparent, shades in between are variable transparency 
 
 So take a sharpened, higher contrast version and apply through a circular gradient mask . This can be done in any NLE, compositing tools like after effects , or avisynth
 
 I think the gradient isn't exactly circular - the top part on the center distortion is still a bit blurry in this quick demonsatration . I don't have time , but if you spend more time fixing up the mask to match your footage, or tweaking the filtered overlay layer - it should match better
 
 eg.
 https://forum.videohelp.com/attachments/14384-1351107027/sharpen.xvid.avi
 
 Code:a=ffvideoSource("Wide-angle lens blurring sample.wmv") b = a.medianblur(12,8,8) c = a.repair(a.repair(a.repair(a.repair(a.repair(a.repair(a.repair(a.repair(b,1),1),1),1),1),1),1),1) d = mt_lutxy(a,c,"x x y - abs 1.62 2 ^ / 1 1.62 / ^ 1.62 3 ^ * x y - x y - abs 1.62 + / * +",U=3,V=3) d lsfmod(strength=300) filtered=last mymask=imagesource("mask2.jpg") overlay(a,filtered, mask=mymask)
- 
	Definitely helps. I'm impressed. 
 
 But, as a lesson for going forward, it takes a lot more time to filter out the blur than to unscrew the lens.
- 
	
- 
	So am I. And grateful! Many thanks, poisondeathray. I hope to work on this the coming weekend. 
 
 Absolutely. What happened was I first made Rookie Mistake #1. I took the new lens on the trip without first evaluating its results on the computer at home. Of course it looked brilliant through the viewfinder!
 
 Then after I finished processing the trip's material, I made Rookie Mistake #2. I'd done what I wanted, wrote and backed up the output, then deleted the source! This was about 2 years ago and only since did I learn about all these awesome video restoration techniques and this knowledgeable restoration sub-forum. For my sins I'm now working with 1900 kbps WMV instead of 28880 kbps DV AVI . .
 
 Many thanks again guys.
- 
	Results so far seem good! A couple of things to try still but I'm very happy with the results so far, thanks. If you don't mind I'd like to learn from what you've done here. At a very high level I know the original is being overlaid with a sharpened version through a gradiated mask. But your sequence starts off with blurring!  
 - What is the purpose of medianblur() here?
- Does calling repair() this way create further smoothing/blurring, and why?
- Why so many instances of repair(), and when do you know what's enough?
- What's the role of mt_lutxy() here and how did you arrive at that hectic RPN expression?
- Does
 d 
 lsfmod(strength=300)
 effectively achieve the same as 
 d.lsfmod(strength=300)
 
 here? I.e. is lsfmod() applied to last=d?
 
- 
	I'm not sure - it's still work in progress by didee (one of the avisynth gurus) you can ask him. I think it's prebluring as preprocessing . I notice with masktools type sharpeners the more preblurred, the more sharp it becomes. I can only tell you it my observations with those settings - that it does more than sharpen, contrast and levels are adjusted too. "Traditional" sharpeners tend to enhance outer edges more, by masktools sharpeners like Finesharp() and masktools type sharpeners have a different look and enhance fine details and edges 
 
 http://forum.doom9.org/showthread.php?p=1595531#post1595531
 
 Yes, d.lsfmod(strength=300) is the same thing
- 
	Many thanks. And thanks also for confirming what I've begun to suspect about more pre-blurring as well as the adjustments that result from this; I've been playing with: 
 Code:b = a.medianblur (64, 8, 8) ... d.lsfmod (strength=300) # brightness to compensate for manually decreasing contrast Tweak(hue=0.0, sat=0.8, bright=15.0, cont=0.8) filtered = last # GraMaMa.dll mymask = GraMaMa (filtered, mode=1, a=360, b=288, rad=300, binarize=false) overlay (a, filtered, mask=mymask) 
- 
	
- 
	For the sake of posterity, below is what I ended up with: 
 
 Code:# Stage 1 - deblur # a = last dblurd = ALBR(a) # Create deblurred copy originl = ALBR(a, mode="Denoise") # Denoise original by same amount # Splice in sharpened footage only where needed splclst= "3227:3271,6300:6345,7002:7034,7639:7680,8930:8971,11651,11696:11754,14849:14874,17085:17258,17487:17534,18025:18158" splclst= splclst+",18735:18810,19528,21872:21918,24691:24786,25014:25054,25516:25539,27338:27444" SpliceFiltered(originl, dblurd, splclst, absoverlap=true) Code:# Stage 2 - deshake # # > VirtualDub.Deshaker() (could have put inline but Deshaker requires 2 passes through slow filter chain above) # # Deshaker Max. correction limits lowered to prevent stabilising frames with motion blur - very unsighly glitches otherwise # Deshaker() settings: # VirtualDub.video.filters.Clear(); # VirtualDub.video.filters.Add("Deshaker v3.0"); # VirtualDub.video.filters.instance[0].Config("18|1|30|4|1.067|-1|1|0|640|480|1|2|1000|1000|1000|1000|4|0|6|2|8|30|300|4|C:\\Users\\fvisagie\\Videos\\Home Videos\\20081213 Namibia Insect Footage\\20081223 Namibia Ants Raiding Other Nest's Babies\\_2.Deshaker.log|0|0|0|0|0|0|0|0|0|0|0|0|0|1|1|1|5|15|1|1|30|30|0|0|0|0|1|1|1|10|1000|1|88|1|1|20|5000|100|20|1"); # # < VirtualDub.Deshaker()Adaptive Lens Blur Repair (ALBR) and SpliceFiltered are two functions I wrote for this project.Code:# Stage 3 - final nice soft contra-sharpening # FFT3DFilter(bw=48, bh=48, bt=-1, ow=24, oh=24, sharpen=0.3) 
 
 Many options remain half- or unexplored and a lot of this could have been done better/differently, but this is what I had time for and I am more than happy with the results.
 
 Many thanks to poisondeathray whom I blame/thank for giving this project direction, and also to the many others who helped along the way for giving this project direction, and also to the many others who helped along the way . .
Similar Threads
- 
  What are Video "Profile Formats" or "Levels"?By HanDuet in forum Newbie / General discussionsReplies: 2Last Post: 16th Mar 2011, 00:41
- 
  WMV files: Changing "Recorded Date", "Media Created" fields in metadataBy axhack in forum EditingReplies: 5Last Post: 18th Sep 2010, 02:27
- 
  HD video from laptop to HDTV - "Clone" or "Single?By mr-scarface in forum Software PlayingReplies: 1Last Post: 1st Jun 2009, 23:06
- 
  DVD with menus, replacing "bad" video with "good" videoBy chipsndukes in forum Authoring (DVD)Replies: 34Last Post: 4th Dec 2008, 18:45
- 
  Need some help with "dubbing"/"muxing" video with audioBy FSSSWE in forum Newbie / General discussionsReplies: 9Last Post: 21st Jun 2008, 19:49


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			

 Quote
 Quote