C :: OpenCV And Detecting A Person With A Webcam

Jul 2, 2013

Code:
#include "opencv2/video/tracking.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc_c.h"

#include <stdio.h>
#include <stdlib.h>

[Code] ....

The above code is all I have so far. I got confused when I got to the part where my book on C tells me I need to use the cvCalcOpticalFlowFarneback() function to compare 2 consecutive images from the webcam and create the optical flow, and then measure movement between the frames to detect whether or not a person is moving through the room. How to do this, and the OpenCV wiki wasn't very descriptive on how to set it up for beginners. Honestly, the parameters just confused me and I didn't see a return value listed, or how you would get data from it.

View 8 Replies


ADVERTISEMENT

C++ :: OpenCV - Opening And Closing Webcam

Jan 24, 2015

I am trying to switch between 2 states, and the event that determines which state i am in is based on the key i've pressed. So in this case i want the webcam to start automatically, and when key is pressed it then turns it off. The way I've done it is like this :

bool webcam_on() {
int c = 0;
VideoCapture cap(0);
if ( !cap.isOpened() ) // if not success, exit program

[Code] .....

The problem with this method is that cin.get() blocks the video stream.. I wanted something that the webcam turned on until i press some key, which would trigger the release.. How can this be done?

View 7 Replies View Related

C++ :: Interfacing Digital Camera Or Webcam

Feb 27, 2013

How to to interface my digital camera or webcam with the c++ so that the camera can capture continuously when the camera or webcam detect a badminton shuttlecock. I am using Dev C++.

View 1 Replies View Related

C++ :: How To Get A Video Recording As Input From Webcam To One Of Program Functions

Mar 25, 2014

I want to write a program that is going to turn on my webcam and then display whatever the webcam is pointing at on the app. But I am more interested in knowing how I can get a video recording as input from the webcam to one of the program functions, because I suppose that is what should happen.

View 1 Replies View Related

C :: How To Replace A String Of A Person In A File

Mar 6, 2015

I'm having a bit of problem. I've set the string 'Absent' to all student in a file. However, I want to replace 'Absent' with 'present' when the correct ID assigned to a student is entered. In other words, 'Absent' will only change to 'Present' for a specific person at a time. I'm not sure how to implement this

View 4 Replies View Related

C++ :: Calculate A Person Regular Pay As Well As Overtime

Jun 26, 2013

#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main () {

[Code] ....

I'm not sure why my loop isn't running right. I've also used if/if and if/else . Nothing worked

View 2 Replies View Related

C# :: Creating Person Changed EventHandler?

Feb 24, 2015

Im trying to create a Personchanged EventHandler..

I have this:

public class Pessoa {
private int _idade;
private bool _isDeleted;
public Pessoa() {
// TODO: Complete member initialization

[Code] ....

And I have a error: Delegate EventHandler does not take 0 arguments..

View 10 Replies View Related

C Sharp :: Full Code For Webcam Alert Motion Detector?

Mar 12, 2013

i have webcam i need to make project when this webcam detect any motion in his spot give me alert ,,,

View 4 Replies View Related

C/C++ :: Enter Person Last And First Name Separated By Space And Comma?

Dec 13, 2012

How to enter person's last name and first name separated by space and comma.

For example henry smith---

Output-->>smith,henry

View 2 Replies View Related

C++ :: How To Run OpenCV Program

Mar 15, 2013

I am trying to run an OpenCV program from command line, but it gave error like "The program can`t start because opencv_220d.dll is missing from your computer." Try reinstalling the program to fix this problem. I am using Windows 7 & Microsoft VC++ 2010. How can I run the program?

View 3 Replies View Related

Visual C++ :: OpenCV In MFC App?

Feb 5, 2014

I have a C++ app that uses OpenCV. Currently i am statically linking the OpenCV libs into my app. This is adding an extra overhead of 6+ MB.

i would like to remove some of the features that i am not using in OpenCV. The features am using are,

Capture frames from Webcam.

Face detection.

Image formats (JPEG, PNG).

Image rotation & resizing.

Is it possible to remove other features and trim down the libs?

My C++ app is developed in Visual Studio 2012.

View 1 Replies View Related

C++ :: Detecting TR1 Support?

Feb 3, 2012

I have source code that is shared between two compilers, one supports TR1 and one doesn't. I've reverse engineered a few of the TR1 templates for the older compiler, but I need to be able to detect whether TR1 is supported or not, so as to include the correct header.

Something like this.

Code:
#ifdef SUPPORTS_TR1
#include <array>
#else
#include "mystl/array"
#endif
std::array<int, 10> myarray;

The compiler that supports TR1 is Visual Studio.

View 2 Replies View Related

C++ :: How To Compare Two Histograms Using Opencv

Mar 6, 2013

I am tying to compare two histograms, but it gives error. Here I have given my code, histogram file and error message. Histogram file 3*5 matrix(output_test.txt):

1 2 3 4 5
5 2 1 4 2
2 1 2 4 2

code:

int main(..........)
{ ................................................
Mat first_histogram(1,feature_vector_size, CV_32F);
Mat second_histogram(1,feature_vector_size, CV_32F);
for(i=0;i<count_row;i++)
{
for(j=0;j<count_row;j++)
{

[Code]...

Error message: error LNK2019: unresolved external symbol "double __cdecl cv::compareHist(class cv::Mat const &,class cv::Mat const &,int)" (?compareHist@cv@@YANABVMat@1@0H@Z)

View 5 Replies View Related

C# :: Detecting Previous Installs?

Jul 16, 2014

Say a user installs and uses the software for awhile. Then they uninstall it. Client wants the database containing client data to remain behind, in case they ever re-install the software. Which is fine.

So then.. they re-install the software. Client wants them to have the choice to either use the existing database, or to create a new one. When the software fires up, it always checks for the database, and creates one if it's not there. So how can I determine if the instance is a new install, or a current install, given that the database will be there no matter what?

View 7 Replies View Related

C++ :: Cannot Load OpenCV Library

Mar 22, 2014

I am trying to run a console program but for any reason it displays an error on the cv.h line.

View 5 Replies View Related

Visual C++ :: How To Run OpenCV Program

Mar 15, 2013

I am trying to run an OpenCV program from command line, but it gave error like "The program can`t start because opencv_220d.dll is missing from your computer." Try reinstalling the program to fix this problem. I am using Windows 7 & Microsoft VC++ 2010. How can I run the program?

View 4 Replies View Related

C++ :: Detecting Mouse Clicks With Direct2d

Jan 21, 2014

I have a direct2d application and I want to be able to detect mouse clicks. One example is, (in my borderless window) I would like to have an X at the top right of the screen, that when clicked would close the window. How can I do something like this?

View 3 Replies View Related

C :: Detecting Number Of Uppercase Letters?

Mar 20, 2014

Just wrote this extremely simple program but it seems to be malfunctioning. It counts correctly the number of uppercase letters in a string so long as i don't use the space-bar. once I add a space it only counts the number of uppercase letters of the first word..

printf("I ..........ing love programming");

Code:

#include <stdio.h>
main()
{
char text[200];
int i = 0;
int uppercase = 0;
printf("Enter text:");
scanf("%s", text);

[code]....

View 6 Replies View Related

C++ :: Overflow / Underflow Detecting Functions

Sep 15, 2014

I am performing arithmetic operations on very large integers that operate around the threshold of the maximum positive integer an int variable can handle (i.e. 2147483647) for a 32-bit machine. I have been studying the in-built functions in the C++ Standard Library for some time now where I came across some error detecting functions in the <cmath> and <cerrno> header files. The impression I got from the literature is that they are solely used in conjunction with functions contained in the <cmath> header file and not necessarily with fundamental arithmetic operations like addition and subtraction.

I need a means to know when my arithmetic operations generate overflows/underflows! Is there any way I can adapt the functionalities of these functions to my needs?

View 5 Replies View Related

C++ :: How To Create Histogram From A Set Of Values In OpenCV

Mar 9, 2013

I have a text file which consist of several values. These values represent distance from origin to any point in the triangle. How can I create histogram from these values? Is there any functions in OpenCV which can create histogram from these values?

Below my sample values are given:
..........................
3.4 1.2 6.9 0.2 5.1 2.9
........................

View 2 Replies View Related

Visual C++ :: Compare Two Histograms In OpenCV?

Mar 5, 2013

I am tying to compare two histograms, but it gives error. Here I have given my code, histogram file and error message. Histogram file 3*5 matrix(output_test.txt):

1 2 3 4 5
5 2 1 4 2
2 1 2 4 2

code:

Code:
int main(..........)
{
................................................
Mat first_histogram(1,feature_vector_size, CV_32F);
Mat second_histogram(1,feature_vector_size, CV_32F);

[Code]....

Error message: error LNK2019: unresolved external symbol "double __cdecl cv::compareHist(class cv::Mat const &,class cv::Mat const &,int)" (?compareHist@cv@@YANABVMat@1@0H@Z)

View 1 Replies View Related

C++ :: OpenCV - Create A Program Which Would Calibrate Camera

Feb 1, 2013

I am doing a project, which requires me to create a program which would calibrate the camera. The code is below.

#include<opencvcv.h>
#include<opencvhighgui.h>
#include<stdlib.h>
#include<stdio.h>
#include<vector>
using namespace cv;
int main() {
int numBoards = 0;

[Code] ....

I am a beginner to opencv.

View 14 Replies View Related

C++ :: Detecting Any Key Of Keyboard And Mouse On Windows / Linux?

Jun 20, 2014

I am trying to detect keys pressed on a keyboard and mouse on both, Windows and Linux but I am unsure what would be the best practice way to do so. Will I have to detect the keys for each platform individually? Would you make use of an event listener? What's the best way to detect the input-devices?

View 1 Replies View Related

C++ :: Split Image To 3 Channels - Opencv Error

Mar 18, 2013

I am currently planning on splitting my image into 3 channels so i can get the RGB values of an image to plot a scatter graph so i can model is using a normal distribtion calculating the covariance matrix, mean, etc. then calculate distance between the background points and the actual image to segment the image.

Now in my first task, i have wrote the following code.

VideoCapture cam(0);
//int id=0;
Mat image, Rch,Gch,Bch;
vector<Mat> rgb(3); //RGB is a vector of 3 matrices
namedWindow("window");

[Code] ....

but as soon as it reaches the split function, i step through it, it causes a unhandled exception error. access violation writing location 0xfeeefeee.

I am still new to opencv, so am not used to dealing with unhandled exception error.

I tried adding items into the vector still error, either via push_back or general assignment i.e. rgb[0] = Rch or Bch still error.

View 6 Replies View Related

C# :: Detecting CD-ROM Drive And Grab Filepath Of Only CSV File

Jul 8, 2014

I would like the user to insert a CD into their computer and click on an button on my application that allows them to read the CD-ROM and find a specific file type, e.g. csv, and then grab the info in the csv file.

I already have my StreamReader setup grabbing a filepath.

Now I am just wondering...how do I detect the CD-ROM and how do I grab the filepath of the only CSV file on the CD-ROM?

What's behind detecting a CD-ROM and grabbing a specific file type from a CD-ROM?

I heard about DriveInfo

However, that only allows me to detect a drive but not look at it's contents.

View 14 Replies View Related

Visual C++ :: Create Histogram From A Set Of Values In OpenCV?

Mar 9, 2013

I have a text file which consist of several values. These values represent distance from origin to any point in the triangle. How can I create histogram from these values? Is there any functions in OpenCV which can create histogram from these values? Below my sample values are given:

..........................

3.4 1.2 6.9 0.2 5.1 2.9

........................

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved