Hi
i m developing one program for tracking n analysing object. i m using avermedia's EZcapture card with my PC having celron 1.1 GHz processor, mercury 810 mother board, 8 mb video memory, 128 mb main memory
n using EZvidcap.ocx by ray marcer n also used DirectX n Video for window but in technique i get problem of interlacing as shown in image.
i need sharp edge for my program to work so plz suggest how to make my program to capture clean image.
if u know any tools or technique that i can use in my program that eleiminate this problem then also suggest me.
+ Reply to Thread
Results 1 to 30 of 34
-
-
if u capture over 288 lines of res, it will be interlaced. you are best off capturing then using a deinterlace filter
-
If you've already captured your files and want to deinterlace them try VirtualDub's deinterlace filters. You'll probably want to use "Duplicate Field 1/2" or "Discard field 1/2". I usually use "Discard Field 1/2" followed by a Lanczos3 resize back to the original height.
-
Deinterlaced and "clean image" never co-exist. Sorry, but your experiment will have skewed results. Or you could always change the nature of the analysis software to include interlace. Any good program would. Or quit using interlaced source (get progressive source cameras or film).
Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
Took your jpg image and ran it through VirtualDub to deinterlace.
Duplicate field 1:
Discard field 1:
Discard field 1, resize (lanczos) to original size:
If the source hadn't been a jpg file it would have been cleaner. -
thanks to all friend for replying
my problem is that i have to display real time video on screen n also have to display on screen size of 786X576 so i need to do real time filtering. so plz suggest how to do it.
marry chrismax to all friend. -
Originally Posted by deepakpansheriya
For analysis it would be simplest if you had a deinterlaced version of the frame. The fastest deinterlace technique is simply to ignore one of the fields, and the quickest way to do that is simply to pretend that the video is twice the width and half the height of whatever the capture system reports: that puts the odd and even fields in the left and right halves (respectively) of the half height image. Then you can analyse the left half. Optionally, you can then analyse the right half, or you can make your analysis go twice as fast by ignoring the right half. In fact, for a motion tracker it might be convenient to difference the two fields - that would let you easily pinpoint moving edges - provided they move fast enough for the motion to be significant when sampling at the field rate.
For display you just display the frame - it is irrelevant to you how the video renderer handles interlaced sources.
Despite the suggestions here, I suggest that you do not attempt to use a blending or resizing techniques to deinterlace. First of all, resizing and fancy deinterlacing introduces distortions into the data you are attempting to analyse, which is never a good idea. Second, resizing adds no new information so it cannot possibly help your analysis - it only adds extra unnecessary lines of video, ensuring that your analysis takes twice as long as it should. -
i analyse on 20 sec interval n object is rotating so there is no problem of analysis time but i need to disply image in properly without interlaced image. even i tested with 100 fps but still i able to see interlaced image but i think that as frame rate increase must the interlacing reduce but not in this case.
n i need to display in large size b'coz i need to take input from user in form of graphics drawn on it.
i m not know whether my camerar is interlacing or progressive. i m using avc-300 camera. so if u know any cheap progressive camera then suggest me. -
You're camera is clearly delivering an interlaced image since you can see the interlace lines. Increasing the frame rate to 100 fps probably just gives you four repeats of each frame.
Since you only need one frame every 20 seconds you can just remove the interlace lines yourself. Replace one field by replacing every other scanline with the average of the pixels from the lines above and below it. In C it would look something like this:
for (y=1; y<(height-1); y+=2)
{
for (x=0; x<width; x++)
{
image[y][x] = (image[y-1][x] + image[y+1][x]) / 2;
}
}
Of course you can use a more sophisticated filter to get better results.
Can you use a webcam? Most webcams are progressive scan so they won't give you this problem. Something like the Creative WebCam NX Pro (<US$50) will deliver 640x480 resolution with decent picture quality (although the optics probably aren't as good as your current camera so the picture wont be as sharp). -
Originally Posted by deepakpansheriya
Originally Posted by deepakpansheriya
1. Extract one field from the frame.
2. Analyse field.
3. Expand field to full frame height.
4. Display.
If the user enters coordinates (I assume this is to allow the user to highlight the object of interest?) then you just divide the y coordinate by two for input into the next analysis step. -
@ deepakpansheriya
Below, is my understanding of DV and footage and Frames and Fields, etc ...
Assuming NTSC here, then..
You really can't make an Interlace source any clearer than separating the frames
into Fields (480 becomes 240) and viewing those. Assuming your source is from
footage from the lens, every one of these fields (two fields of 240 pix ht, makes
one frame of 480 ht)
.
When a cam takes a piture onto it's CCD, it is doing it in Field mode. That is,
(in so many words) as the video enters ther lens, only 240 lines are actually
being recorded in a given moment in time.., but just enough to (ie, 60th/sec)
to get two fields merged into one, as a full frame of 480 pix ht. That is why,
when there is motion, the frame looks distored, and you see what is known as
Interlaced lines in motion areas.
When you split those full frames into Fields, you are getting a true representation
of the video footage picture, in a field-by-field moment in time. What fools
us into thinking that they are full frame captures (through the lens) (and they
are *not* full frame captures in the lens) is the merging of these Interlaced
Fields. When you view Interlaced fields (from your cam to your tv) you are
seeing these fields super-quickly re-split again, (through the tv coversion)
via the scanline technique that tv's are designed thus. The machnics are beyond
my tounge
The reason I say that the cam's (Interaced ones) take 240 line pictures is
rather simple. Take your cam, and aim it on a tipod (rule out any interference)
and take footage of some lettering (ie, a Cereal box) and capture it (through
firewire for instance) and then, through an AVS script (AVIsynth) separate
the frames into Fields. That same scene you just took of the lettering, the
separated frames into Fields will look different, but only slightly. Because
there were no movements. But, the trick (IMO) is this.. If you see the same
image lettering in your DV avi file (ie, use vdub) you'll see the same image
but slightly different. One field will be top, and the other will be bottom.
The bottom will complete the top (in sharpness) when they are merged as one
frame weave()'ed again. The lettering you see in Field view will look
a little blocky (to say the least) but when merged weave()'ed back into
a full frame, then will look smooth and sharp.
.
The reason for this, is because pictures are taken in time, one field at a time.
At least, that's my understanding, and based on my tests so far
So. Even if you:
* Separate the frame into Fields (480 down to 240) and observe that way, you
.. are not getting a true representation of the frame (pic) because half the
.. information is missing, and bit 'n pieces are not completing the frame.
.. .
.. resizing the Field to 480 pix ht will only scew your results, because there
.. will be noise (from the missing pixles from the other Field) That's why
.. I say that each picture take through your cam's lens is taking 240 lines
.. worth, and merging them into one frame.., making it look like it's ONE
.. picture in time.., when in actuality, it's TWO pics (in time) but merged
.. into one.
The best way to complete your project w/ less taint or scew, is to use a
full frame capture cam.
.
You could use a Web Cam as suggested earlier, but those only take 12 or 16
frames (at least the last web cam I owned did) So I don't trust this route.
But, maybe things changed since. But to get a real enough representation,
you have to capture 29.970 fps from your cam. And your cam as to at least
pump out 29.970 fps FRAMES.
From the video workstation of,
-vhelp -
@ deepakpansheriya
One more thing..
* How are you observing the images (video) ??
FWIW.. to my knowledge, there is only ONE device that can allow you to see
a video, as if watching on TV, and get a "as true to reality as what you
see" on TV ...
.
That device, is the ATI Rage Fury Pro (graphics and capture) card in one.
With it's MMC v7.1 suit, and Video In app, it will recreat what you see
on your TV set, weather your soure is Film or Interalced. In my OP, it
really shows the Interlaced (ie, CAM footage) super perfect. But its
only a viewing tool (in your case) you can't split frames or whatever,
but you *can* actaully capture the image viewing w/ it's snap shop
feature. It will take a clean Interlaced (two field) image and capture it
as one. It's the best tool around. I've never seen any such tool take
an Interlace source and merge them so cleanly (WYSIWYG-syle) full frame.
.
This is not a common device (card) it is rare, becuase they stopped
making these years ago (2001 I think) but you can eBAY it and find one
in time. I did. But it took me three months before I found mind. (It
was a replacement to my older one that died on me.
Good luck,
-vhelp -
My favorite webcam is the Sony EyeToy. There are hacked DLink drivers available on the web that let you use it under Windows. It's hires (640x480), fast (easily 30 fps), has good color, and among the best low light (as is usually the case in an office) performance. No auto focus though.
-
Originally Posted by vhelp
Besides, he already said in an earlier message that he needed to be able to display the video frame so that a user could graphically interact with it (which I took to mean, eg. drawing boxes to highlight objects to be tracked). He isn't going to find that feature in ATI's TV application. -
I don't understand.
Why all the fuss over a penis?
Or is that supposed to be something else?
- John "FulciLives" Coleman"The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
-
Originally Posted by FulciLives
-
Idea of extracting field->analysing->desplaying is better but i have try with ezvidcap.ocx
(http://www.shrinkwrapvb.com/ezvidcap.htm)
control to do by makin that control invisible but when i make it invisible then it not preview live video only last frame is remain on screen.
i m doing this in VB-6. so, is any good methode of capturing frame without displaying on capture window? if any then it will help me to use methode suggested by mpack.
n also the methode suggested by junkmalle is also possible if i can do that. -
Originally Posted by deepakpansheriya
However, from a quick look at the documentation, the FrameEventEnabled / FrameCallback feature seems to be what you want. You would be intercepting frames intended for video preview, rather than for capture.
On whether you have to have the preview window visible in order for the feature to work... that may be so, especially if you use VFW as that OCX is doing. I've never tried it any other way. I think DirectX might let you attach the preview stream to a null renderer, but that OCX you have found is built on the VFW compatibility layer, so it doesn't let you access the underlying DirectX implementation. -
One additional thought: a VFW preview window is a child control which you "contain" in one of your own application windows. If I had this problem of wanting to hide the preview window without actually disabling the output from it then I might try creating a second child window, contained by the same parent window, and completely covering up the underlying VFW preview control - however your OCX might not allow you to do that: it might be wrapping the VFW interface at too high a level for your needs.
-
hi i try capturing in XP n with surprize i see that there is not interlacing problem with it.
but i found one new problem that the edge is not sharp n are jagged at some places. which is not feasible for my application. n edge r look jagged. look the image.
so plz suggest what is problem.
also i has try with reinstalling my win-98 n i install avercap for preview on full resolution n i found that there is not interlacing problem. then i test with ezcap software n found same problem of interlacing. n then after i go back to check with avercap n found same problem of interlacing. so what be the reason of this behavier?
Happy New Year to all friends. -
The camera is always sending an interlaced picture to the computer. Some capture software deinterlaces on-the-fly for display because interlaced video looks bad on a PC monitor. But it doesn't deinterlace the data that's saved to a file so as not to degrade the picture quality.
I don't really see anything unexpected with your latest image. The soft edges are normal (you never get completely sharp edges from a video camera) and the deinterlacing (realtime deinterlacers usually use very crude algorithms like the one I gave you earlier) and scaling made the fuzzy edges worse.
If you want progressive video you have to get a camera that can supply it. You'll still have some fuzzy edges because that's the nature of video and the scaling digital images. -
i look sharp edge in win-98 with same reolution on EZvidcap control for still image but when i try with xp the edge look jig zaged n blur. n i use same camera.
-
What you keep trying to do will not work.
It's been said all throughout this thread.Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
Originally Posted by deepakpansheriya
You need to understand what interlacing is. A PAL video camera does not generate 25 FRAMES per second, it generates 50 FIELDS per second. Each field is half the picture -- every other scanline. One field is all the odd numbered scanlines, the next field is all the even numbered scanlines. These fields are not taken at the same instant in time, the second field was taken 1/50 of a second later than the first one.
This isn't a problem on an interlaced television because both fields are not visible at the same time. But on a computer monitor the two fields are woven together to make a full picture rather than two half pictures. That is, you see both fields at the same time. Anything that moved during that 1/50 of a second is in a different location, resulting in the "interlace lines" in your first image.
To get around this some programs deinterlace the image. There are a few different ways to do this but the simplest (and ugliest) is to simply throw away one field and replace it with a copy of the other. That, along with a crude "nearest neighbor" scaling (your second picture is larger than your first), is what appears to be happening in your new image. -
Originally Posted by deepakpansheriya
-
Seems to me your options are to
1. use a single field for 1/25 sec. time sample and half vertical resolution.
2. obtain a 50Hz progressive camera for 1/50 sec. temporal resolution and full vertical resolution (no interlace)
3. create a deinterlace algorithm that fits your measurement and display needs. -
when i use at half resolution i get picture changing in only half above halve first n second halve then afeter. what should be reason of this?
so picture is look like breaked in two halve. i has try by incresing as well as decreasing frame rate but still same problem i seen. -
i m posting photo taken at low resolotion so if any body has idea why some frame r like this thwn reply me
Similar Threads
-
interlaced PAL problem
By PAL sucks in forum Video ConversionReplies: 23Last Post: 26th Feb 2011, 21:08 -
Converting DV to H.264 and comparing interlaced/de-interlaced
By amirh1 in forum Video ConversionReplies: 5Last Post: 23rd Jun 2010, 09:16 -
ASSUS TV TUNER interlaced problem
By Docoptik in forum Capturing and VCRReplies: 15Last Post: 15th Aug 2009, 08:11 -
I have problem with interlaced or deinterlaced video.
By DVDNow in forum MacReplies: 1Last Post: 11th Jul 2007, 07:18 -
Problem with Interlaced video & Encoding
By miluv2u7 in forum MacReplies: 0Last Post: 19th Jun 2007, 10:55