OpenCV is Intel's Open Source Computer Vison Library. It's a decent-sized library that helps out with image processing tasks. It's for image processing though - you still have to work out how to capture the video yourself. For that, use V4L (see other comments). One of the included example apps ('CAMSHIFT') includes code to do video capture, but only works under DirectShow on Windows.
If you want to do stuff like extract image features or track moving objects in the video stream, it'll be perfect.
Ahh, I remember the first time I saw an advertisement in a game - it was the Sprint banner that popped up for a second or so whenever you made a subspace comm connection with another ship or a base in Space Quest V ("Roger Wilco and the Next Mutation", by Sierra On-line).
However, I live in New Zealand, and had no idea what Sprint was, let alone how I could give it any money.
As such, for me at least, that was a pretty pointless ad. It was a novelty to see advertising in a game though...
Try Jaycar Electronics if you're in Australia ...
on
Build A Nixie Tube Clock
·
· Score: 2, Informative
Jaycar Electronics in Australia stocks some vacuum fluorescent displays, kind of like mini-Nixies.
If you're lucky, this link will take you to the description (and might even give you my session cookie:), otherwise go to the Online Catalogue page and select '-LEDs/Displays' from the dropdown menu then 'Search'.
The one you're after is '11 Digit Fluoro Bargain'. Here are the details:
Vacuum fluorescent displays - still look the best. Once again Jaycar has purchased a substantial quantity of a quality Futaba brand vacuum fluorescent displays. Each digit measures 6.0mm(H) x 3.5mm(W), 11 digits in all. The display also features an apostrophe in the top right hand corner of the digits, and a semicolon (;) in the bottom in all 11 digits. Electrical and mechanical data is incl in the price.
Only A$1.70 each - about US$1.20 or so. I got two of them a couple of years back. Needless to say, they're still sitting in the cupboard, waiting for me to get around to making something with them...
That reminds me of a very cool clock I saw in Hong Kong (of all places;)
It had a single row of LEDs, mounted along a pendulum. The pendulum would swing back and forth, and the LEDs would flash so as to make it look like the current time was 'hanging' in the air in front of you.
You can rig one up with your parallel port (I think parallel ports can just put out enough current to drive LEDs, but you might blow your port outputs if you're not careful); get it to output a fixed sequence at a certain frequency and wave a bit of wood with your LEDs mounted on it back and forth, and you should see a nice pattern.
I had a friend who was doing this, but I have no idea if he got it going or not.
Here in New Zealand the main form of fast 'net access is ADSL. There are other systems, like the recently-featured CityLink, a 10M-1G (depending how much you pay for your link) city-wide ethernet, but unless you live in Wellington (or want to hack your routing and lose your connection every time it rains with a satellite connection), ADSL is pretty much the only way to get your fast 'net access.
The only problem is that the ISPs on the network seem to be chronically short of bandwidth. Xtra, the ISP associated with the local telecommunications monopoly, regularly has people complaining about it when they only get 4kB/sec out of their 128K DSL links.
(This is for 'JetStart', the 128K rate-limited DSL which comes for US$30/month. Even that is saturated! You can get 8 Mbit downstream with JetStream, at a horrible cost, e.g. US$250/month for 3 gigabytes of traffic).
What would be very cool would be if a provider took this up and used it for local point-to-point connections, say if I wanted to connect my LAN with my friend's one, over on the other side of town. Or a business link - a 10X speed boost would be much appreciated!
I guess I should have explained that one a bit more; I was in a hurry to write that comment and didn't think as carefully as I should have.
When I said "don't bother about RAID" I wasn't thinking in a security context, only cost and convenience. Lots of people think you need fancy hardware RAID controllers to have lots of hard disks in a system, but you can quite happily just plug a few IDE disks into bog-standard controllers and set up your software to swap disks when required.
If I personally had to set up the security system in question, I would set it up with at least two computers. Each would store a full set of the data, and would control a number of cameras. They would be be located as far away from each other as possible, and talk by fast ethernet.
Each computer would store a local copy of the captured video as well as stream it across the network to be recorded on all the other computers.
That way you protect against failure of individual drives, as with RAID, but you also protect against fire and make stealing the computers without anyone noticing quite a bit trickier.
I was under the impression that the reason most security systems only store 3-5 frames per second is that they don't have enough space to store anything more.
I'm sure most people would be happy to have better quality video, it's just that it hasn't been feasible until now. If you could build something which stored at 30fps (and it does look feasible now) then it might be quite popular;)
If you're triggering it off motion sensors, that will further relax the disk space requirements, because it won't be recording very much. You might not need motion sensors at all though, if you have a good compression algorithm, because with no motion, successive frames should be identical (except for a bit of random noise), so won't need much disk space to store at all.
8am to 10pm is 14 hours/day. That's 14 * 3600 = 50400 seconds/day.
8 weeks * 7 days = 56 days storage required.
56 days * 50400 secs = 2,822,400 seconds storage
at 30 frames/sec, or 30 * 2822400 = 84,672,000 frames total storage.
A 100Gb hard disk stores 100*10^9 bytes (NB: not 100*2^30). Divide that by the number of frames:
100*10^9 / 84672000 = 1181 bytes per frame. This seems a little low, although I'm not sure exactly how much you can compress the data. DVD -> DivX compresses about 10x...
A DivX movie uses about 200 megs/hour, so if you want that quality, you'd go through 160 Gb in 56 days. That doesn't sound too bad, because you don't need DivX quality -- if you push the compression up a bit (and the quality down a bit) you should be able to fit 56 days of fairly good data in 80 Gb.
This could be reasonable. If you want 8 or 16 cameras, multiply that by 8 or 16 -- 640-1280 Gb total storage, so 4-8 of the new Maxtor 160Gb drives will keep you going nicely.
I think I'm obliged to link to the $5K terabyte disk array now, but that's not really such a big thing -- if you've got 2 free IDE channels (buy a new controller card if required, they're cheap), you can plug 4 160Gb drives into the PC that's running the thing. Don't worry about RAID if you don't want to, just plug in the drives and set the software to swap drives when one gets full.
I don't think it made it into the mailing list, but when I contributed code to mono (I did System.Net.Sockets.TcpClient and System.Net.Sockets.TcpListener), Miguel checked with me that it would be OK to release them under a BSD / X11 license.
As so many people have said so far, you still don't need to pay the $10/month.
You pay the $10/month when you need to get fast downloads.
The comparison given was that their FREE servers give you ~8k/sec and that the $10/month servers give you ~50k/sec. So if you're on a 56K modem, there's no advantage to paying. If you're on a link at 512K or above, the $10/month means your downloads will come in a lot faster...
...BUT... if you don't want to pay, you can still get everything. I suspect most people will pay $10/month for a couple of months until they've downloaded the bulk of the data, then cancel the subscription and use the free download from then on.
If you can put up with slow (56K) downloads, then no need to pay - period. It's still free software, freely distributed, *but* if you want extra service, you can pay if you like.
Without some scheme to lie to half of your hardware you can't have more than 4 primary partitions per drive no matter what size it is (or 3 primary and only 1 extended),
I seem to recall an article a while back talking about how the 64-bit version of Windows XP has a new partitioning system - GPT ("GUID Partition Table") - which is meant to sort out current problems with partition tables.
MS has a document explaining their 64-bit things, including GPT and the associated support stuff -- Designing for 64-bit Windows. Things appear to be changing a fair bit -- most software will break on the new hardware they describe, but it should simplify what's left...
One thing you get taught in electrical engineering classes is to put a grounded line in between every pair of signal lines if you're using ribbon cables. The crosstalk resulting from pairs of data lines running in parallel for a decent distance can be quite bad, especially near clock lines.
(An explanation: The clock line carries a square wave at a fixed frequency - 33/66/100MHz for IDE - and is used to keep everything in sync. Devices at both ends of the cable look for a rising edge (when the voltage on the clock line goes from 0V to 3.3V) on the square wave, and read data off the cable then. Crosstalk tends to result in 'glitches' on adjacent lines, e.g. a rising edge on one conductor can induce quite a high 'spike' on adjacent conductors. If you get a positive glitch on a clock line, sometimes it is treated in the same way as a rising edge, and the devices get confused).
How this applies to IDE cables:
"Standard" (old-style) IDE cables have 40 conductors, without many grounded lines. Presumably they have something to protect the clock line though...
"New" (for ATA-66 or ATA-100) IDE cables have 80 conductors, and every second one is connected to ground (0V). These acts as a 'shield', absorbing the aforementioned glitches (the glitches happen on the grounded lines, which don't carry any data, rather than on the signal and clock lines).
If you twist up / fold a 40-conductor cable, you'll probably end up with crosstalk problems. Your mileage should be *much* better with an 80-conductor cable, because of all the grounded lines. Alternatively they may be twisting a grounded line around each signal line, which should be even better (Ethernet does that BTW -- that's the 'T' in UTP and STP).
One of the hardware guides did a 'do-it-yourself rounded cable' tutorial a while back - not sure which one though. I think they used 80-conductor cables, with a bit of masking tape;-)
If you're trying to get someone to move away from VSS, and are looking for more opinions on it (I haven't seen any actual *facts* yet, but there are plenty of opinions), a reasonably respected one would probably be Joel Spolsky's (from Joel on Software). He was the Microsoft "Program Manager" from VBA (the version of Visual Basic that Office uses for scripting).
Basically, MS doesn't use it internally - they don't trust it. Apparently they use a lot of their own stuff in development (for example -- Joel was on the Excel team, and they all used Excel for project planning, and added in project planning features, making it reasonably good for development planning. Here are the details). For NT (-> 2K -> XP) they used something called SLM, which was replaced by something else. Here's a USENIX paper on it.
His company has a bug tracking system ("FogBUGZ") too, and if you buy a site license ($1995) -- which covers the whole project team -- you get the source and are allowed to modify it and use your modified versions internally. See here for more info. It doesn't integrate with VSS, unfortunately;-)
OpenCV is Intel's Open Source Computer Vison Library. It's a decent-sized library that helps out with image processing tasks. It's for image processing though - you still have to work out how to capture the video yourself. For that, use V4L (see other comments). One of the included example apps ('CAMSHIFT') includes code to do video capture, but only works under DirectShow on Windows.
If you want to do stuff like extract image features or track moving objects in the video stream, it'll be perfect.
The code is available from the 'opencvlibrary' SourceForge project under a BSD-style license.
Ahh, I remember the first time I saw an advertisement in a game - it was the Sprint banner that popped up for a second or so whenever you made a subspace comm connection with another ship or a base in Space Quest V ("Roger Wilco and the Next Mutation", by Sierra On-line).
However, I live in New Zealand, and had no idea what Sprint was, let alone how I could give it any money.
As such, for me at least, that was a pretty pointless ad. It was a novelty to see advertising in a game though...
If you're lucky, this link will take you to the description (and might even give you my session cookie
The one you're after is '11 Digit Fluoro Bargain'. Here are the details:
Only A$1.70 each - about US$1.20 or so. I got two of them a couple of years back. Needless to say, they're still sitting in the cupboard, waiting for me to get around to making something with them
That reminds me of a very cool clock I saw in Hong Kong (of all places ;)
It had a single row of LEDs, mounted along a pendulum. The pendulum would swing back and forth, and the LEDs would flash so as to make it look like the current time was 'hanging' in the air in front of you.
Kind of like the way monitors work, I guess, except with a very low refresh rate.
You can rig one up with your parallel port (I think parallel ports can just put out enough current to drive LEDs, but you might blow your port outputs if you're not careful); get it to output a fixed sequence at a certain frequency and wave a bit of wood with your LEDs mounted on it back and forth, and you should see a nice pattern.
I had a friend who was doing this, but I have no idea if he got it going or not.
Unfortunately true.
Here in New Zealand the main form of fast 'net access is ADSL. There are other systems, like the recently-featured CityLink, a 10M-1G (depending how much you pay for your link) city-wide ethernet, but unless you live in Wellington (or want to hack your routing and lose your connection every time it rains with a satellite connection), ADSL is pretty much the only way to get your fast 'net access.
The only problem is that the ISPs on the network seem to be chronically short of bandwidth. Xtra, the ISP associated with the local telecommunications monopoly, regularly has people complaining about it when they only get 4kB/sec out of their 128K DSL links.
(This is for 'JetStart', the 128K rate-limited DSL which comes for US$30/month. Even that is saturated! You can get 8 Mbit downstream with JetStream, at a horrible cost, e.g. US$250/month for 3 gigabytes of traffic).
What would be very cool would be if a provider took this up and used it for local point-to-point connections, say if I wanted to connect my LAN with my friend's one, over on the other side of town. Or a business link - a 10X speed boost would be much appreciated!
I guess I should have explained that one a bit more; I was in a hurry to write that comment and didn't think as carefully as I should have.
When I said "don't bother about RAID" I wasn't thinking in a security context, only cost and convenience. Lots of people think you need fancy hardware RAID controllers to have lots of hard disks in a system, but you can quite happily just plug a few IDE disks into bog-standard controllers and set up your software to swap disks when required.
If I personally had to set up the security system in question, I would set it up with at least two computers. Each would store a full set of the data, and would control a number of cameras. They would be be located as far away from each other as possible, and talk by fast ethernet.
Each computer would store a local copy of the captured video as well as stream it across the network to be recorded on all the other computers.
That way you protect against failure of individual drives, as with RAID, but you also protect against fire and make stealing the computers without anyone noticing quite a bit trickier.
I was under the impression that the reason most security systems only store 3-5 frames per second is that they don't have enough space to store anything more.
;)
I'm sure most people would be happy to have better quality video, it's just that it hasn't been feasible until now. If you could build something which stored at 30fps (and it does look feasible now) then it might be quite popular
If you're triggering it off motion sensors, that will further relax the disk space requirements, because it won't be recording very much. You might not need motion sensors at all though, if you have a good compression algorithm, because with no motion, successive frames should be identical (except for a bit of random noise), so won't need much disk space to store at all.
From the start, is it feasible to store to HDD?
8am to 10pm is 14 hours/day. That's 14 * 3600 = 50400 seconds/day.
8 weeks * 7 days = 56 days storage required.
56 days * 50400 secs = 2,822,400 seconds storage
at 30 frames/sec, or 30 * 2822400 = 84,672,000 frames total storage.
A 100Gb hard disk stores 100*10^9 bytes (NB: not 100*2^30). Divide that by the number of frames:
100*10^9 / 84672000 = 1181 bytes per frame. This seems a little low, although I'm not sure exactly how much you can compress the data. DVD -> DivX compresses about 10x...
A DivX movie uses about 200 megs/hour, so if you want that quality, you'd go through 160 Gb in 56 days. That doesn't sound too bad, because you don't need DivX quality -- if you push the compression up a bit (and the quality down a bit) you should be able to fit 56 days of fairly good data in 80 Gb.
This could be reasonable. If you want 8 or 16 cameras, multiply that by 8 or 16 -- 640-1280 Gb total storage, so 4-8 of the new Maxtor 160Gb drives will keep you going nicely.
I think I'm obliged to link to the $5K terabyte disk array now, but that's not really such a big thing -- if you've got 2 free IDE channels (buy a new controller card if required, they're cheap), you can plug 4 160Gb drives into the PC that's running the thing. Don't worry about RAID if you don't want to, just plug in the drives and set the software to swap drives when one gets full.
I know I'll get flamed for this, but ...
.NET version of C++.
.NET class library.
If you want to use templates as well as garbage collection, you might like Managed C++, the
It'll let you code in C++ (with templates etc) but also use garbage collected arrays etc, and the
I don't think it made it into the mailing list, but when I contributed code to mono (I did System.Net.Sockets.TcpClient and System.Net.Sockets.TcpListener), Miguel checked with me that it would be OK to release them under a BSD / X11 license.
...
Presumably the same goes for everyone else
Somebody used error messages like that to implement an adventure game a while back. In C though, not C++ ;-)
Here it is; it's one of the 1994 winners in the IOCCC (International Obfuscated C Code Competition).
westley.c: "Adventure/Dungeon like game played via the C pre-processor"
(The main index is here.)
As so many people have said so far, you still don't need to pay the $10/month.
You pay the $10/month when you need to get fast downloads.
The comparison given was that their FREE servers give you ~8k/sec and that the $10/month servers give you ~50k/sec. So if you're on a 56K modem, there's no advantage to paying. If you're on a link at 512K or above, the $10/month means your downloads will come in a lot faster...
...BUT... if you don't want to pay, you can still get everything. I suspect most people will pay $10/month for a couple of months until they've downloaded the bulk of the data, then cancel the subscription and use the free download from then on.
If you can put up with slow (56K) downloads, then no need to pay - period. It's still free software, freely distributed, *but* if you want extra service, you can pay if you like.
Without some scheme to lie to half of your hardware you can't have more than 4 primary partitions per drive no matter what size it is (or 3 primary and only 1 extended),
;-)
...
I seem to recall an article a while back talking about how the 64-bit version of Windows XP has a new partitioning system - GPT ("GUID Partition Table") - which is meant to sort out current problems with partition tables.
And don't worry, 64-bit Linux supports it too
MS has a document explaining their 64-bit things, including GPT and the associated support stuff -- Designing for 64-bit Windows. Things appear to be changing a fair bit -- most software will break on the new hardware they describe, but it should simplify what's left
There already is one!
...
Also, if you go to Perl Monks, there are heaps of people submitting obfuscated Perl code for judgement
One thing you get taught in electrical engineering classes is to put a grounded line in between every pair of signal lines if you're using ribbon cables. The crosstalk resulting from pairs of data lines running in parallel for a decent distance can be quite bad, especially near clock lines.
;-)
(An explanation: The clock line carries a square wave at a fixed frequency - 33/66/100MHz for IDE - and is used to keep everything in sync. Devices at both ends of the cable look for a rising edge (when the voltage on the clock line goes from 0V to 3.3V) on the square wave, and read data off the cable then. Crosstalk tends to result in 'glitches' on adjacent lines, e.g. a rising edge on one conductor can induce quite a high 'spike' on adjacent conductors. If you get a positive glitch on a clock line, sometimes it is treated in the same way as a rising edge, and the devices get confused).
How this applies to IDE cables:
"Standard" (old-style) IDE cables have 40 conductors, without many grounded lines. Presumably they have something to protect the clock line though...
"New" (for ATA-66 or ATA-100) IDE cables have 80 conductors, and every second one is connected to ground (0V). These acts as a 'shield', absorbing the aforementioned glitches (the glitches happen on the grounded lines, which don't carry any data, rather than on the signal and clock lines).
If you twist up / fold a 40-conductor cable, you'll probably end up with crosstalk problems. Your mileage should be *much* better with an 80-conductor cable, because of all the grounded lines. Alternatively they may be twisting a grounded line around each signal line, which should be even better (Ethernet does that BTW -- that's the 'T' in UTP and STP).
One of the hardware guides did a 'do-it-yourself rounded cable' tutorial a while back - not sure which one though. I think they used 80-conductor cables, with a bit of masking tape
If you're trying to get someone to move away from VSS, and are looking for more opinions on it (I haven't seen any actual *facts* yet, but there are plenty of opinions), a reasonably respected one would probably be Joel Spolsky's (from Joel on Software). He was the Microsoft "Program Manager" from VBA (the version of Visual Basic that Office uses for scripting).
Basically, MS doesn't use it internally - they don't trust it. Apparently they use a lot of their own stuff in development (for example -- Joel was on the Excel team, and they all used Excel for project planning, and added in project planning features, making it reasonably good for development planning. Here are the details). For NT (-> 2K -> XP) they used something called SLM, which was replaced by something else. Here's a USENIX paper on it.
His company has a bug tracking system ("FogBUGZ") too, and if you buy a site license ($1995) -- which covers the whole project team -- you get the source and are allowed to modify it and use your modified versions internally. See here for more info. It doesn't integrate with VSS, unfortunately ;-)