loading
 
Speed Trap Application
Steve Woodrough from United States  [46 posts]
3 years
It’s been a while since I have played with RR.   My family and I relocated from Chicago to Atlanta and that pretty much halted any projects.   I have a new application I would like to experiment with and want to get input before I begin.

I want to create a “speed trap” of sorts.  Imagine looking at a path way from a perpendicular direction.  Path traffic crosses the image from left to right or right to left.  I then want to put a series of “gates” (2 maybe 3) that cross (intersect) traffic on the pathway.  The gates will be perpendicular to the path centerline and therefore will not be square on the screen.  

If I know the relative distance on the ground between the various gates I can then calculate the speed of objects moving between the gates.  Depending upon the object speed I would then like to capture a screen shot.  

Has anybody done this?  Recommended filters and approaches?  

Regards
Steve
Steven Gentner from United States  [1370 posts] 3 years
Steve,

Yes, this should be possible but your results will depend on what exactly you are monitoring (cars?) and how well one camera can correlate the object from one camera to the next. If you get infrequent enough objects passing by you can just use an entire image trigger in that when the image changes enough that's a start trigger and when the other camera also gets a large change that triggers the end. The solutions will be driven by what you are sampling. In the case of cars most of these types of "average speed" systems used in the UK utilize license plate reading to determine start and stop times. As that's not a mission critical application of this technique it can work .. i.e. reading license plates is not a 100% accurate technology esp. when dealing with international/custom plates.

STeven.
Steve Woodrough from United States  [46 posts] 3 years
STeven,
What you describe as a multi-camera system makes sense.  I have reviewed the help section regarding the RR Movement module.  What I had in mind is similar to the post from Guy in the Netherlands using a single camera.

Lets break this into baby steps:  

How can I / do I perform motion detection in a specific user defined 4 sided region?  I want to create a long thin rectangle (a line / gate) and trigger an event if there is movement in that specific region.  

Regards
Steve
Steven Gentner from United States  [1370 posts] 3 years
Steve,

There are a couple ways to do this. The easiest is just to crop the image into that area you want to monitor ... or you can crop after the movement of the entire image just to focus on that section. For now, lets start simple. Have a look at

http://www.roborealm.com/help/Crop.php

as one can use the Crop module to isolate an area in the image.

STeven.
Steve Woodrough from United States  [46 posts] 3 years
STeven,
A your recommendation I used the crop and movement modules to crop and detect movement in the cropped region of a master image.   What I am having trouble with is understanding how to create a second cropped area from a different portion of the the same master image.  
Any suggestions?
Regards,
Steve
Steven Gentner from United States  [1370 posts] 3 years
Steve,

That's good!

To get another area, use the Maker module (use something like 'First Area' for the name) and revert it back to the 'source' image. You can then use another crop to get a different area.

The marker module essentially saves a copy of the current image in memory which can be used again in other modules by the name that you use.

http://www.roborealm.com/help/Marker.php

STeven.
Steve Woodrough from United States  [46 posts] 3 years
OK, I've gotten this far and I think I basically understand the marker module.   Now I need to start a timer when one cropped area reaches a threshold and stop the timer when the second module reaches a threshold.  Later we will overlay the two cropped areas onto the original image then to give the visual effect.  Attached is my robo file.

Regards,
Steve
program.robo
Steven Gentner from United States  [1370 posts] 3 years
See the attached (note I did change the movement from blob to window just for testing so you might need to change that back).

You may also need to tweak the percent movement trigger in the If_Statement module to avoid false triggers from noise.

Nevertheless, this will time movement from one side to the next.

Note for those testing this ... a 640x480 image size is recommended.

STeven.
program.robo
Steve Woodrough from United States  [46 posts] 3 years
STeven,
Thank You!  

Steve

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index