I posted a short video on ABSE showing something I've been tinkering with over the last couple of weeks. I wanted to learn a little about the capturing data from the video for Linux (V4L2) interface, and one thing led to another. I'm using a cheap BT878 capture card and a really cheap camera.
Anyone have any tips on improving the results or know of a good source of info on the internet? Google likes to return links to patent claims on anything related to the subject.
Didn't find your answer? Ask the community — no account required.
J
Jan Panteltje
On a sunny day (Sun, 15 Mar 2009 09:51:12 -0500) it happened "Anthony Fremont" wrote in :
I am sort of interested, but do you have any other site then a newsgroup that is not available?
J
Jim Thompson
"... unwanted words": IEEE WIPO patent portal
...Jim Thompson
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine Sometimes I even put it in the food
A
Anthony Fremont
I'll upload a video and some individual JPEG images to Photobucket or YouTube in a little while. I'll post the link here for you.
J
J.A. Legris
ed
mera.
I just noticed this course on machine vision last night. The complete course lectures are included.
formatting link
-- Joe
J
Jim Thompson
Notice the available translation. We certainly want to make sure the Iranians can make accurately-guided missiles when they are directed at Israel :-(
...Jim Thompson
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
"One experiment is worth a thousand expert opinions."
-Wernher von Braun
A
Anthony Fremont
Here is a link to a folder on photobucket. Sorry about the adds, but it's free.
formatting link
There are 10 still images and a couple of videos. One of the videos is a much earlier trial.
J
Jan Panteltje
On a sunny day (Sun, 15 Mar 2009 10:59:55 -0500) it happened "Anthony Fremont" wrote in :
Very nice. The speed measurement depends on the distance I suppose? How do you get the distance? Could perhaps be done with 2 cameras, the parallax would tell you something about it.
A
Anthony Fremont
It's really just an estimate. It's reasonably accurate, but still just an estimate. The true way to tell how fast they are going is to watch how long it takes to cover a known distance (like you didn't already know that). It's true that I'm giving the further cars a bit of a break on the speed measurement, but I'm far enough back and the street is narrow enough that the distance variation is very limited in range so I don't factor it in.
I basically measure how fast the vertical yellow segments progress thru the frame. Each pixel moved per frame is approximately 1.8MPH. Frames arrive
30 times per second; each is timestamped to the uS by the capture card's device driver.
J
Jan Panteltje
On a sunny day (Sun, 15 Mar 2009 13:31:41 -0500) it happened "Anthony Fremont" wrote in :
Neat. How do you get the motion vector? I have some motion detection here,
formatting link
but I just subtract 2 subsequent frames, and the amount of difference tells me is something changed. Do you calculate a motion vector?
A
Anthony Fremont
I use subtraction like you do, but I have a couple of different ways of doing it. Each has its strengths and weaknesses. I find "blobs" of change and draw a box around the largest "blob". The rate of change of the X coordinate of the vertical line segments is the motion vector.
A
AnimalMagic
That's the part I knew was missing. What is the capture card? Came with the camera, or part of your video card?
A
Anthony Fremont
It's allot like this card, only by a real noname company.
formatting link
Fortunately they aparently followed the reference design, so the Linux drivers liked it. There are four BT-878 type capture chips combined on one PCI card. I can easily capture 30fps from all four simultaneously (120fps). Each kept frame (motion frames) are saved as JPEG files. I then knit them together at a later time with ffmpeg to make a movie.
A
AnimalMagic
"Linux Support: Yes"
I like it.
ffmpeg even has a win32 executable. I use it with PSPVideo9 for making a flic for my PSP from one of my DVDs.
A
Anthony Fremont
formatting link
More like "Linux Support: Exclusively". I don't do windohs.
I recompiled it with SSE3 support and it went from being able to create the movie at about 30fps, to 180fps. Eats up the CPU though. ffmpeg is single threaded so it usually consumes about 100% of one core when it's running and the captures each eat about 8% of the other core. BTW this is all at
640x480 with 24bit color. I do the processing in RGB colorspace.
J
Jan Panteltje
On a sunny day (Sun, 15 Mar 2009 14:10:56 -0500) it happened "Anthony Fremont" wrote in :
I see that you use an expensive frame grabber card. The mcamip I wrote uses ethernet... But.. some years ago I bought some cheap USB camera (Q-Tec), maybe was about 12 $.
formatting link
That one does also 30 fps, (640x480 IIRC) There is a Linux driver for those cameras from a French guy. I did some modification to make it behave a bit better. Anyways I did sort of hide that soft, as that camera gives a lousy picture, no matter how you slice it, but for traffic it would be easy to use 2 (and cheap), to get a reliable distance. That may even have commercial value, as the movie has legal value (for police speed measurements) for example. But you need to be able to see the registration plates.... That would require a third camera, maybe of some better quality, at a different angle. Anyways that modified driver (for the Q-Tec) is here:
formatting link
It outputs YUV directly.
A
AnimalMagic
formatting link
Edge detection algorithms?
J
Jon Kirwan
Better accuracy means military gets hit more often, instead of civilians. Which is good or bad depending on your point of view.
Everything is about motive and opportunity, though, and I'm more concerned about the ease with which bio-warfare is achievable now with hardly more than a kitchen and a pressure cooker and what you can pick up in your backyard. At least, we can keep the CIA focused on people with the opportunity to make missles with some chance of modest success. With bio, everyone has the opportunity if they have a bachelor's worth of training and a few pots and pans. Since almost everyone has the opportunity, the CIA is left with looking only for motive. A much bigger and more varied set.
I remain glad to see MIT's continued commitment to providing high quality education and to make it as accessible as reasonably possible. The other option is to have an elite in control of who gets to have knowledge -- and I consider that worse than most things, with a few exceptions admitted.
Jon
A
Anthony Fremont
I didn't pay $149 for mine. I got it from newegg and I paid like $50 for it. I really got a hell of a deal since you can't touch a Geovision equivalent for less than $300-$400. Plus I have four audio inputs, if I ever figure out how to enable them.
I've got a d-link ip camera here somewhere. It likes to crash too often, but it is pretty neat with pan and tilt control. It streams mpeg4.
I've got an ibmcam USB camera upstairs somewhere, there's a driver for it still. The nice thing about those cameras is that they are progressive scan. The analog cameras are interlaced with each field exposed at a different time. This makes for really ugly comb like interlace lines in the picture. I had to fix those too as you can see or the faster vehicles look like a double exposure.
;-) BTDT Isn't it wonderful?
I sent an e-mail to the local police chief with the 10 photos up on photobucket.com. Notice the white truck with the stripes on the side doing
45? That would be one of our finest. :-( In Texas, 20 over is reckless driving, not speeding. 20 over in the rain and in a residential neighborhood with children is inexcusable IMO. BTW, the speed limit on my street is 25.
You see my mailbox out there......
I can get YUV from the linux driver too, but I went with RGB instead. YUV might have advantages that I could use.
A
Anthony Fremont
formatting link
Not sure what you mean. I don't have anything I'd really call an edge detector in my code, just blob analyzers. I use ffmpeg just to make movies out of jpegs.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.