VideoHelp Forum

+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. How do i remove these tiny dots around the corner of the eyes?

    Image
    [Attachment 57335 - Click to enlarge]


    I tried Destripe(2,1,100) and it didnt remove the dots.

    Sry, I don't know the term of the problem but Help please.
    Quote Quote  
  2. You want to use a "dot crawl" remover. With fuzzy VHS you can reduce the image width to half, the resize back to full size.
    Quote Quote  
  3. I used DeDot(luma2d=20, lumaT=60, chromaT1=0, chromaT2=255) and it was still the same. also the latter part reduce and resize back doesnt work too. Help me
    Quote Quote  
  4. As usual, upload a sample.
    Quote Quote  
  5. This reduces them then considerably without damaging the picture too much:
    Code:
    BilinearResize(width/2, height).Spline36Resize(width,height)
    Quote Quote  
  6. wow great thanks, it does reduce them moderately but it seems a little blurry but didnt have much impact like the dotcrawl remover. I have faced another type of vertical dots in which i can't remove.garage verticaldots.m2v In fact most of those DVDs seem to have a lot of vertical dots like in the sample [especially outdoor scene]. Anyway to remove with least information loss?

    Image
    [Attachment 57359 - Click to enlarge]



    Look at the trees behind them. They don't seem very smooth and i feel harden vibes coming from them. Is that vertical roughness the same as the sample garage scene?
    Quote Quote  
  7. You can use a mask to keep the dot crawl removal from effecting other parts of the picture. Here's an example:

    Code:
    ##########################################################################
    #
    # Saturation, assumes full range, returns 0 to 255
    #
    ##########################################################################
    
    function SaturationMask(clip c)
    {
        U = UtoY(c)
        V = VtoY(c)
        mt_lutxy(U, V, expr="x 128 - abs 2 * dup *    y 128 - abs 2 * dup *   + 0.5 ^")
        PointResize(c.width, c.height)
    }
    
    ##########################################################################
    
    
    Mpeg2Source("dots.demuxed.d2v", CPU2="ooooxx", Info=3) 
    
    TFM().TDecimate()
    source = last
    
    smask = SaturationMask().ColorYUV(gain_y=256).mt_expand().mt_expand().mt_expand().mt_expand(chroma="-128")
    emask = mt_edge(mode="sobel").mt_expand(chroma="-128")
    semask = Overlay(smask, emask, mode="multiply")
    blurred = BilinearResize(280, height).Spline36Resize(width,height)
    Overlay(source, blurred, mask=semask)
    # Interleave(source, last, semask) # enable this line to view before, after, and the mask
    This builds a mask of areas near highly saturated colors and edges (note that the dots count as edges). You may need to adjust the mask parameters depending on the properties of a particular video.

    The issue with the garage door is not related to dot crawl. It's just aliasing/moire that occurs when the frequency of the signal approaches the frequency of the sampling. I don't think there's a lot you can do for it other than blur it away.
    Quote Quote  
  8. okay Where can i learn precisely about the mask? I really don't understand it. Can you explain me how does it work using a clip please?
    Quote Quote  
  9. That's a rather large subject. The basic idea is to overlay one image onto another using a third image as a map (mask) indicating which pixels to overlay and how strongly. In areas where the map is black the first image is retained, in areas where the map is white the second image completely replaces the original. In areas where the map is some shade of grey you get a mix of the two, weighted by the shade of grey.

    I recommend you view the individual masks in the script to get an idea what each looks like.
    Quote Quote  
  10. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    Originally Posted by Smart Jason View Post
    okay Where can i learn precisely about the mask? I really don't understand it. Can you explain me how does it work using a clip please?
    A mask is where you blend two (or more) images together. But it's the same image, slightly different. The same image is layered, and with the mask you select the layer that has what you want for that area. I've done masking in Photoshop and Premiere for decades, but less often in Avisynth.

    jagabo is quite skilled at Avisynth masking, I tip my hat in respect.
    Quote Quote  
  11. I had a little time so I put together a small example:

    Code:
    ######################################################
    #
    #  Build a 256x256 RGB video with grey shades 
    #  ramping from 0 to 255, left to right
    #
    ######################################################
    
    function GreyRamp()
    {
       BlankClip(color=$000000, width=1, height=256, pixel_type="RGB32")
       StackHorizontal(last, last.RGBAdjust(rb=1, gb=1, bb=1))
       StackHorizontal(last, last.RGBAdjust(rb=2, gb=2, bb=2))
       StackHorizontal(last, last.RGBAdjust(rb=4, gb=4, bb=4))
       StackHorizontal(last, last.RGBAdjust(rb=8, gb=8, bb=8))
       StackHorizontal(last, last.RGBAdjust(rb=16, gb=16, bb=16))
       StackHorizontal(last, last.RGBAdjust(rb=32, gb=32, bb=32))
       StackHorizontal(last, last.RGBAdjust(rb=64, gb=64, bb=64))
       StackHorizontal(last, last.RGBAdjust(rb=128, gb=128, bb=128))
    }
    
    ######################################################
    
    alpha = GreyRamp().AddBorders(64,0,0,0,color=$000000).AddBorders(0,0,64,0,color=$ffffff).ConvertToYV12(matrix="pc.601").Crop(0,0,-0,-56)
    red = BlankClip(alpha, color=$ff0000).Subtitle("RED", size=195, y=8, text_color=0)
    yellow = BlankClip(alpha, color=$ffFF00).Subtitle("YELLOW", size=95, y=55, text_color=0)
    
    Overlay(red, yellow, mask=alpha)
    
    StackVertical(red, yellow, alpha, last)
    That script builds three images, a red background with white text, a yellow background with black text, and a ramp of grey values. It then overlays the yellow image over the red image using the grey ramp as an alpha (transparency) mask. The three images and the overlay result are show, stacked vertically:

    Image
    [Attachment 57406 - Click to enlarge]


    In the final result you can see that the red image appears at the left where the alpha mask is totally black, the yellow image appears at the right where the mask is totally white, in between there is a mix of the two where the weighting depends on the shade of gray in the mask.

    In the earlier script I used properties of the image to build an alpha mask. One mask of edges, another of highly saturated areas, then a multiplcation of the two to produce a final mask of edges near colorful areas.
    Quote Quote  



Similar Threads