Ask Your Question

Krishnananthan's profile - activity

2015-11-17 08:30:24 -0500 received badge  Popular Question (source)
2015-09-01 14:43:02 -0500 received badge  Student (source)
2013-09-15 12:22:22 -0500 commented question Traffic Jam Detection

The requirement is to be get the total number of vehicles traveled in the particular road (one way). I've tried to place the camera across the road and getting the vehicle count. When traffic jam occurs, the camera will count a particular vehicle more than once. Because, I am doing frame based counting. I've fixed the camera across the road is also for the same problem. And I don't have any clue about the distinct vehicle counting. That's why I want to stop counting when traffic jam occurs to avoid the counting get repeated. Please help me on this.

2013-08-16 11:51:14 -0500 asked a question Traffic Jam Detection

Hi friends,

I am doing a project regarding vehicle traffic controlling by getting vehicle count using a security camera. The counting is for a vehicle traffic statistical analysis. I am facing a problem. When traffic jam occurred, the counting must be stopped. Its very difficult to do. Even I don't have any idea to make it possible. Can anyone give me any suggestion and some piece of code regarding this. I'm using the basic vehicle counting code using a classifier file for it.

Thanks in advance.

2013-06-21 12:51:24 -0500 commented question Getting total number of vehicles in a video

I've solved it. Do u know the way to count the number of distinct vehicles in the video?

2013-06-19 01:22:02 -0500 commented question Getting total number of vehicles in a video

You are right. I mentioned that in my question also. I tried to sum that and the output returns the pointer address. And where can i sum the count?

2013-06-18 00:59:39 -0500 commented question Getting total number of vehicles in a video

I want to count the number of distinct vehicles which were in the view of camera. But, for temporarily I want to sum up the vehicles in all the frames including repetitive vehicles.

2013-06-17 09:47:14 -0500 commented question OpenCV Webcam

I have installed the opencv 2.45. Now everything fine. Thanks for your suggestions.

2013-06-17 09:46:22 -0500 commented answer OpenCV Webcam

Thanks mate. It worked. Thank you very much..

2013-06-17 07:01:43 -0500 commented question OpenCV Webcam

Victor: I am using opencv 2.2 on Windows 7.

Pranav Lal: Camera id is not a problem. Because my webcam indicator is getting on. So webcam is working. But the window is gray coloured.

2013-06-16 06:19:33 -0500 commented question OpenCV Webcam

This is the code I tried in C++. Here the webcam indicator light getting on. But the webcam window is gray coloured.

include "stdafx.h" include "cv.h" include "highgui.h" include <stdio.h>

int main() { CvCapture* capture = cvCaptureFromCAM(-1);

if( !capture ) { fprintf( stderr, "ERROR: capture is NULL \n" ); getchar(); return -1; }

cvNamedWindow( "Mycapture", CV_WINDOW_AUTOSIZE );

while( 1 ) {

cvGrabFrame(capture); IplImage* frame = cvRetrieveFrame(capture);

if( !frame ) { fprintf( stderr, "ERROR: frame is null...\n" ); getchar(); break; } cvShowImage( "Mycapture", frame );

if( (cvWaitKey(10) & 255) == 27 ) break; }

cvReleaseCapture( &capture ); cvDestroyWindow( "Mycapture" );

return 0; }

I've used the Visual C++. And my webcam is HP TrueVision webcam.

2013-06-15 21:48:32 -0500 received badge  Editor (source)
2013-06-15 21:47:43 -0500 asked a question OpenCV Webcam

Hi friends, I am using my webcam for the opencv project. I have tested the webcam with both java and c++. It is working for the Java, but not for C++. Its difficult to find out what was the problem. I am very much certain that, there is no problem in the C++ codes. When I google it, some people says that opencv supports for only specific types of cameras. But still its working for the java opencv, then what is the issue with the C++ ?

Can anyone give me the actual reason behind this and how to solve this problem?

This is the code I tried in C++. Here the webcam indicator light getting on. But the webcam window is gray coloured.

include "stdafx.h"

include "cv.h"

include "highgui.h"

include <stdio.h>

int main() { CvCapture* capture = cvCaptureFromCAM(-1);

if( !capture ) { fprintf( stderr, "ERROR: capture is NULL \n" ); getchar(); return -1; }

cvNamedWindow( "Mycapture", CV_WINDOW_AUTOSIZE );

while( 1 ) {

cvGrabFrame(capture); IplImage* frame = cvRetrieveFrame(capture);

if( !frame ) { fprintf( stderr, "ERROR: frame is null...\n" ); getchar(); break; } cvShowImage( "Mycapture", frame );

if( (cvWaitKey(10) & 255) == 27 ) break; }

cvReleaseCapture( &capture ); cvDestroyWindow( "Mycapture" );

return 0; }

I've used the Visual C++. And my webcam is HP TrueVision webcam.

Thanks in advance...

2013-06-14 12:12:49 -0500 commented question Getting total number of vehicles in a video

std::cout << "Total: " << object->total << " cars" << std::endl; By using this line I am getting the number of vehicles in a single frame. I want to get the sum of vehicle from the whole video.(i.e. sum of vehicles in all the frames).

Thanks

2013-06-13 11:54:20 -0500 asked a question Getting total number of vehicles in a video

Hi friends,

Now I am doing a project based on opencv. One part of the project is getting the total number of object in a video. For that I've found the below piece of code from web. Initially the output showing in the command line. I have got that in a notepad by adding, freopen("out.txt","w",stdout); line to the code.

This is giving the number of vehicles in each frame. But I have to get the total amount of vehicles in the whole video. I've tried to get the each frame vehicle count to a loop and get the sum. But Its not successful. I think its a small trick. But I couldn't get it yet.

void detect(IplImage *img,CvRect *r) { ////CvRect *r; CvSize img_size = cvGetSize(img); ////int count;

CvSeq *object = cvHaarDetectObjects(img,cascade,storage, 1.1, //1.1,//1.5, //-------------------SCALE FACTOR 1, //2 //------------------MIN NEIGHBOURS 0, //CV_HAAR_DO_CANNY_PRUNING cvSize(0,0),//cvSize( 30,30), // ------MINSIZE img_size //cvSize(70,70)//cvSize(640,480) //---------MAXSIZE );

std::cout << "Total: " << object->total << " cars" << std::endl;

for(int i = 0 ; i < ( object ? object->total : 0 ) ; i++) { /int *ptr; int value; *ptr = 9; value = *ptr;/

 CvRect *r = (CvRect*)cvGetSeqElem(object, i);
 ///CvRect fs[object->total];
 cvRectangle(img,cvPoint(r->x, r->y),cvPoint(r->x + r->width, r->y + r->height),CV_RGB(255, 0, 0), 2, 8, 0) ;

////CvPoint* p = CV_GET_SEQ_ELEM( CvPoint, object, i );

}

cvShowImage("video", img);

}

Can anyone help me on this? It is must needed for my project.

Thanks in advance.