VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. vantuiljose
    Join Date
    Dec 2012
    Location
    Ouro Preto, Minas Gerias - Brazil
    Search Comp PM
    Hi,
    I'm new here. But I expect to contribute a lot with this forum. And also expect your contribution.

    I'm working with computer vision in a Brazilian University.
    My work consists in recognize license plates, based in tracking, trying to improve the acuracy of some methods that try to do that.

    I get a Panasonic HDC-TM80, that is able to record videos at full hd resolution (1920x1080).
    But I need to load this videos in opencv, so I need them in avi. I can't do a good conversion! I always get a noise in moving objects, and that's horrible to my propouse.

    I have checked this thread: https://forum.videohelp.com/threads/285841-How-to-covert-from-mts-to-avi-or-wma
    But, unfortinelly, nothing seems work to me!
    My last try is attached.

    Someone have some idea of what can I do?

    Thak you very much!
    Image Attached Thumbnails Click image for larger version

Name:	FramesDefeituosos.png
Views:	344
Size:	2.59 MB
ID:	15236  

    Quote Quote  
  2. You just need to handle your video as interlaced. Each frame consists of two half pictures, one in all the even scan lines, one in all the odd scan lines.
    Quote Quote  
  3. vantuiljose
    Join Date
    Dec 2012
    Location
    Ouro Preto, Minas Gerias - Brazil
    Search Comp PM
    Thank you jagabo. How can I do this? Can I do with ffmeg?
    Will this give me just half of frames/second?
    Quote Quote  
  4. You could perform a smart "bob" and make a double frame rate AVI file. The best smart bob deinterlacer is QTGMC() in AviSynth. Second best is Yadif() in AviSynth or VirtualDub. But you may find that a simple bob (Bob() in AviSYnth, BobDoubler in VirtualDub) works better for your purposes. The smart bob algorithms may have trouble with small text -- like the license plates in your image.

    Does your camcorder have a progressive mode? That will eliminate the problem at the source.

    Samples from your image:

    original interlaced video:
    Name:  inter.png
Views: 705
Size:  11.9 KB

    simple bob (VirtualDub):
    Name:  bob1.png
Views: 715
Size:  12.9 KB Name:  bob2.png
Views: 690
Size:  13.0 KB

    yadif (VirtualDub):
    Name:  yadif1.png
Views: 692
Size:  10.3 KB Name:  yadif2.png
Views: 693
Size:  10.3 KB

    qtgmc (AviSynth)
    Name:  qtgmc1.png
Views: 684
Size:  12.6 KB Name:  qtgmc2.png
Views: 697
Size:  12.7 KB

    simple bob plus McTemporalDenoise() in AviSynth:
    Name:  mctd1.png
Views: 708
Size:  11.7 KB Name:  mctd2.png
Views: 737
Size:  11.9 KB

    Qtgmc usually works much better. It analyses the motion over multiple frames to build the output images but I only had a single frame to work with. With the actual video it should work better.
    Last edited by jagabo; 17th Dec 2012 at 13:03.
    Quote Quote  
  5. vantuiljose
    Join Date
    Dec 2012
    Location
    Ouro Preto, Minas Gerias - Brazil
    Search Comp PM
    No, unfortunately, my camera hasn't this option

    I have no idea of how to do this. Can you give me first steps?
    Quote Quote  
  6. Unfortunately, MTS is a little hard to work with so you have quite a learning curve ahead. Look through the guides at this site for more detailed instructions on the use of VirtualDub but here's a quick guide:

    Download and install VirtualDub. It can't open MTS file natively so you will need to install one of the input plugins. I would try the ffmpeg source plugin first (because it's self contained). Download the ffmpeg input driver and put it in VirtualDub's plugins folder. Start VirtualDub and try File -> Open Video File. Select the MTS file. Hopefully that will work. If not you can try using the DirectShow input plugin (but that plugin requires that you have Windows' DirectShow set up to read MTS files so you may need to install more stuff).

    Once you are able to open MTS files in VirtualDub: Select Video -> Filters... -> Add.. then add the Bob Doubler filter (or the Deinterlace filter, try different options). Back at the main interface step through the video with the arrow keys on the keyboard or the slider at the bottom of the window.

    Your screen probably isn't big enough to show two 1920x1080 videos side by side in VirtualDub. By default in VirtualDub, the left pane is the source video, the right pane is the filtered video. You can reverse the two by selecting View -> Swap Input/Output Panes. Or you can shrink a pane by right clicking on it and selecting a Zoom option.

    To save as uncompressed RGB you can select File -> Save As AVI. With HD video that will be very large, about 6 MB per frame, 186 MB per second. If you want compression you'll want to select a compression codec and configure it With Video -> Compression... (you may also have to download and install the codecs if you don't have any VFW codecs). Some lossless codecs include HuffYUV and Lagarith. They will only reduce the file size by about 50 percent. For more compression you have to resort to lossy codecs.

    AviSynth is a very powerful text script driven video filtering system. It works in the background and requires the use of a front end to view and encode the video. You can use VirtualDub to open the script, view the results, and save as AVI.

    Basic AviSynth instructions:

    http://avisynth.org/mediawiki/Main_Page#New_to_AviSynth_-_start_here

    the QTGMC filter and instructions (one of the hardest to get working, unfortunately):

    http://forum.doom9.org/showthread.php?t=156028

    If you upload a few seconds of your source I'll test QTGMC out with it to let you know if there's any hope of it working. It is a far better deinterlacer than anything available in VirtualDub or any other program. But be aware that there is no perfect deinterlacer and there never will be. You are trying to reconstruct a full picture from only half a picture (every other scan line). So any algorithm has to guess at what is missing. I highly recommend you get a camcorder that shoots progressive video so you can avoid deinterlacing.
    Quote Quote  
  7. vantuiljose
    Join Date
    Dec 2012
    Location
    Ouro Preto, Minas Gerias - Brazil
    Search Comp PM
    Thank you 42jagabo!
    You got good results using simple bob plus McTemporalDenoise() in AviSynth.
    I will try some option that you told me to choose the best!
    I have upload this sampole video: http://www.mediafire.com/?or25wc58gsc6sfn

    Thank you very very much!
    Quote Quote  
  8. Maybe you know it already, but there are cameras that are specifically designed to photograph license plates on moving cars. Reconx make one.
    Quote Quote  
  9. QTGMC() + McTemporalDenoise():
    Click image for larger version

Name:	mctd.jpg
Views:	180
Size:	471.5 KB
ID:	15252
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!