Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video format and frame rate #14

Open
medusa606 opened this issue Sep 28, 2016 · 8 comments
Open

video format and frame rate #14

medusa606 opened this issue Sep 28, 2016 · 8 comments

Comments

@medusa606
Copy link

Hi, great proect! A child on my road had both legs broken after being hit by a car. Road is used to cut between more major roads and speeding is often observed. I can run your VideoSpeedTracker.exe in windows with no issue using your demo video footage.
However it shuts down without any reported error when I use my video. Using logitech c920 in 1024x720 mode, set to 30fps. I'm unsure if it is achieving 30fps though. I'm using iSpy to trigger recording on motion detection, which is only reporting 10fps. Could this be the issue?

@pfr
Copy link
Owner

pfr commented Sep 28, 2016

Hi Medusa606...

Somewhere in the long user guide I wrote it mentions that the currently
posted version of the VST requires a 1280 x 720 input. I expect the VST is
stopping because when it does an image size check it finds non-conformance.
This is not necessarily an easy one to get around. I could change the
code to work with your lower resolution but the quality of the tracking
would likely go down. We have a couple of options here:

  • You could buy a Foscam (now Amcrest) camera like the one I describe in
    the user manual (or a Trendnet equivalent)
  • You could make changes to the source code yourself, and recompile.
  • You could wait for me to make the needed changes.

Given the rapid increase in camera resolution combined with holding or
dropping prices (Keep an eye on Amcrest and Trendnet cameras) I'm not
inclined to do much to step back in resolution, but instead to modify the
VST code to work with the newer higher resolutions. I will continue to
support down to 1280 x 720 because I've found I can get good tracks at that
resolution, and working with higher resolutions probably has diminishing
benefits, and would cost more computer time to process all the additional
pixels.

We're going to have more kids hit by speeding, often distracted, drivers
across the country. I am truly sorry for the kid on your street and hope
s/he recovers. Coincidentally, I am sitting in rehab right this moment
recovering from two broken legs -- eleven days ago. My incident involved
legs entangled in the rungs of an extension ladder that slid across my
concrete garage floor.

If you have the persistence to get my code running for your setup I can
report that there's hope that you can make a difference. I have managed to
get the city to slow its buses to under the 25MPH speed limit, I have had
an observable effect on overall traffic speeds on my street, mainly through
a lot of media interest in what I'm doing, and just last evening I got our
local state rep to agree in public that if Charlottesville asks the state
legislature for permission to use automated speed cameras (check them out
in DC and Rockville, MD), he will sponsor a bill to reflect that request.
It really is possible to make a difference! Couldn't have done it without
the million vehicle tracks I've gotten on my street since Jan, and a few
hundred thousand more on other streets around Charlottesville.

Best,
Paul Reynolds
Charlottesville, VA


www.cs.virginia.edu/~pfr
http://eyetach.github.io/CharlottesvilleSpeeds/

On Wed, Sep 28, 2016 at 6:58 AM, medusa606 [email protected] wrote:

Hi, great proect! A child on my road had both legs broken after being hit
by a car. Road is used to cut between more major roads and speeding is
often observed. I can run your VideoSpeedTracker.exe in windows with no
issue using your demo video footage.
However it shuts down without any reported error when I use my video.
Using logitech c920 in 1024x720 mode, set to 30fps. I'm unsure if it is
achieving 30fps though. I'm using iSpy to trigger recording on motion
detection, which is only reporting 10fps. Could this be the issue?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#14, or mute the thread
https://github.com/notifications/unsubscribe-auth/AQSDBid9WHH1R6AFGrN7uC-ojD666kdSks5qukhtgaJpZM4KIrnV
.

@medusa606
Copy link
Author

Hi Paul,
So sorry to hear about your accident. I hope you get better soon. Maybe give you a chance to catch up on 100's of emails too ;) I believe you are right that a difference can be made, I just need some evidence to go to the local council with.
Sorry, a mistake in my post, the resolution of the video i'm capturing is 1280x720. And i managed to increase the frame rate to 30fps. I have tried recording compressed H264 (as in your demo video) and uncompressed avi. They both cause the program to terminate after the question about the large vehicle size. I've tried using visual studio to debug the issue but it complains about symbols, spends half an hour loading the symbols from the microsoft server then just says that there was no debugging enabled during comlpilation. I'm not too familiar with C++ but I downloaded Visual Studio Community 2015 and tried to compile but the compiler just seems to hang. Do I need to create a project first?
Best wishes
Greg
Bristol, UK

@medusa606
Copy link
Author

Hi Paul,
I created a project in VS 2015 (I needed the C++ plugins which were not there by default!) and can now compile the code. Just sorting out a few directory linker errors. Will report back when I get some more info.
Cheers

@medusa606
Copy link
Author

I've also noticed there is no VideoSpeedTracker.vcxproj or VideoSpeedTracker.vcxproj.filters file in the repo, this would be helpful to set up and compile. What version of VS did you use? I managed to get rid of the compilation errors on VS2015 by switching off precompiled headers. It not complains at

@medusa606
Copy link
Author

unresolved external symbols, e.g.
"public: __thiscall cv::VideoWriter::VideoWriter(void)" (??0VideoWriter@cv@@QAE@XZ) referenced in function "void __cdecl `dynamic initializer for 'hiLiteVideo''(void)" (??__EhiLiteVideo@@yaxxz)

@RadWagon
Copy link

Hi Paul,

So glad to see about your program, something I've been wanting to do for a while. We have the dual issue of speeding (sometimes actual racing up to 60mph) along a road with a lot of vulnerable road users AND the police saying they don't want to do anything about it! Including to our elected representatives.

I've tried using the VideoSpeedTracker, and found it works fine on your demo. However, when using it on a similar file (H264, 1280x720) and it just crashes out with the phrase "Trying to Capture "
(I think, it flashes by and disappears!).

@RadWagon
Copy link

That's "Trying to Capture ". Thanks for your work and help!

@RadWagon
Copy link

Okay, after the word "Capture" it puts in myfilepathname.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants