Vision sensors: Where to even start?

Jeff7

Lifer
Jan 4, 2001
41,599
19
81
Without giving away too much of it...I've got something in mind at work that would use a stereoscopic vision system to detect some specific objects. It needs to differentiate them from people walking by, but also determine their direction of travel, and then report some simple information to an external system via RS-485. I'll also guess that the finished sensor will likely need to cost less than $600.


My starting point: I know squat about vision systems. I've seen that OpenCV is something that exists. :)
I don't really know where exactly to even start looking, or what I'm looking for.

Is this something where we'll need to bring in a computer science person to do this kind of thing? Or a team of Ph.Ds? Or could a properly-trained monkey handle it? Is there a good starter kit of some sort? Fisher Price's My First Vision Sensor?
 
Last edited:

Sheep221

Golden Member
Oct 28, 2012
1,843
27
81
If you need to just differentiate people from standing by objects, it would be enough to get basic motion detector.
 

Jeff7

Lifer
Jan 4, 2001
41,599
19
81
If you need to just differentiate people from standing by objects, it would be enough to get basic motion detector.
People are what I don't want to see, along with everything but just the desired object type.


The needs:
- Differentiate the desired objects from a changing background, such as creeping puddles, snow, litter, or shadows.
- Determine which direction the object is moving.
- Don't "lose" the object if it halts in the field of vision for a few minutes.
- Differentiate the desired objects from people walking by, large carts being pushed through the field of vision, or people in wheelchairs.

Sensor technologies examined:
- Ultrasonic. Time-of-flight can be used to determine how close an object is to the sensor. But, unusual object geometry can easily cause the ultrasonic "beam" to be deflected away, resulting in a loss-of-target condition. The signal integrity can also be affected by wind, hot air, and humidity.
- Microwave/radar: Most of these sensors lack presence detection, so if the object stops in the detection field for more than a few seconds, the sensor thinks it's disappeared completely, but then it reappears again once it starts moving, resulting in additional object counts.
- Infrared light curtain: Most of these sensors require a background. If something like water or litter appears in the background, it results in a false trip. Some of them also have problems seeing certain paint colors, causing some odd trip patterns.


All of these technologies also have the problem of being able to see people equally well as the object I'm trying to detect. They also require at least 2 sensors to be installed in order to sense the direction the object is moving. Placement of the sensors is also crucial, as a very rough way of determining the size of the moving object.

And, this sensor search has been ongoing for a few years now. The IR light curtain works best out of all of them, but it does still have some downfalls, such as sensitivity to water, and it's also very sensitive to changes in its learned environment, which can result in false trips.
 
Last edited:

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
You can probably do this by yourself within your budget depending on a few factors:
1. How fast/how big are the objects you want to track?
2. Will the sensor be stationary? What about the background?
3. Can you manipulate the contrast by changing the background?
4. How good are you at programming and in what languages?

If you need to track very fast objects, you'll need high-speed cameras (very expensive). If you need to track small objects that move a lot, then you'll need a much more complicated system with macro lenses that moves the camera head to track the object(s). If you can ensure high contrast and a static background, the whole thing will be much easier. If you can use MATLAB then most of the work is already done for you. There are also libraries in other languages.
 

PsiStar

Golden Member
Dec 21, 2005
1,184
0
76
Still could use a bit more info about what you do want to "detect".

Could these objects be tagged ... RFIDs for instance?
Metallic, organic, reflective ... ?
Random depth of field or at a narrow range?
Size ... any consistency?

Is the intent to differentiate the objects per se or just the inanimate from the living?

There are dedicated vision systems as well as options for PLCs.
 
Last edited:

Jeff7

Lifer
Jan 4, 2001
41,599
19
81
- The objects may be moving up to 25mph, but they're also sufficiently large that they'd fill most of the camera's field of vision.
- The sensor will be stationary. The background will change due to a variety of factors: Changing relative position of the sun, litter, occasional animals wandering by, indoor lighting, and intermittently wet/dry surfaces.
- Can't change the background, though it's likely to be either black or light gray, possibly with some colored patches. The objects could be just about any color, likely glossy.
- I personally can program in C, somewhat adequately....and that's about all. :\


- Objects cannot be tagged. (This was investigated already too.)
- Metallic, mostly.
- Depth of field - as in, distance from the camera? The background may be anywhere from 6 to 14 feet away.
- Size: Pretty variable, I'd guess maybe 3:1 in area between the smallest object and the largest.
 

Jeff7

Lifer
Jan 4, 2001
41,599
19
81
I miss spoke, "a bit more" was being facetious ... a lot more is needed
I just don't know if we're venturing into NDA territory or not, though the given information might already make it possible to figure out the application. Don't know.


Soxfan: I guess the good news there is that some of this processing can be done on a small/mobile/low-power platform. I've seen an iPhone measuring app where you take two pictures of something a distance away, and it does the parallax calculations to figure out how big a selected object is.
 

PsiStar

Golden Member
Dec 21, 2005
1,184
0
76
I am assuming that you followed the link I posted earlier under "options for PLCs". There is a nice video there that presents what one PLC manuf. easily does. I used to do machine control & measurement systems with multiple embedded CPUs, steppers, vision systems, test equipment, etc ... but always ultimately interfaced with a PLC. PLCs are the standard device for actual machine control as safety locks & lights are easily and normally used with. OSHA or somebody like that can stick their nose in if there is even a minor accident or complaint.

I liked the Omron PLCs as they seemed easiest to program (for me). I am/was a C++ programmer & found it worked quite well. Constructors/destructors are quite useful for developing drivers for A/D & D/A devices for instance.

My applications were for checking coplanarity of connector pins, absence ... skew. And, that was after the parts went thru an assembly machine that was 20' long (it did lots of stuff). At the other end of the scale, Hershey Chocolate ... it is not just about pooping out little kisses.

Anyway, I thought the PLC link would get you thinking about what they can do & limitations as applied to your idea. You can always make it more complex with an embedded CPU. I am encouraging the PLC notion just in case you decide that you do not want to own the project for the rest of you life and/or have to hire a Computer Engineer to take it over.

I really like machine control & measurement systems, but what I do now pays better. Never the less, I have my own business & would sign a NDA if you think it worth while to have more open & detailed discussions.
 

Jeff7

Lifer
Jan 4, 2001
41,599
19
81
Those do look like some pretty impressive sensors there. It looks like vision sensors can be as good or as cheap as you'd like, though I assume that the primary drivers then are the cost of the sensor, and the amount of computing horsepower that you're willing or able to throw at it.

As far as owning the project for life: 1) I think we'd be ok with that, at least so far as "keeping it in the family." It gives the company control more control over the complete system; too often, when we open up some of the workings of our stuff to entities outside the company, we invariably have to field the support calls when someone else's stuff stops working for whatever reason, or even if it ends up changing and becoming incompatible. So even if it's another company's product that's gone way beyond left field, it makes our stuff stop working, and our phone number is easier to find, so we (well, I) get the support calls. 2) It makes it easier to make changes to things if our own products are the only ones to work with. There aren't any cross-country conference calls to figure out how to implement design changes to things like protocols - it's more a matter of me turning around and asking someone else in the same room what he'd think about changing "X section" of the communications protocol for the next iteration of an assembly, or adding additional functionality. 3) I think the engineering manager wants to hire some manner of computer engineering person at some point anyway. This might be a foot-in-the-door project to get to that objective.

NDA and such: I'll look into how they might want to proceed at work with this. Upper management will likely need convincing first that this is worth looking into, and that it could be quite a big deal for us. There are a few other other fairly profitable projects in the works though; so, fun as it may be, this one might not be a priority in the very near future. :\ Right now, this is more of Engineering's "This could be totally awesome" dream project :D, which could also make a decent splash in the industry.
 
Last edited:

Pulsar

Diamond Member
Mar 3, 2003
5,225
306
126
I do some work with vision systems. Your requirements are too vague. What are the lighting conditions? You're going to have to explain color as well. You could do black and white, but what are you going to do with the information? It takes a pretty beefy computer to do the vision processing.

You could do this with a high end web cam like an Axis 1101 ($120). Programming OpenCV is going to require someone who knows what they are doing. It's not a one time thing either.....
 

PandaBear

Golden Member
Aug 23, 2000
1,375
1
81
To begin you need to get familiar with vision processing yourself or hire someone that can. Like all the people above said your requirement is too vague. In my previous work and school I've seen system that does what you said, but they are usually done at $1000 or so because they are small volume. Still much cheaper than developing your own with hired labor.

If you are just doing this as R&D or prove of concept, you can hire people with DSP background and a good enough camera to do signal processing frame by frame. There are algorithm that detect moving objects and you have to "train" the system by testing for various threshold. It is not a discrete project like writing a C program and forget about it. You have to test and test with various condition to see if it meet your need before you sign off the result, and this would be the most expensive part instead of buying a proven system from a proven company.

For a simple student graduation project you can just use anything, but for a real world functional system you want something that is proven to reduce R&D time and risk.
 

PandaBear

Golden Member
Aug 23, 2000
1,375
1
81
Looks like you are doing some sort of vehicle tagging or vehicle camera.

The best way to approach this IMO would be magnetic sensor on the ground like those seen in front of an intersection. Knowing an object to be mainly metal would give you an advantage on that.

Combine it with other sensor to eliminate human and animal (through beam sensors to measure size), you can get most of the info you need accurately. Losing sight of an object when stationary isn't a big deal if you do post processing in a computer to combine lots of repeating object, that is actually the easy part.
 
Last edited:

Jeff7

Lifer
Jan 4, 2001
41,599
19
81
Looked at magnetic/inductive as well. A lot of places can't have, or don't want, installation of stuff on or in the ground like that; besides that, that tech has a history of problems with counting multiple close-following objects as one big object. The sensitivity has to be set very carefully, too - otherwise it starts counting individual axles, or things like wheelchairs and metal carts, or it can completely miss things like "lifted-up" pickup trucks.


Edit: Ok, I got the green light to ask ask ask away, with numerous details.:)


Yes, the goal is indeed trying to detect and count vehicles passing by an arbitrary straight-line threshold, and also determine their direction of travel. Most of the time, we can't have inductive loops put into the ground. It adds cost, and in some cases, such as in a parking garage, my understanding is that that means that there are some legal hoops to jump through, to be sure that they're not compromising the integrity of the garage.


Right now, the sensors are IR light curtains, mounted to the ceiling and looking down across a lane of travel. Two of them are placed about 48" apart, and are connected to a controller board that monitors them, and communicates the vehicle counts to a central controller. Any object that can trip both of them at the same time is considered large enough to be a car. The sequence in which they are tripped and release determines direction of travel. The IR curtains have the benefit of handling tailgating very well. Two cars would need to be following quite extremely close in order to cause the system sensors to miscount.

Problems with these sensors, or with this system setup:
- The sensors need to be angled away from vertical, otherwise water on the ground - standing or simply wetted - can cause them to see it as a change in environment, and they'll lock up. The controller can sense a prolonged lockup and reset the stuck sensor, which causes it to relearn its environment.
- Upon a reset, the sensor needs some "quiet time" during which it can learn its background environment. If a reset occurs during rush hour, it won't see a break in traffic until most cars have left, meaning that it will have missed all of them. We can't just have a flag pop up and tell the drivers, "Hang on, this sensor needs everyone to stop!" That's not going to work.
- They trip from anything, including pedestrians. One or two people typically won't span enough space to trip both sensors concurrently, so they aren't counted. Person pushing a stroller though with spouse close behind? Counted. Someone pushing a person in a wheelchair? Counted. Motorcycle? Sometimes, sometimes not. Trash on the ground? Sensor's tripped. Cat wandering by? Sensor's tripped.
- Some very dark cars aren't easily seen by the sensors, and can result in a sporadic trip pattern - the controller doesn't see the clean transitions it is expecting, so it assumes that the trip sequence is noise and doesn't count the car.
- Cars can often park in spaces directly to the side of the sensors. If it's a large vehicle, it may be within the field of vision, so the sensor gets stuck until the controller resets it. Then when the vehicle leaves, the sensor gets stuck once again. Besides that, when the vehicle is backing out of the parking spot, the sequence it trips the sensors is quite unpredictable. It may or may not be counted as a vehicle, or it may even be counted as going in the opposite direction.


So that's what this sensor thing needs to answer:
- Is that thing a car?
- Which direction is it moving?

The vision sensor idea was on everyone's mind for awhile. My main concern: Shadows and puddles. "Oh wow, that's a big object! That must be a car!" Nope, it's just a big puddle running across the ground.

So, either make the sensor smart enough to handle that, or make it stereoscopic. "Oh wow, that's a big object! But it's 0" tall. That's not a car."
My idea is that the vision sensor would look down across the lane of travel, and if it sees an object that is both large, and X portion of the large object is at least 2ft off the ground, call it a car. Besides that, determine which direction it's moving. Every time it counts a vehicle, it would record the count and the direction of travel in a buffer in RAM, and then when the external control system queries it every 5-10 seconds, it reports how many cars it saw going one way, and how many it saw going the other way, and then when it receives an acknowledgement of that packet, it resets the buffer.


Microwave/radar sensors: Most lack presence detection. Car drives under the detection field, it's detected. Car sits there, and the sensor stops seeing it. Car starts moving again, and the sensor thinks it just popped up out of nowhere. Besides that, these don't handle tailgating well - tailgating vehicles tend to blur together in the sensor's field of vision. They also see people (water content) just as well as they see metals.

Ultrasonic:
Sonic "beam" hits the ground: Ok, that's a background. Great.
Beam hits the hood of a vehicle: Ah, something above the ground. Car!
Beam hits the windshield and bounces off into nowhere: Oh no, the ground disappeared! Now what? Uh....I'll just guess that it's still a car.
Beam hits the roof of the car: Oh, there's the car!
Beam hits the back window: Car's disappeared again.
Beam his the trunk lid: And it's back.
Beam hits the ground: Back to normal.

Not every vehicle has that profile. In addition, the gain can be tricky. Experience shows that inadequate gain can cause problems on hot blacktop: Either the blacktop itself absorbs sound, or else the hot air layer over it does. Either way, the sensor can intermittently lose sight of the ground on a clear, hot day. So then you don't have any way of knowing if it lost the return signal because it's really hot out, or if the sensor is just hitting an angled windshield.


Inductive:
Loops have the problem of needing to be installed in the ground. An alternative is a sort of "mat" that is laid on the ground, but that's subject to increased wear, and I can't see that working well in surface lots where plowing is needed.
I've seen some other inductive sensors, but they're not directional. So if a car passes by in another lane, or on another level of a parking garage, it will still be detected.

Audio: There was an attempt some years ago, before I was working at the company, to try to profile the sound a "typical" car made, and figure out from there if it was a car. Nope. Way too much variation, way too much ambient noise, and way too much lack of anyone resembling an acoustics expert.

RFID: Ticket-spitters would need to be modified to include an RFID tag in the ticket. And I sure hope no one forgets a ticket inside their car. One car could suddenly become 5. Besides that, the car's a big metal cage. I could imagine some possible problems with RFID there, though I'm certainly not an expert in that particular (electromagnetic:awe:) field.



So that's why the vision sensor is the main contender now. How does a person tell if something's a car or not? You look at it. The stereoscopic sensor eliminates the problem of shadows or puddles, since they're effectively zero-depth, and it could tell if an object is sufficiently large in three dimensions to be reasonably sure that it is indeed a vehicle.
Bonus points: Detecting motorcycles and counting them separately, as some parking locations have dedicated areas just for motorcycles.



Plan F was Monkey-With-A-Pushbutton. Trained monkey sits at the counting points, and when he sees a car, he pushes one of two buttons to indicate its direction. There are some potential problems with this though, such as logistics, warranty and maintenance, attention deficit issues, and field diagnostics.:D
 
Last edited:

VirtualLarry

No Lifer
Aug 25, 2001
56,340
10,044
126
Plan F was Monkey-With-A-Pushbutton. Trained monkey sits at the counting points, and when he sees a car, he pushes one of two buttons to indicate its direction. There are some potential problems with this though, such as logistics, warranty and maintenance, attention deficit issues, and field diagnostics.

Is there really a market for trained monkeys in this sort of application? Wonder what hours you are allowed to make them work...
 

Pulsar

Diamond Member
Mar 3, 2003
5,225
306
126
Why don't I see laser distance meters on your list? Instead of just presence, measure height and duration. That would rule out strollers and garbage quickly. They're not that expensive, are accurate to the millimeter, etc etc. Their used in industrial environments, and can send out a signal that any computer can read, and you can write the code in any language you like. If you were sharp, you could even map the profile of each car as it passes.
 
Last edited:

PandaBear

Golden Member
Aug 23, 2000
1,375
1
81
Now it is a lot more clear what you are trying to do and IMO it is actually much easier to do without camera based recognition system.

A light curtain should be the best choice when setup correctly. IMO using the right sensor means something that can tell you the pixel count of the item passed, not just whether something tripped or not. IMO you need something that register a certain height or a certain duration of time, and yes you need 2 of them close by to distinguish whether it is a slow moving object or a really big item (assuming the speed don't change when the item hit only 1 of the sensor, or like you said would be seen as "stuck" and reset).

I would have 2 through beam curtains from left to right trying to catch what you do now with a top to bottom reflective curtain, then another from left front to right rear to catch a measurement at a 45 degree angle, and use that to figure out the width from the length measured from the left-right curtain. Now you know the length and width and you should be able to determine if it is a car, truck, human, cart, animal, etc, all without touching the ground. You can get much better reliable if you can get height or vertical blockage measurement to determine if a tail gate causes wrong measurement, but even without it you can distinguish between a large truck vs 2 car tail gating each other with the left-right sensor pulses. (assuming a dog or cart didn't walk by when 2 cars tail gate each other)

If you can, I think you should get a customized version of what you have so you can program or eliminate reset, then get raw data to see whether you can customize your detection algorithm. I would not be surprised if you setup multiple light curtain at different angle you will get enough information to distinguish between a vehicle vs a shopping cart.

Any break the beam kind of sensor should be the first choice because of reliability. Reflective type sensor has a tendency of false detection on a non uniform (curved) surface and is sensitive to material type. The worse is vision based as light condition can cause even worse problem.



I mean something like this but with a much bigger size:

http://metralight.com/

I've bought stuff from these guys in my past work (semiconductor wafer sensor), they might point you to the right place or build a custom sensor for you (i.e. an array of their sensor to make a large light curtain). Or you can talk to your current light curtain vendor's application engineer and see if they can customize a feature for you at a non recurring cost.
 
Last edited:

PsiStar

Golden Member
Dec 21, 2005
1,184
0
76
I once designed a sensor for detecting human contact with a normally exposed cutting blade. Actually the concept was to detect "near" contact. It is RF based (related to what I do now) & detected, without contact, the electrical material properties (sort of a signature) of the objects. A difficulty was differentiating flesh versus wet pressure treated lumber which in that app could be common. This was not radar-like, but similar to the way metal detectors work. Although the sensor system I designed used antennas and not coils as metal detectors use ... and was not limited to metal.

Perhaps a way to think about the problem is to detect all movable objects in a defined field and filter out all flesh? This brings up the first requirement, define "object" which is it seems that you have that mostly understood. Is that kid on a bike an object or human? What about other critters like dogs? Some dogs can be bigger than some people.

Define the "must haves" of the problem, keep the "I wish" and "I wants" separate. Options are good to know up front so that some provision can possibly be designed in for future. You cannot solve a problem that is not yet defined.
 

PandaBear

Golden Member
Aug 23, 2000
1,375
1
81
PsiStar is right, defining the object is the key here and to distinguish the vehicle from other stuff you can either define by dimension, capacitance (metal?), weight, reflectivity (color, surface direction, shape, etc), or a combination of the above.
 

wirednuts

Diamond Member
Jan 26, 2007
7,121
4
0
uberly thinking, a simple hd webcam with some hot shot custom software code would be the right way to do it.

but realistically, im thinking a good way to determine between cars and people is weight. how about pressure sensors 2" apart on a long strip across the entrance/exit point- and if any single sensor reads above 500lbs you know a motorcycle or car has passed. that way even if a bunch of people stand on the strip, not any single sensor will read over 350lbs (hopefully). maybe do two strip of sensors for direction and have them both encased in a rubber pad- rolled out when and where needed. like spike strips. something tells me these are already being made honestly.... and since its only 1 mechanism that would require no software code (a simple log printout could be researched for the results you need) i cant imagine anything being more simple or cost effective.
 
Last edited:

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
This has already been done a hundred different ways for signal control, red light cameras, and even simply monitoring traffic flows. The solutions are likely to be found in the traffic engineering literature. If you want to reinvent the wheel then this project is the perfect one to undertake from scratch. However, there are plenty of wheels already out there that will be cheaper in time, money, and energy than constructing yet another prototype. That said, if you really want to develop a new design, I'll be happy to share my ideas.
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,606
166
111
www.slatebrookfarm.com
There are motion detectors in use in physics classrooms all across the country. Unless I'm mistaken, most use ultrasonics. They detect distance, and compute speed (speed in the direction toward/away from the sensor.) Sensitivity can be adjusted.

Here's a suggestion - instead of one sensor, how about 2 motion sensors:
one detects motion, period. A car or person would trigger it equally well. The second works on IR and detects humans (faces or whatever.) Some really complicated 2nd grade math later (subtract) and you have your total of cars.
 

Jeff7

Lifer
Jan 4, 2001
41,599
19
81
Hm.....well.
That's a good bit more sophisticated than what I had in mind, and I think that thing needs a PC to function. That thing can see vehicles along quite a few mounting planes. I also don't know what it costs.
I'd need something simpler: Look straight down, and look for a big object that has at least a certain areal size that is all at least 16" above ground level.



Is there really a market for trained monkeys in this sort of application? Wonder what hours you are allowed to make them work...
I doubt that OSHA applies to non-human primates. :hmm:



Why don't I see laser distance meters on your list? Instead of just presence, measure height and duration. That would rule out strollers and garbage quickly. They're not that expensive, are accurate to the millimeter, etc etc. Their used in industrial environments, and can send out a signal that any computer can read, and you can write the code in any language you like. If you were sharp, you could even map the profile of each car as it passes.
Because I forgot to put it there. :oops:
That is indeed one thing being looked at: A laser meter with 4 curtains near one another, though they may be too close to detect direction of a vehicle moving with speed. And they're ~$800 each, so I'd really need to keep it to only one per lane of travel, in order to sense vehicle direction.
It'd still kind of be a vision system - just with a lot fewer pixels. :)




Now it is a lot more clear what you are trying to do and IMO it is actually much easier to do without camera based recognition system.

A light curtain should be the best choice when setup correctly. IMO using the right sensor means something that can tell you the pixel count of the item passed, not just whether something tripped or not. IMO you need something that register a certain height or a certain duration of time, and yes you need 2 of them close by to distinguish whether it is a slow moving object or a really big item (assuming the speed don't change when the item hit only 1 of the sensor, or like you said would be seen as "stuck" and reset).

I would have 2 through beam curtains from left to right trying to catch what you do now with a top to bottom reflective curtain, then another from left front to right rear to catch a measurement at a 45 degree angle, and use that to figure out the width from the length measured from the left-right curtain. Now you know the length and width and you should be able to determine if it is a car, truck, human, cart, animal, etc, all without touching the ground. You can get much better reliable if you can get height or vertical blockage measurement to determine if a tail gate causes wrong measurement, but even without it you can distinguish between a large truck vs 2 car tail gating each other with the left-right sensor pulses. (assuming a dog or cart didn't walk by when 2 cars tail gate each other)

If you can, I think you should get a customized version of what you have so you can program or eliminate reset, then get raw data to see whether you can customize your detection algorithm. I would not be surprised if you setup multiple light curtain at different angle you will get enough information to distinguish between a vehicle vs a shopping cart.

Any break the beam kind of sensor should be the first choice because of reliability. Reflective type sensor has a tendency of false detection on a non uniform (curved) surface and is sensitive to material type. The worse is vision based as light condition can cause even worse problem.


I mean something like this but with a much bigger size:

http://metralight.com/

I've bought stuff from these guys in my past work (semiconductor wafer sensor), they might point you to the right place or build a custom sensor for you (i.e. an array of their sensor to make a large light curtain). Or you can talk to your current light curtain vendor's application engineer and see if they can customize a feature for you at a non recurring cost.
Yes, something along those lines. A light curtain with a bunch of points of measurement in the curtain. I'd need it to be adjustable in terms of a triggering threshold - only trigger an output if a certain number of the beams are blocked.
The tricky part of finding a custom solution is that our EAU is fairly low, <1000 units. Most companies would like a few more zeroes after that. ;)

Sensors that need a retro-reflector: We've tried these in side-fire configurations, shooting a beam across a lane of travel. Problem: Some vehicles have reflectors on them, or else the taillights are reflective, so the sensor can think it's seeing the other side. The alternative is to have an active sensor on the other side instead of a reflector; that increases the amount of conduit runs required though, though it's not an insanely complex solution. It would need immunity against snow and rain.



I once designed a sensor for detecting human contact with a normally exposed cutting blade. Actually the concept was to detect "near" contact. It is RF based (related to what I do now) & detected, without contact, the electrical material properties (sort of a signature) of the objects. A difficulty was differentiating flesh versus wet pressure treated lumber which in that app could be common. This was not radar-like, but similar to the way metal detectors work. Although the sensor system I designed used antennas and not coils as metal detectors use ... and was not limited to metal.
That type of system sounds like it would trigger an output if anything detectable got within its sensing field, correct?


Perhaps a way to think about the problem is to detect all movable objects in a defined field and filter out all flesh? This brings up the first requirement, define "object" which is it seems that you have that mostly understood. Is that kid on a bike an object or human? What about other critters like dogs? Some dogs can be bigger than some people.
Possibly. Lots of different kinds of flesh though, and if it's winter, not much of it is going to be visible.


Define the "must haves" of the problem, keep the "I wish" and "I wants" separate. Options are good to know up front so that some provision can possibly be designed in for future. You cannot solve a problem that is not yet defined.
A very valid point. Most of the "must haves" are here already though. I left the "I wish" parts mostly out.
- Must detect and count vehicles reliably.
- Must determine direction of travel, to a resolution of "Left" or "Right."
- Must not count non-vehicle objects or people.



PsiStar is right, defining the object is the key here and to distinguish the vehicle from other stuff you can either define by dimension, capacitance (metal?), weight, reflectivity (color, surface direction, shape, etc), or a combination of the above.
Car, pickup truck, SUV, convertible, pickup truck with stuff in the back, vans...
So "varies widely" in some respects. :)
That's why I was going for the stereoscopic approach (or the laser distance meter) where it could establish a height threshold, and if a certain amount of "stuff" was visible within a certain area, and that "stuff" was more than 16" off the ground, you could reasonably assume that it is a car. In that case, the shape or profile doesn't matter, and is automatically filtered. It's not smart, but then it doesn't necessarily need to be.



uberly thinking, a simple hd webcam with some hot shot custom software code would be the right way to do it.

but realistically, im thinking a good way to determine between cars and people is weight. how about pressure sensors 2" apart on a long strip across the entrance/exit point- and if any single sensor reads above 500lbs you know a motorcycle or car has passed. that way even if a bunch of people stand on the strip, not any single sensor will read over 350lbs (hopefully). maybe do two strip of sensors for direction and have them both encased in a rubber pad- rolled out when and where needed. like spike strips. something tells me these are already being made honestly.... and since its only 1 mechanism that would require no software code (a simple log printout could be researched for the results you need) i cant imagine anything being more simple or cost effective.
Can't put stuff on the ground, at least not in all applications. Florida or Texas? Maybe. Maine or Buffalo, NY? Plows on parking lots would probably rip it to pieces.



This has already been done a hundred different ways for signal control, red light cameras, and even simply monitoring traffic flows. The solutions are likely to be found in the traffic engineering literature. If you want to reinvent the wheel then this project is the perfect one to undertake from scratch. However, there are plenty of wheels already out there that will be cheaper in time, money, and energy than constructing yet another prototype. That said, if you really want to develop a new design, I'll be happy to share my ideas.
Traffic control though seems to be geared more toward government agencies, and they will pay for things like slicing into the road and installing loops. Though there may well be other technologies out there. I just don't know if any of them are for this type of application. I'd guess that they're more for "Yup, there's something metallic here" rather than "Something just passed by heading east at 18mph. Triggering output..."
Or at least, no one is interested in customizing something for us because of the low annual usage figures, or our final cost targets.
I just don't know how to go about finding this kind of stuff.

Red light cameras were a thought, actually. They can see cars, and evidently have some intelligence in them. I know nothing about how they do their processing, or how capable they are - or how customizable they could be. :\



There are motion detectors in use in physics classrooms all across the country. Unless I'm mistaken, most use ultrasonics. They detect distance, and compute speed (speed in the direction toward/away from the sensor.) Sensitivity can be adjusted.
What are these used for? Can they sense directionality of an object?


Here's a suggestion - instead of one sensor, how about 2 motion sensors:
one detects motion, period. A car or person would trigger it equally well. The second works on IR and detects humans (faces or whatever.) Some really complicated 2nd grade math later (subtract) and you have your total of cars.
I'd need a thermal profile of a "typical" person - cold face, warm face, smoking a cigarette, hat, scarf, beard, bald head, 80's hair, sunglasses, or any other thermal profile that could get thrown at a sensor.

That's what I've encountered with so many of these technologies. They tend to pick up people and cars either equally well, or else they're better at detecting people than cars. (Most people don't have lots of glossy, solid surfaces.:))



So, out of all of these, the vision sensor would probably be the most interesting method....though it seems like it may also be exceedingly complex, given our resources. (2 mechanical engineers and 1 electrical engineer, all quite bogged down all the time.)
And a possible downside of a vision sensor: It's a camera. That may limit its use in some government jobs, where they don't like the use of any manner of recording devices. In that context, one customer even questioned the use of an SD card on one of the controller boards - it's used to store configuration and logfile data of things like system resets, network errors, and sensor problems.


The laser scanner seems like the best mix: It would give a vehicle size profile and height above ground, and it should be able to do direction-sensing - and that manufacturer does seem to be at least somewhat interested in courting our small business' business. That $800 price is on the borderline of what we're ok with, but if it can give top-notch performance, that means that it's the right product for the job.
 

wirednuts

Diamond Member
Jan 26, 2007
7,121
4
0
i was under the impression the monitoring would only take place during certain hours, and the locations would change regularly (im thinking like youre a parking lot money collector or something?). im getting the hint now that this is 24/7 permanent installations?